wok view udev-light/receipt @ rev 10240

Up: claws-mail to 3.7.9.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat May 21 01:36:49 2011 +0000 (2011-05-21)
parents 5916d99ede88
children 3fd8125e53f4
line source
1 # SliTaz package receipt.
3 PACKAGE="udev-light"
4 VERSION="170"
5 CATEGORY="base-system"
6 SHORT_DESC="Light Udev version without extras."
7 MAINTAINER="pankso@slitaz.org"
8 SOURCE="udev"
9 TARBALL="$SOURCE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
11 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
12 PROVIDE="udev"
14 DEPENDS="util-linux-ng-blkid"
15 BUILD_DEPENDS="util-linux-ng-blkid-dev gperf pkg-config pciutils \
16 gobject-introspection-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids
22 cd $src
23 grep -qs 'define u8' extras/*_id/*.c ||
24 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
25 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c
26 ./configure \
27 --prefix=/usr \
28 --exec-prefix="" \
29 --sysconfdir=/etc \
30 --libexecdir=/lib/udev \
31 --with-rootlibdir=/lib \
32 --disable-extras \
33 $CONFIGURE_ARGS &&
34 make &&
35 make install &&
36 rm /usr/share/pci.ids
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/lib/firmware $fs/run/udev
44 cp -a $_pkg/sbin $fs
45 cp -a $_pkg/etc $fs
46 cp -a $_pkg/lib/libudev*so* $fs/lib
47 cp -a $_pkg/lib/udev $fs/lib
49 # Copy rules files to udev conf dir
50 mv -f $fs/lib/udev/rules.d $fs/etc/udev
51 cp $WOK/$SOURCE/stuff/udev.conf $fs/etc/udev
52 cp $WOK/$SOURCE/stuff/*.rules $fs/etc/udev/rules.d
54 # Fix permissions
55 chmod +x $fs/lib/udev/*
56 chown -R root.root $fs
57 }
59 pre_install()
60 {
61 # Remove old rules and libs
62 rm -rf $1/lib/udev/rules.d
63 rm -rf $1/lib/udev/vol_id
64 rm -f $1/lib/libvolume_id*
65 rm -f $1/lib/libudev.so.1.0
66 rm -f $1/lib/libudev.so.2.0
67 }
69 list_udev_group()
70 {
71 object=$1
72 [ -n "$object" ] || object=GROUP
73 grep $object /etc/udev/rules.d/* | \
74 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
75 }
77 post_install()
78 {
79 # Sanity check for udev+ldap boot
80 list_udev_group GROUP | while read x ; do
81 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
82 done
83 list_udev_group OWNER | while read x ; do
84 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
85 done
86 }