wok-6.x annotate udev/receipt @ rev 11482
libxml2: add python as build_depend
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Dec 18 03:01:59 2011 +0100 (2011-12-18) |
parents | ffc5c60a9d3f |
children | 329bc88c9d17 |
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 |
pankso@10405 | 45 # OLD: 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 |
pankso@10918 | 48 cp $stuff/*.rules $fs/etc/udev/rules.d |
pankso@10405 | 49 |
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@7874 | 77 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $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 } |