wok-4.x annotate udev/receipt @ rev 2273
udev: fix writing rules (net + cd)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 18 15:31:33 2009 +0100 (2009-02-18) |
parents | f5075e7ed779 |
children | 16450052086f |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@2085 | 4 VERSION="137" |
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" |
pankso@5 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
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@5 | 13 # Rules to configure and make the package. |
pankso@5 | 14 compile_rules() |
pankso@5 | 15 { |
pankso@5 | 16 cd $src |
pankso@1261 | 17 ./configure \ |
pankso@1261 | 18 --prefix=/usr \ |
pankso@1270 | 19 --exec-prefix="" \ |
pankso@1261 | 20 --sysconfdir=/etc \ |
pascal@1535 | 21 --enable-static \ |
pascal@1535 | 22 $CONFIGURE_ARGS && |
pankso@789 | 23 make EXTRAS="extras/firmware extras/scsi_id extras/volume_id \ |
pascal@1535 | 24 extras/ata_id extras/usb_id extras/cdrom_id" && |
pankso@1270 | 25 make DESTDIR=$PWD/_pkg install |
pankso@5 | 26 } |
pankso@5 | 27 |
pankso@5 | 28 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 29 genpkg_rules() |
pankso@5 | 30 { |
pankso@2085 | 31 mkdir -p $fs/lib/firmware $fs/etc/udev |
pankso@789 | 32 |
pankso@1261 | 33 cp -a $_pkg/sbin $fs |
pankso@1261 | 34 cp -a $_pkg/etc $fs |
pankso@1261 | 35 cp -a $_pkg/lib $fs |
pascal@1878 | 36 for i in libudev.so libvolume_id.so; do |
pascal@1878 | 37 [ -f $fs/lib/$i ] || ( cd $fs/lib ; ln -s $i.*.* $i) |
pascal@1878 | 38 done |
pankso@789 | 39 |
erjo@1988 | 40 # Copy rules files to udev conf dir |
pankso@2085 | 41 mv $fs/lib/udev/rules.d $fs/etc/udev |
pankso@5 | 42 cp stuff/udev.conf $fs/etc/udev |
pankso@5 | 43 cp stuff/90-permissions.rules $fs/etc/udev/rules.d |
pankso@1261 | 44 cp -a $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d |
pankso@2265 | 45 |
pankso@2265 | 46 # Fix pcmciautils path |
pankso@2265 | 47 sed -i s'|/lib/udev/pcmcia-check-broken-cis|/sbin/pcmcia-check-broken-cis' \ |
pankso@2265 | 48 $fs/etc/udev/rules.d/60-pcmcia.rules |
pankso@2265 | 49 sed -i s'|/lib/udev/pcmcia-socket-startup|/sbin/pcmcia-socket-startup|' \ |
pankso@2265 | 50 $fs/etc/udev/rules.d/60-pcmcia.rules |
pankso@2273 | 51 # Fix permissions |
pankso@2273 | 52 chmod +x $fs/lib/udev/write* |
pankso@5 | 53 } |
pankso@2085 | 54 |
pankso@2085 | 55 post_install() |
pankso@2085 | 56 { |
pankso@2085 | 57 local root |
pankso@2085 | 58 root=$1 |
pankso@2085 | 59 # Remove old rules |
pankso@2085 | 60 rm -rf $1/lib/udev/rules.d 2>/dev/null |
pankso@2085 | 61 } |