wok-6.x annotate udev/receipt @ rev 10022
FIX: pycripto (add bdeps)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Thu May 19 14:16:09 2011 +0000 (2011-05-19) |
parents | 4d303f80ad7a |
children | a7a9578a4345 |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@9805 | 4 VERSION="168" |
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@5 | 8 MAINTAINER="pankso@slitaz.org" |
slaxemulator@7682 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@5 | 10 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
pankso@5 | 11 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" |
pankso@5 | 12 |
pankso@9805 | 13 DEPENDS="util-linux-ng-blkid" |
pankso@9753 | 14 BUILD_DEPENDS="util-linux-ng-blkid-dev gperf pkg-config pciutils acl-dev \ |
pankso@9805 | 15 libgio-dev gobject-introspection-dev usbutils-dev libusb-dev" |
pankso@9753 | 16 |
pankso@5 | 17 # Rules to configure and make the package. |
pankso@5 | 18 compile_rules() |
pankso@5 | 19 { |
gokhlayeh@8055 | 20 gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids |
pankso@5 | 21 cd $src |
pascal@6113 | 22 grep -qs 'define u8' extras/*_id/*.c || |
pascal@6113 | 23 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \ |
pascal@6113 | 24 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c |
pankso@1261 | 25 ./configure \ |
pankso@1261 | 26 --prefix=/usr \ |
pankso@1270 | 27 --exec-prefix="" \ |
pankso@1261 | 28 --sysconfdir=/etc \ |
pankso@3821 | 29 --libexecdir=/lib/udev \ |
slaxemulator@9685 | 30 --with-rootlibdir=/lib && |
pankso@3706 | 31 make && |
slaxemulator@9685 | 32 make 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 { |
pankso@9805 | 39 mkdir -p $fs/lib/firmware $fs/usr $fs/run/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 |
slaxemulator@9685 | 49 cp $stuff/udev.conf $fs/etc/udev |
slaxemulator@9685 | 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 } |