Magellan Linux

Contents of /smage/trunk/core/util-linux/util-linux-2.21.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3924 - (show annotations) (download)
Tue Jul 24 09:32:10 2012 UTC (11 years, 10 months ago) by niro
File size: 2898 byte(s)
-ALX_ONLY_KEEP -> ALX_PKG_KEEP
1 # $Id$
2
3 PNAME="util-linux"
4 PVER="2.21.2"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="Various useful Linux utilities."
10 HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
11
12 DEPEND=">= virtual/glibc
13 >= sys-libs/ncurses-5.9
14 >= sys-fs/e2fsprogs-1.42
15 >= sys-fs/libudev-185"
16
17 SDEPEND=">= virtual/kernel-headers
18 >= virtual/sed
19 >= sys-dev/gettext-0.18"
20
21 SRCFILE="${PNAME}-${PVER}.tar.bz2"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 # keep fullfeatured /sbin/blkid for better fstype guessing and uuid handling
25 # mcookie is needed by xorg's startx
26 ALX_PKG_KEEP="usr/bin/umount
27 usr/sbin/fsck
28 usr/sbin/cfdisk
29 usr/sbin/sfdisk
30 usr/sbin/blkid
31 usr/bin/mcookie
32 usr/$(mlibdir)/*.so.*"
33 sminclude mtools multilib cleanutils alx-split
34
35 SRC_URI=(
36 http://www.kernel.org/pub/linux/utils/${PNAME}/v${PVER%.?}/${SRCFILE}
37 http://www.kernel.org/pub/linux/utils/${PNAME}/v${PVER/%_*/}/${SRCFILE}
38 mirror://${PNAME}/${SRCFILE}
39 )
40
41 UP2DATE="updatecmd \"${HOMEPAGE}/v\$(updatecmd ${HOMEPAGE} | grep v.*/ | sed -n 's/.*v\(.*\)\/.*/\1/;$ p')/?C=M;O=A\" | grep -v 'rc' | lasttarball"
42
43 src_prepare()
44 {
45 munpack ${SRCFILE} || die
46
47 # fhs compatibility
48 all-abis sed -i 's:etc/adjtime:var/lib/hwclock/adjtime:' hwclock/hwclock.c || die
49
50 # satisfy usr-move
51 all-abis sed -i \
52 -e "s:sbindir=/sbin:sbindir=/usr/sbin:" \
53 -e "s:bindir=/bin:bindir=/usr/bin:" \
54 -e "s:libdir=/lib:libdir=/usr/lib:" \
55 configure.ac || die
56
57 # regen configure
58 mautoreconf || die
59 }
60
61 src_compile()
62 {
63 # enabled libmount-mount to utilize mount with a mtab symlink
64 # which is needed by systemd
65
66 # we are using blkid from util linux now (--with-fsprobe=built --enable-fsck)
67 # which merges the old blkid from e2fsprogs and udevs libvolume
68 # see: http://lists.freedesktop.org/archives/hal-commit/2009-May/004936.html
69 mconfigure \
70 --exec-prefix=/usr \
71 --enable-nls \
72 --enable-agetty \
73 --enable-cramfs \
74 --enable-partx \
75 --enable-raw \
76 --enable-rename \
77 --enable-schedutils \
78 --enable-write \
79 --disable-reset \
80 --disable-login-utils \
81 --disable-kill \
82 --disable-last \
83 --disable-mesg \
84 --disable-wall \
85 --enable-fsck \
86 --enable-libmount-mount \
87 --disable-silent-rules \
88 || die
89
90 mmake || die
91 }
92
93 alx_generic_src_install()
94 {
95 # needed directories
96 mkeepdir /var/lib/hwclock || die
97
98 mmake DESTDIR=${BINDIR} install || die
99 minstalldocs HISTORY MAINTAINER README VERSION || die
100
101 # only keep binaries which are not provided by busybox
102 zapmost ${BINDIR}/usr/bin \
103 chkdupexe col colcrt colrm column cytune ddate fallocate ionice \
104 ipcmk isosize line look lsblk lscpu mcookie namei pg rename rev \
105 script scriptreplay setterm tailf ul umount unshare uuidgen whereis || die
106 zapmost ${BINDIR}/usr/sbin \
107 agetty addpart blkid cfdisk ctrlaltdel delpart fsck fsck.cramfs fsck.minix \
108 fsfreeze fstrim ldattach mkfs mkfs.bfs mkfs.cramfs partx raw rtcwake \
109 sfdisk swaplabel tunelp uuidd wipefs || die
110 }