diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/packages/util-linux/util-linux.inc | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/util-linux/util-linux.inc')
-rw-r--r-- | meta/packages/util-linux/util-linux.inc | 237 |
1 files changed, 0 insertions, 237 deletions
diff --git a/meta/packages/util-linux/util-linux.inc b/meta/packages/util-linux/util-linux.inc deleted file mode 100644 index 571b53c99c..0000000000 --- a/meta/packages/util-linux/util-linux.inc +++ /dev/null | |||
@@ -1,237 +0,0 @@ | |||
1 | DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system." | ||
2 | SECTION = "base" | ||
3 | |||
4 | # note that `lscpu' is under GPLv3+ | ||
5 | LICENSE = "GPLv2+ & LGPLv2.1+ & BSD" | ||
6 | LICENSE_util-linux-lscpu = "GPLv3+" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \ | ||
9 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
10 | file://licenses/COPYING.GPL;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
11 | file://licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \ | ||
12 | file://getopt/COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | ||
13 | |||
14 | DEPENDS = "udev zlib ncurses virtual/libintl gettext" | ||
15 | DEPENDS_virtclass-native = "zlib-native ncurses-native lzo-native gettext-native" | ||
16 | |||
17 | inherit autotools | ||
18 | |||
19 | SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-ng-${PV}.tar.bz2 \ | ||
20 | file://MCONFIG \ | ||
21 | file://swapargs.h \ | ||
22 | file://defines.h \ | ||
23 | file://make_include \ | ||
24 | " | ||
25 | |||
26 | PACKAGES_prepend = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile " | ||
27 | |||
28 | PACKAGES_virtclass-native = "" | ||
29 | |||
30 | S = "${WORKDIR}/util-linux-ng-${PV}" | ||
31 | |||
32 | EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \ | ||
33 | --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \ | ||
34 | --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck" | ||
35 | |||
36 | FILES_${PN}-doc += "/usr/share/getopt/getopt-*.*" | ||
37 | |||
38 | FILES_util-linux-fdisk = "/sbin/fdisk.${PN}" | ||
39 | FILES_util-linux-cfdisk = "/sbin/cfdisk" | ||
40 | FILES_util-linux-sfdisk = "/sbin/sfdisk" | ||
41 | FILES_util-linux-swaponoff = "/sbin/swapon.${PN} /sbin/swapoff.${PN}" | ||
42 | FILES_util-linux-losetup = "/sbin/losetup.${PN}" | ||
43 | FILES_util-linux-mount = "/bin/mount.${PN}" | ||
44 | FILES_util-linux-umount = "/bin/umount.${PN}" | ||
45 | FILES_util-linux-readprofile = "/usr/sbin/readprofile" | ||
46 | |||
47 | RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile " | ||
48 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" | ||
49 | |||
50 | RRECOMMENDS_${PN}_virtclass-native = "" | ||
51 | RDEPENDS_${PN}_virtclass-native = "" | ||
52 | |||
53 | do_compile () { | ||
54 | set -e | ||
55 | install ${WORKDIR}/MCONFIG ${S}/MCONFIG | ||
56 | install ${WORKDIR}/make_include ${S}/make_include | ||
57 | install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h | ||
58 | install ${WORKDIR}/defines.h ${S}/defines.h | ||
59 | oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \ | ||
60 | 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ | ||
61 | 'LDFLAGS=${LDFLAGS}' | ||
62 | } | ||
63 | |||
64 | checklink() { | ||
65 | local targ link value | ||
66 | targ="$1" | ||
67 | link="$2" | ||
68 | ext="$3" | ||
69 | if test -h "$link" | ||
70 | then | ||
71 | value="$(readlink "$link")" | ||
72 | if test "$value" = "$targ" | ||
73 | then | ||
74 | rm "$link" | ||
75 | ln -s "$targ"."${PN}" "$link$ext" | ||
76 | return 0 | ||
77 | else | ||
78 | echo "$link: '$value' found '$targ' expected" >&2 | ||
79 | return 1 | ||
80 | fi | ||
81 | else | ||
82 | echo "$link: not a symbolic link" >&2 | ||
83 | return 1 | ||
84 | fi | ||
85 | } | ||
86 | |||
87 | do_install () { | ||
88 | # with ccache the timestamps on compiled files may | ||
89 | # end up earlier than on their inputs, this allows | ||
90 | # for the resultant compilation in the install step. | ||
91 | oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \ | ||
92 | 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ | ||
93 | 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install | ||
94 | |||
95 | mkdir -p ${D}${base_bindir} | ||
96 | |||
97 | sbinprogs="agetty blockdev ctrlaltdel cfdisk vipw vigr" | ||
98 | sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln" | ||
99 | usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt" | ||
100 | binprogs_a="dmesg kill more umount mount login reset" | ||
101 | |||
102 | if [ "${base_sbindir}" != "${sbindir}" ]; then | ||
103 | mkdir -p ${D}${base_sbindir} | ||
104 | for p in $sbinprogs $sbinprogs_a; do | ||
105 | if [ -f "${D}${sbindir}/$p" ]; then | ||
106 | mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" | ||
107 | fi | ||
108 | done | ||
109 | fi | ||
110 | |||
111 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
112 | mkdir -p ${D}${base_bindir} | ||
113 | for p in $binprogs_a; do | ||
114 | if [ -f "${D}${bindir}/$p" ]; then | ||
115 | mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" | ||
116 | fi | ||
117 | done | ||
118 | fi | ||
119 | |||
120 | for p in $usrbinprogs_a; do | ||
121 | if [ -f "${D}${bindir}/$p" ]; then | ||
122 | mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}" | ||
123 | fi | ||
124 | done | ||
125 | |||
126 | for p in $binprogs_a; do | ||
127 | if [ -f "${D}${base_bindir}/$p" ]; then | ||
128 | mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}" | ||
129 | fi | ||
130 | done | ||
131 | |||
132 | for p in $sbinprogs_a; do | ||
133 | if [ -f "${D}${base_sbindir}/$p" ]; then | ||
134 | mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}" | ||
135 | fi | ||
136 | done | ||
137 | |||
138 | install -d ${D}${sysconfdir}/default/ | ||
139 | echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall | ||
140 | |||
141 | ln -sf ${sbindir}/swapon ${D}${sbindir}/swapoff.${PN} | ||
142 | ln -sf ${sbindir}/shutdown ${D}${sbindir}/reboot.${PN} | ||
143 | ln -sf ${sbindir}/shutdown ${D}${sbindir}/halt.${PN} | ||
144 | ln -sf ${sbindir}/shutdown ${D}${sbindir}/fastboot | ||
145 | ln -sf ${sbindir}/shutdown ${D}${sbindir}/fasthalt | ||
146 | } | ||
147 | |||
148 | pkg_postinst_${PN} () { | ||
149 | update-alternatives --install ${base_bindir}/dmesg dmesg dmesg.${PN} 100 | ||
150 | update-alternatives --install ${base_bindir}/kill kill kill.${PN} 100 | ||
151 | update-alternatives --install ${base_bindir}/more more more.${PN} 100 | ||
152 | update-alternatives --install ${base_sbindir}/mkswap mkswap mkswap.${PN} 100 | ||
153 | test -x ${base_sbindir}/pivot_root.${PN} && \ | ||
154 | update-alternatives --install ${base_sbindir}/pivot_root pivot_root pivot_root.${PN} 100 | ||
155 | # update-alternatives --install ${base_sbindir}/sln sln sln.${PN} 100 | ||
156 | update-alternatives --install ${base_sbindir}/mkfs.minix mkfs.minix mkfs.minix.${PN} 100 | ||
157 | update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100 | ||
158 | update-alternatives --install ${bindir}/hexdump hexdump hexdump.${PN} 100 | ||
159 | update-alternatives --install ${bindir}/last last last.${PN} 100 | ||
160 | update-alternatives --install ${bindir}/logger logger logger.${PN} 100 | ||
161 | update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 100 | ||
162 | update-alternatives --install ${bindir}/renice renice renice.${PN} 100 | ||
163 | update-alternatives --install ${bindir}/wall wall wall.${PN} 100 | ||
164 | |||
165 | # There seems to be problem, atleast on nslu2, with these, untill they are | ||
166 | # fixed the busybox ones have higher priority | ||
167 | update-alternatives --install ${base_sbindir}/hwclock hwclock hwclock.${PN} 10 | ||
168 | update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 10 | ||
169 | update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 10 | ||
170 | update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 10 | ||
171 | } | ||
172 | |||
173 | pkg_prerm_${PN} () { | ||
174 | test -x ${base_sbindir}/pivot_root.${PN} && \ | ||
175 | update-alternatives --remove pivot_root pivot_root.${PN} | ||
176 | update-alternatives --remove dmesg dmesg.${PN} | ||
177 | update-alternatives --remove kill kill.${PN} | ||
178 | update-alternatives --remove more more.${PN} | ||
179 | update-alternatives --remove halt halt.${PN} | ||
180 | update-alternatives --remove hwclock hwclock.${PN} | ||
181 | update-alternatives --remove mkswap mkswap.${PN} | ||
182 | update-alternatives --remove reboot reboot.${PN} | ||
183 | update-alternatives --remove shutdown shutdown.${PN} | ||
184 | # update-alternatives --remove sln sln.${PN} | ||
185 | update-alternatives --remove mkfs.minix mkfs.minix.${PN} | ||
186 | update-alternatives --remove fsck.minix fsck.minix.${PN} | ||
187 | update-alternatives --remove hexdump hexdump.${PN} | ||
188 | update-alternatives --remove last last.${PN} | ||
189 | update-alternatives --remove logger logger.${PN} | ||
190 | update-alternatives --remove mesg mesg.${PN} | ||
191 | update-alternatives --remove renice renice.${PN} | ||
192 | update-alternatives --remove wall wall.${PN} | ||
193 | } | ||
194 | |||
195 | pkg_postinst_util-linux-fdisk () { | ||
196 | update-alternatives --install ${base_sbindir}/fdisk fdisk fdisk.${PN} 100 | ||
197 | } | ||
198 | |||
199 | pkg_prerm_util-linux-fdisk () { | ||
200 | update-alternatives --remove fdisk fdisk.${PN} | ||
201 | } | ||
202 | |||
203 | pkg_postinst_util-linux-mount () { | ||
204 | update-alternatives --install ${base_bindir}/mount mount mount.${PN} 100 | ||
205 | } | ||
206 | |||
207 | pkg_prerm_util-linux-mount () { | ||
208 | update-alternatives --remove mount mount.${PN} | ||
209 | } | ||
210 | |||
211 | pkg_postinst_util-linux-umount () { | ||
212 | update-alternatives --install ${base_bindir}/umount umount umount.${PN} 100 | ||
213 | } | ||
214 | |||
215 | pkg_prerm_util-linux-umount () { | ||
216 | update-alternatives --remove umount umount.${PN} | ||
217 | } | ||
218 | |||
219 | pkg_postinst_util-linux-losetup () { | ||
220 | update-alternatives --install ${base_sbindir}/losetup losetup losetup.${PN} 100 | ||
221 | } | ||
222 | |||
223 | pkg_prerm_util-linux-losetup () { | ||
224 | update-alternatives --remove losetup losetup.${PN} | ||
225 | } | ||
226 | |||
227 | pkg_postinst_util-linux-swaponoff () { | ||
228 | update-alternatives --install ${base_sbindir}/swapoff swapoff swapoff.${PN} 100 | ||
229 | update-alternatives --install ${base_sbindir}/swapon swapon swapon.${PN} 100 | ||
230 | } | ||
231 | |||
232 | pkg_prerm_util-linux-swaponoff () { | ||
233 | update-alternatives --remove swapoff swapoff.${PN} | ||
234 | update-alternatives --remove swapon swapon.${PN} | ||
235 | } | ||
236 | |||
237 | BBCLASSEXTEND = "native" | ||