wok-next view udev/receipt @ rev 3733

add esound-dev
author Allan Pinto <allan316@gmail.com>
date Thu Jul 23 11:21:33 2009 +0000 (2009-07-23)
parents 224ef4a84da2
children 70fd687c2f6b
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="util-linux-ng-blkid glib"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config glib-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 &&
26 make DESTDIR=$PWD/_pkg install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib
33 for dir in sbin etc lib
34 do
35 cp -a $_pkg/$dir $fs
36 done
37 ln -s /lib/libudev.so.0.3.0 $fs/usr/lib/libudev.so
39 # Copy rules files to udev conf dir
40 mv $fs/lib/udev/rules.d $fs/etc/udev
41 cp stuff/udev.conf $fs/etc/udev
42 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
43 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
44 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
45 # Fix permissions
46 chmod +x $fs/lib/udev/*
47 chown -R root.root $fs
48 }
50 pre_install()
51 {
52 # Remove old rules and libs
53 rm -rf $1/lib/udev/rules.d
54 rm -rf $1/lib/udev/vol_id
55 rm -f $1/lib/libvolume_id*
56 rm -f $1/lib/libudev.so.1.0
57 rm -f $1/lib/libudev.so.2.0
58 }
60 list_udev_group()
61 {
62 object=$1
63 [ -n "$object" ] || object=GROUP
64 grep $object /etc/udev/rules.d/* | \
65 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
66 }
68 post_install()
69 {
70 # Sanity check for udev+ldap boot
71 list_udev_group GROUP | while read x ; do
72 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
73 done
74 list_udev_group OWNER | while read x ; do
75 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
76 done
77 }