wok-6.x annotate udev/receipt @ rev 10368
udev: yet another fix (needconfigure option at first and fix pci.ids path)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 23 03:27:32 2011 +0200 (2011-05-23) |
parents | a8b249937127 |
children | ffc5c60a9d3f |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
slaxemulator@10080 | 4 VERSION="170" |
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 { |
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@10368 | 24 ./configure $CONFIGURE_ARGS \ |
pankso@1261 | 25 --prefix=/usr \ |
pankso@1270 | 26 --exec-prefix="" \ |
pankso@1261 | 27 --sysconfdir=/etc \ |
pankso@3821 | 28 --libexecdir=/lib/udev \ |
pankso@10368 | 29 --with-rootlibdir=/lib \ |
pankso@10368 | 30 --with-pci-ids-path=/usr/share/misc/pci.ids.gz && |
pankso@10368 | 31 make && make install |
pankso@5 | 32 } |
pankso@5 | 33 |
pankso@5 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 35 genpkg_rules() |
pankso@5 | 36 { |
pankso@9805 | 37 mkdir -p $fs/lib/firmware $fs/usr $fs/run/udev |
pankso@789 | 38 |
gokhlayeh@8055 | 39 cp -a $_pkg/sbin $fs |
gokhlayeh@8055 | 40 cp -a $_pkg/etc $fs |
gokhlayeh@8055 | 41 cp -a $_pkg/lib/libudev*so* $fs/lib |
gokhlayeh@8055 | 42 cp -a $_pkg/lib/udev $fs/lib |
gokhlayeh@8055 | 43 cp -a $_pkg/usr/lib $fs/usr |
rcx@3782 | 44 |
erjo@1988 | 45 # Copy rules files to udev conf dir |
pankso@3821 | 46 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
slaxemulator@9685 | 47 cp $stuff/udev.conf $fs/etc/udev |
slaxemulator@9685 | 48 cp $stuff/*.rules $fs/etc/udev/rules.d |
pankso@2273 | 49 # Fix permissions |
pankso@3149 | 50 chmod +x $fs/lib/udev/* |
pankso@3149 | 51 chown -R root.root $fs |
pankso@5 | 52 } |
pankso@2085 | 53 |
pankso@3149 | 54 pre_install() |
pankso@2085 | 55 { |
pankso@3149 | 56 # Remove old rules and libs |
pankso@3149 | 57 rm -rf $1/lib/udev/rules.d |
pankso@3149 | 58 rm -rf $1/lib/udev/vol_id |
pankso@3149 | 59 rm -f $1/lib/libvolume_id* |
pankso@3149 | 60 rm -f $1/lib/libudev.so.1.0 |
pankso@3149 | 61 rm -f $1/lib/libudev.so.2.0 |
pankso@2085 | 62 } |
pascal@3174 | 63 |
pascal@3174 | 64 list_udev_group() |
pascal@3174 | 65 { |
pascal@3174 | 66 object=$1 |
pascal@3174 | 67 [ -n "$object" ] || object=GROUP |
pascal@3174 | 68 grep $object /etc/udev/rules.d/* | \ |
pascal@3174 | 69 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq |
pascal@3174 | 70 } |
pascal@3174 | 71 |
pascal@3174 | 72 post_install() |
pascal@3174 | 73 { |
pascal@3174 | 74 # Sanity check for udev+ldap boot |
pascal@3174 | 75 list_udev_group GROUP | while read x ; do |
pankso@7874 | 76 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
pascal@3174 | 77 done |
pascal@3174 | 78 list_udev_group OWNER | while read x ; do |
pankso@3195 | 79 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 80 done |
pascal@3174 | 81 } |