wok-stable annotate udev/receipt @ rev 3706
Upgrade: udev (142 to 143)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Jul 20 00:52:43 2009 +0200 (2009-07-20) |
parents | 224ef4a84da2 |
children | 70fd687c2f6b |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@3706 | 4 VERSION="143" |
pascal@1890 | 5 BUILD_WARNING="Install new udev package and rebuild hal" |
pankso@210 | 6 CATEGORY="base-system" |
pankso@5 | 7 SHORT_DESC="Udev creat automaticly right devices in /dev." |
pankso@3706 | 8 DEPENDS="util-linux-ng-blkid glib" |
pankso@3706 | 9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config glib-dev" |
pankso@5 | 10 MAINTAINER="pankso@slitaz.org" |
pankso@5 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@5 | 12 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
pankso@5 | 13 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" |
pankso@5 | 14 |
pankso@5 | 15 # Rules to configure and make the package. |
pankso@5 | 16 compile_rules() |
pankso@5 | 17 { |
pankso@5 | 18 cd $src |
pankso@1261 | 19 ./configure \ |
pankso@1261 | 20 --prefix=/usr \ |
pankso@1270 | 21 --exec-prefix="" \ |
pankso@1261 | 22 --sysconfdir=/etc \ |
pascal@1535 | 23 --enable-static \ |
pascal@1535 | 24 $CONFIGURE_ARGS && |
pankso@3706 | 25 make && |
pankso@1270 | 26 make DESTDIR=$PWD/_pkg install |
pankso@5 | 27 } |
pankso@5 | 28 |
pankso@5 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 30 genpkg_rules() |
pankso@5 | 31 { |
pankso@3149 | 32 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib |
pankso@3149 | 33 for dir in sbin etc lib |
pankso@3149 | 34 do |
pankso@3149 | 35 cp -a $_pkg/$dir $fs |
pascal@1878 | 36 done |
rocky@3496 | 37 ln -s /lib/libudev.so.0.3.0 $fs/usr/lib/libudev.so |
pankso@789 | 38 |
erjo@1988 | 39 # Copy rules files to udev conf dir |
pankso@2085 | 40 mv $fs/lib/udev/rules.d $fs/etc/udev |
pankso@5 | 41 cp stuff/udev.conf $fs/etc/udev |
pankso@5 | 42 cp stuff/90-permissions.rules $fs/etc/udev/rules.d |
pankso@3149 | 43 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d |
pankso@3149 | 44 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d |
pankso@2273 | 45 # Fix permissions |
pankso@3149 | 46 chmod +x $fs/lib/udev/* |
pankso@3149 | 47 chown -R root.root $fs |
pankso@5 | 48 } |
pankso@2085 | 49 |
pankso@3149 | 50 pre_install() |
pankso@2085 | 51 { |
pankso@3149 | 52 # Remove old rules and libs |
pankso@3149 | 53 rm -rf $1/lib/udev/rules.d |
pankso@3149 | 54 rm -rf $1/lib/udev/vol_id |
pankso@3149 | 55 rm -f $1/lib/libvolume_id* |
pankso@3149 | 56 rm -f $1/lib/libudev.so.1.0 |
pankso@3149 | 57 rm -f $1/lib/libudev.so.2.0 |
pankso@2085 | 58 } |
pascal@3174 | 59 |
pascal@3174 | 60 list_udev_group() |
pascal@3174 | 61 { |
pascal@3174 | 62 object=$1 |
pascal@3174 | 63 [ -n "$object" ] || object=GROUP |
pascal@3174 | 64 grep $object /etc/udev/rules.d/* | \ |
pascal@3174 | 65 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq |
pascal@3174 | 66 } |
pascal@3174 | 67 |
pascal@3174 | 68 post_install() |
pascal@3174 | 69 { |
pascal@3174 | 70 # Sanity check for udev+ldap boot |
pascal@3174 | 71 list_udev_group GROUP | while read x ; do |
pankso@3195 | 72 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x |
pascal@3174 | 73 done |
pascal@3174 | 74 list_udev_group OWNER | while read x ; do |
pankso@3195 | 75 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 76 done |
pascal@3174 | 77 } |