wok-next view udev/receipt @ rev 3195
Udev: fix group path in receipt
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 27 11:52:33 2009 +0200 (2009-05-27) |
parents | 4d3d49a8f050 |
children | 224ef4a84da2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="142"
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="util-linux-ng-blkid"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev"
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 cd $src
19 ./configure \
20 --prefix=/usr \
21 --exec-prefix="" \
22 --sysconfdir=/etc \
23 --enable-static \
24 $CONFIGURE_ARGS &&
25 make DESTDIR=$PWD/_pkg install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib
32 for dir in sbin etc lib
33 do
34 cp -a $_pkg/$dir $fs
35 done
36 cp -a $_pkg/usr/lib/*.so $fs/usr/lib
38 # Copy rules files to udev conf dir
39 mv $fs/lib/udev/rules.d $fs/etc/udev
40 cp stuff/udev.conf $fs/etc/udev
41 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
42 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
43 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
44 # Fix permissions
45 chmod +x $fs/lib/udev/*
46 chown -R root.root $fs
47 }
49 pre_install()
50 {
51 # Remove old rules and libs
52 rm -rf $1/lib/udev/rules.d
53 rm -rf $1/lib/udev/vol_id
54 rm -f $1/lib/libvolume_id*
55 rm -f $1/lib/libudev.so.1.0
56 rm -f $1/lib/libudev.so.2.0
57 }
59 list_udev_group()
60 {
61 object=$1
62 [ -n "$object" ] || object=GROUP
63 grep $object /etc/udev/rules.d/* | \
64 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
65 }
67 post_install()
68 {
69 # Sanity check for udev+ldap boot
70 list_udev_group GROUP | while read x ; do
71 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
72 done
73 list_udev_group OWNER | while read x ; do
74 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
75 done
76 }