wok annotate udev/receipt @ rev 3788
Up: python-bpython (0.9.4)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Fri Jul 31 23:42:56 2009 +0000 (2009-07-31) |
parents | f060e21dde4c |
children | 290869e0529e |
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." |
rcx@3782 | 8 DEPENDS="glibc-base util-linux-ng-blkid glib acl attr libusb libusb-compat" |
rcx@3782 | 9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config glib-dev \ |
rcx@3782 | 10 libusb-dev usbutils-dev pciutils" |
pankso@5 | 11 MAINTAINER="pankso@slitaz.org" |
pankso@5 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@5 | 13 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
pankso@5 | 14 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" |
pankso@5 | 15 |
pankso@5 | 16 # Rules to configure and make the package. |
pankso@5 | 17 compile_rules() |
pankso@5 | 18 { |
pankso@5 | 19 cd $src |
pankso@1261 | 20 ./configure \ |
pankso@1261 | 21 --prefix=/usr \ |
pankso@1270 | 22 --exec-prefix="" \ |
pankso@1261 | 23 --sysconfdir=/etc \ |
pascal@1535 | 24 --enable-static \ |
pascal@1535 | 25 $CONFIGURE_ARGS && |
pankso@3706 | 26 make && |
pankso@1270 | 27 make DESTDIR=$PWD/_pkg install |
pankso@5 | 28 } |
pankso@5 | 29 |
pankso@5 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 31 genpkg_rules() |
pankso@5 | 32 { |
pankso@3149 | 33 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib |
rcx@3782 | 34 for dir in sbin etc lib libexec |
pankso@3149 | 35 do |
pankso@3149 | 36 cp -a $_pkg/$dir $fs |
pascal@1878 | 37 done |
rocky@3496 | 38 ln -s /lib/libudev.so.0.3.0 $fs/usr/lib/libudev.so |
pankso@789 | 39 |
rcx@3782 | 40 # Remove -dev files |
rcx@3782 | 41 rm -rf $fs/lib/*.*a |
rcx@3782 | 42 rm -rf $fs/lib/pkgconfig |
rcx@3782 | 43 |
erjo@1988 | 44 # Copy rules files to udev conf dir |
rcx@3782 | 45 mv $fs/libexec/rules.d $fs/etc/udev |
pankso@5 | 46 cp stuff/udev.conf $fs/etc/udev |
pankso@5 | 47 cp stuff/90-permissions.rules $fs/etc/udev/rules.d |
pankso@3149 | 48 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d |
pankso@3149 | 49 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d |
pankso@2273 | 50 # Fix permissions |
pankso@3149 | 51 chmod +x $fs/lib/udev/* |
pankso@3149 | 52 chown -R root.root $fs |
pankso@5 | 53 } |
pankso@2085 | 54 |
pankso@3149 | 55 pre_install() |
pankso@2085 | 56 { |
pankso@3149 | 57 # Remove old rules and libs |
pankso@3149 | 58 rm -rf $1/lib/udev/rules.d |
pankso@3149 | 59 rm -rf $1/lib/udev/vol_id |
pankso@3149 | 60 rm -f $1/lib/libvolume_id* |
pankso@3149 | 61 rm -f $1/lib/libudev.so.1.0 |
pankso@3149 | 62 rm -f $1/lib/libudev.so.2.0 |
pankso@2085 | 63 } |
pascal@3174 | 64 |
pascal@3174 | 65 list_udev_group() |
pascal@3174 | 66 { |
pascal@3174 | 67 object=$1 |
pascal@3174 | 68 [ -n "$object" ] || object=GROUP |
pascal@3174 | 69 grep $object /etc/udev/rules.d/* | \ |
pascal@3174 | 70 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq |
pascal@3174 | 71 } |
pascal@3174 | 72 |
pascal@3174 | 73 post_install() |
pascal@3174 | 74 { |
pascal@3174 | 75 # Sanity check for udev+ldap boot |
pascal@3174 | 76 list_udev_group GROUP | while read x ; do |
pankso@3195 | 77 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x |
pascal@3174 | 78 done |
pascal@3174 | 79 list_udev_group OWNER | while read x ; do |
pankso@3195 | 80 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 81 done |
pascal@3174 | 82 } |