wok-current view udev/receipt @ rev 3821
Up + fix: udev (145)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Aug 06 15:23:24 2009 +0200 (2009-08-06) |
parents | f2ddecc4a3ff |
children | 748ea6277c88 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="145"
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 glib acl attr libusb libusb-compat"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config glib-dev \
10 libusb-dev usbutils-dev pciutils acl-dev"
11 MAINTAINER="pankso@slitaz.org"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
14 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
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 $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$PWD/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib
36 for dir in sbin etc lib
37 do
38 cp -a $_pkg/$dir $fs
39 done
40 ln -s /lib/libudev.so.0.3.0 $fs/lib/libudev.so
42 # Remove -dev files
43 rm -rf $fs/lib/*.*a
44 rm -rf $fs/lib/pkgconfig
46 # Copy rules files to udev conf dir
47 mv -f $fs/lib/udev/rules.d $fs/etc/udev
48 cp stuff/udev.conf $fs/etc/udev
49 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
50 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
51 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
52 # Fix permissions
53 chmod +x $fs/lib/udev/*
54 chown -R root.root $fs
55 }
57 pre_install()
58 {
59 # Remove old rules and libs
60 rm -rf $1/lib/udev/rules.d
61 rm -rf $1/lib/udev/vol_id
62 rm -f $1/lib/libvolume_id*
63 rm -f $1/lib/libudev.so.1.0
64 rm -f $1/lib/libudev.so.2.0
65 }
67 list_udev_group()
68 {
69 object=$1
70 [ -n "$object" ] || object=GROUP
71 grep $object /etc/udev/rules.d/* | \
72 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
73 }
75 post_install()
76 {
77 # Sanity check for udev+ldap boot
78 list_udev_group GROUP | while read x ; do
79 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
80 done
81 list_udev_group OWNER | while read x ; do
82 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
83 done
84 }