wok-6.x annotate udev/receipt @ rev 9647
Up: thunderbird to 3.1.10.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Apr 29 01:18:34 2011 +0000 (2011-04-29) |
parents | 9e1674525e2f |
children | 8bf4d41a09dd |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
gokhlayeh@8624 | 4 VERSION="166" |
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@4119 | 8 DEPENDS="glibc-base util-linux-ng-blkid" |
gokhlayeh@8055 | 9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config pciutils \ |
gokhlayeh@8055 | 10 acl-dev libgio-dev libgio gobject-introspection usbutils usbutils-dev" |
pankso@5 | 11 MAINTAINER="pankso@slitaz.org" |
slaxemulator@7682 | 12 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
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 { |
gokhlayeh@8055 | 19 gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids |
pankso@5 | 20 cd $src |
pascal@6113 | 21 grep -qs 'define u8' extras/*_id/*.c || |
pascal@6113 | 22 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \ |
pascal@6113 | 23 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c |
pankso@1261 | 24 ./configure \ |
pankso@1261 | 25 --prefix=/usr \ |
pankso@1270 | 26 --exec-prefix="" \ |
pankso@1261 | 27 --sysconfdir=/etc \ |
pankso@3821 | 28 --libexecdir=/lib/udev \ |
pankso@3821 | 29 --with-rootlibdir=/lib \ |
pascal@1535 | 30 $CONFIGURE_ARGS && |
pankso@3706 | 31 make && |
pankso@3830 | 32 make DESTDIR=$PWD/_pkg install && |
gokhlayeh@8055 | 33 rm /usr/share/pci.ids |
pankso@5 | 34 } |
pankso@5 | 35 |
pankso@5 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 37 genpkg_rules() |
pankso@5 | 38 { |
gokhlayeh@8055 | 39 mkdir -p $fs/lib/firmware $fs/usr $fs/dev/.udev |
pankso@789 | 40 |
gokhlayeh@8055 | 41 cp -a $_pkg/sbin $fs |
gokhlayeh@8055 | 42 cp -a $_pkg/etc $fs |
gokhlayeh@8055 | 43 cp -a $_pkg/lib/libudev*so* $fs/lib |
gokhlayeh@8055 | 44 cp -a $_pkg/lib/udev $fs/lib |
gokhlayeh@8055 | 45 cp -a $_pkg/usr/lib $fs/usr |
rcx@3782 | 46 |
erjo@1988 | 47 # Copy rules files to udev conf dir |
pankso@3821 | 48 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
pankso@5 | 49 cp stuff/udev.conf $fs/etc/udev |
pankso@4832 | 50 cp stuff/*.rules $fs/etc/udev/rules.d |
pankso@2273 | 51 # Fix permissions |
pankso@3149 | 52 chmod +x $fs/lib/udev/* |
pankso@3149 | 53 chown -R root.root $fs |
pankso@5 | 54 } |
pankso@2085 | 55 |
pankso@3149 | 56 pre_install() |
pankso@2085 | 57 { |
pankso@3149 | 58 # Remove old rules and libs |
pankso@3149 | 59 rm -rf $1/lib/udev/rules.d |
pankso@3149 | 60 rm -rf $1/lib/udev/vol_id |
pankso@3149 | 61 rm -f $1/lib/libvolume_id* |
pankso@3149 | 62 rm -f $1/lib/libudev.so.1.0 |
pankso@3149 | 63 rm -f $1/lib/libudev.so.2.0 |
pankso@2085 | 64 } |
pascal@3174 | 65 |
pascal@3174 | 66 list_udev_group() |
pascal@3174 | 67 { |
pascal@3174 | 68 object=$1 |
pascal@3174 | 69 [ -n "$object" ] || object=GROUP |
pascal@3174 | 70 grep $object /etc/udev/rules.d/* | \ |
pascal@3174 | 71 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq |
pascal@3174 | 72 } |
pascal@3174 | 73 |
pascal@3174 | 74 post_install() |
pascal@3174 | 75 { |
pascal@3174 | 76 # Sanity check for udev+ldap boot |
pascal@3174 | 77 list_udev_group GROUP | while read x ; do |
pankso@7874 | 78 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
pascal@3174 | 79 done |
pascal@3174 | 80 list_udev_group OWNER | while read x ; do |
pankso@3195 | 81 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 82 done |
pascal@3174 | 83 } |