wok-current view udev/receipt @ rev 4208
Fix: tazbb clean_up build wok
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Sep 24 09:51:12 2009 +0200 (2009-09-24) |
parents | 748ea6277c88 |
children | 8ab3c7c0c8d5 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="146"
5 BUILD_WARNING="Install new udev package and rebuild hal"
6 CATEGORY="base-system"
7 SHORT_DESC="Udev creat automaticly right devices in /dev."
8 DEPENDS="glibc-base util-linux-ng-blkid"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config pciutils"
10 MAINTAINER="pankso@slitaz.org"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
13 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 gzip -d /usr/share/misc/pci.ids.gz
19 cd $src
20 ./configure \
21 --prefix=/usr \
22 --exec-prefix="" \
23 --sysconfdir=/etc \
24 --libexecdir=/lib/udev \
25 --with-rootlibdir=/lib \
26 --enable-static \
27 --disable-extras \
28 $CONFIGURE_ARGS &&
29 make &&
30 make DESTDIR=$PWD/_pkg install &&
31 gzip /usr/share/misc/pci.ids
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr
38 for dir in sbin etc lib
39 do
40 cp -a $_pkg/$dir $fs
41 done
42 #cp -a $_pkg/usr/lib $fs/usr
43 #ln -s /lib/libudev.so.0.3.0 $fs/lib/libudev.so
45 # Remove -dev files
46 rm -rf $fs/lib/*.*a
47 rm -rf $fs/lib/pkgconfig
49 # Copy rules files to udev conf dir
50 mv -f $fs/lib/udev/rules.d $fs/etc/udev
51 cp stuff/udev.conf $fs/etc/udev
52 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
53 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
54 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
55 # Fix permissions
56 chmod +x $fs/lib/udev/*
57 chown -R root.root $fs
58 }
60 pre_install()
61 {
62 # Remove old rules and libs
63 rm -rf $1/lib/udev/rules.d
64 rm -rf $1/lib/udev/vol_id
65 rm -f $1/lib/libvolume_id*
66 rm -f $1/lib/libudev.so.1.0
67 rm -f $1/lib/libudev.so.2.0
68 }
70 list_udev_group()
71 {
72 object=$1
73 [ -n "$object" ] || object=GROUP
74 grep $object /etc/udev/rules.d/* | \
75 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
76 }
78 post_install()
79 {
80 # Sanity check for udev+ldap boot
81 list_udev_group GROUP | while read x ; do
82 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
83 done
84 list_udev_group OWNER | while read x ; do
85 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
86 done
87 }