wok-6.x rev 9790
Add: udev-light (no extras so it build without usbutils and let us make iso with fresh packages from cookutils)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 13 18:24:14 2011 +0200 (2011-05-13) |
parents | 7fd6a3651947 |
children | 2325c41c9264 |
files | udev-light/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/udev-light/receipt Fri May 13 18:24:14 2011 +0200 1.3 @@ -0,0 +1,84 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="udev-light" 1.7 +VERSION="168" 1.8 +CATEGORY="base-system" 1.9 +SHORT_DESC="Light Udev version without extras." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +SOURCE="udev" 1.12 +TARBALL="$SOURCE-$VERSION.tar.bz2" 1.13 +WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" 1.14 +WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" 1.15 + 1.16 +DEPENDS="util-linux-ng-blkid" 1.17 +BUILD_DEPENDS="util-linux-ng-blkid-dev gperf pkg-config pciutils \ 1.18 +gobject-introspection-dev" 1.19 + 1.20 +# Rules to configure and make the package. 1.21 +compile_rules() 1.22 +{ 1.23 + gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids 1.24 + cd $src 1.25 + grep -qs 'define u8' extras/*_id/*.c || 1.26 + sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \ 1.27 + extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c 1.28 + ./configure \ 1.29 + --prefix=/usr \ 1.30 + --exec-prefix="" \ 1.31 + --sysconfdir=/etc \ 1.32 + --libexecdir=/lib/udev \ 1.33 + --with-rootlibdir=/lib \ 1.34 + --disable-extras && 1.35 + make && 1.36 + make install && 1.37 + rm /usr/share/pci.ids 1.38 +} 1.39 + 1.40 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.41 +genpkg_rules() 1.42 +{ 1.43 + mkdir -p $fs/lib/firmware $fs/dev/.udev 1.44 + 1.45 + cp -a $_pkg/sbin $fs 1.46 + cp -a $_pkg/etc $fs 1.47 + cp -a $_pkg/lib/libudev*so* $fs/lib 1.48 + cp -a $_pkg/lib/udev $fs/lib 1.49 + 1.50 + # Copy rules files to udev conf dir 1.51 + mv -f $fs/lib/udev/rules.d $fs/etc/udev 1.52 + cp $wanted_stuff/udev.conf $fs/etc/udev 1.53 + cp $wanted_stuff/*.rules $fs/etc/udev/rules.d 1.54 + 1.55 + # Fix permissions 1.56 + chmod +x $fs/lib/udev/* 1.57 + chown -R root.root $fs 1.58 +} 1.59 + 1.60 +pre_install() 1.61 +{ 1.62 + # Remove old rules and libs 1.63 + rm -rf $1/lib/udev/rules.d 1.64 + rm -rf $1/lib/udev/vol_id 1.65 + rm -f $1/lib/libvolume_id* 1.66 + rm -f $1/lib/libudev.so.1.0 1.67 + rm -f $1/lib/libudev.so.2.0 1.68 +} 1.69 + 1.70 +list_udev_group() 1.71 +{ 1.72 + object=$1 1.73 + [ -n "$object" ] || object=GROUP 1.74 + grep $object /etc/udev/rules.d/* | \ 1.75 + sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq 1.76 +} 1.77 + 1.78 +post_install() 1.79 +{ 1.80 + # Sanity check for udev+ldap boot 1.81 + list_udev_group GROUP | while read x ; do 1.82 + grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x 1.83 + done 1.84 + list_udev_group OWNER | while read x ; do 1.85 + grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x 1.86 + done 1.87 +}