wok-6.x view udev/receipt @ rev 3801
Up: gcc/gcc-lib-base (4.4.1)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Tue Aug 04 20:51:02 2009 +0000 (2009-08-04) |
parents | f060e21dde4c |
children | 290869e0529e |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="143"
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"
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 --enable-static \
25 $CONFIGURE_ARGS &&
26 make &&
27 make DESTDIR=$PWD/_pkg install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib
34 for dir in sbin etc lib libexec
35 do
36 cp -a $_pkg/$dir $fs
37 done
38 ln -s /lib/libudev.so.0.3.0 $fs/usr/lib/libudev.so
40 # Remove -dev files
41 rm -rf $fs/lib/*.*a
42 rm -rf $fs/lib/pkgconfig
44 # Copy rules files to udev conf dir
45 mv $fs/libexec/rules.d $fs/etc/udev
46 cp stuff/udev.conf $fs/etc/udev
47 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
48 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
49 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
50 # Fix permissions
51 chmod +x $fs/lib/udev/*
52 chown -R root.root $fs
53 }
55 pre_install()
56 {
57 # Remove old rules and libs
58 rm -rf $1/lib/udev/rules.d
59 rm -rf $1/lib/udev/vol_id
60 rm -f $1/lib/libvolume_id*
61 rm -f $1/lib/libudev.so.1.0
62 rm -f $1/lib/libudev.so.2.0
63 }
65 list_udev_group()
66 {
67 object=$1
68 [ -n "$object" ] || object=GROUP
69 grep $object /etc/udev/rules.d/* | \
70 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
71 }
73 post_install()
74 {
75 # Sanity check for udev+ldap boot
76 list_udev_group GROUP | while read x ; do
77 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
78 done
79 list_udev_group OWNER | while read x ; do
80 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
81 done
82 }