wok-4.x annotate udev/receipt @ rev 3821
Up + fix: udev (145)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Aug 06 15:23:24 2009 +0200 (2009-08-06) |
parents | f2ddecc4a3ff |
children | 748ea6277c88 |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@3821 | 4 VERSION="145" |
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 \ |
pankso@3821 | 10 libusb-dev usbutils-dev pciutils acl-dev" |
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 \ |
pankso@3821 | 24 --libexecdir=/lib/udev \ |
pankso@3821 | 25 --with-rootlibdir=/lib \ |
pascal@1535 | 26 --enable-static \ |
pascal@1535 | 27 $CONFIGURE_ARGS && |
pankso@3706 | 28 make && |
pankso@1270 | 29 make DESTDIR=$PWD/_pkg install |
pankso@5 | 30 } |
pankso@5 | 31 |
pankso@5 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 33 genpkg_rules() |
pankso@5 | 34 { |
pankso@3149 | 35 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib |
pankso@3821 | 36 for dir in sbin etc lib |
pankso@3149 | 37 do |
pankso@3149 | 38 cp -a $_pkg/$dir $fs |
pascal@1878 | 39 done |
pankso@3821 | 40 ln -s /lib/libudev.so.0.3.0 $fs/lib/libudev.so |
pankso@789 | 41 |
rcx@3782 | 42 # Remove -dev files |
rcx@3782 | 43 rm -rf $fs/lib/*.*a |
rcx@3782 | 44 rm -rf $fs/lib/pkgconfig |
rcx@3782 | 45 |
erjo@1988 | 46 # Copy rules files to udev conf dir |
pankso@3821 | 47 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
pankso@5 | 48 cp stuff/udev.conf $fs/etc/udev |
pankso@5 | 49 cp stuff/90-permissions.rules $fs/etc/udev/rules.d |
pankso@3149 | 50 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d |
pankso@3149 | 51 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d |
pankso@2273 | 52 # Fix permissions |
pankso@3149 | 53 chmod +x $fs/lib/udev/* |
pankso@3149 | 54 chown -R root.root $fs |
pankso@5 | 55 } |
pankso@2085 | 56 |
pankso@3149 | 57 pre_install() |
pankso@2085 | 58 { |
pankso@3149 | 59 # Remove old rules and libs |
pankso@3149 | 60 rm -rf $1/lib/udev/rules.d |
pankso@3149 | 61 rm -rf $1/lib/udev/vol_id |
pankso@3149 | 62 rm -f $1/lib/libvolume_id* |
pankso@3149 | 63 rm -f $1/lib/libudev.so.1.0 |
pankso@3149 | 64 rm -f $1/lib/libudev.so.2.0 |
pankso@2085 | 65 } |
pascal@3174 | 66 |
pascal@3174 | 67 list_udev_group() |
pascal@3174 | 68 { |
pascal@3174 | 69 object=$1 |
pascal@3174 | 70 [ -n "$object" ] || object=GROUP |
pascal@3174 | 71 grep $object /etc/udev/rules.d/* | \ |
pascal@3174 | 72 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq |
pascal@3174 | 73 } |
pascal@3174 | 74 |
pascal@3174 | 75 post_install() |
pascal@3174 | 76 { |
pascal@3174 | 77 # Sanity check for udev+ldap boot |
pascal@3174 | 78 list_udev_group GROUP | while read x ; do |
pankso@3195 | 79 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x |
pascal@3174 | 80 done |
pascal@3174 | 81 list_udev_group OWNER | while read x ; do |
pankso@3195 | 82 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 83 done |
pascal@3174 | 84 } |