wok-4.x view udev-light/receipt @ rev 10383
udev-light: fix path to pci.ids
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 23 18:07:41 2011 +0200 (2011-05-23) |
parents | a8b249937127 |
children | fa204e3bccff |
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 cd $src
22 grep -qs 'define u8' extras/*_id/*.c ||
23 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
24 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c
25 ./configure $CONFIGURE_ARGS \
26 --prefix=/usr \
27 --exec-prefix="" \
28 --sysconfdir=/etc \
29 --libexecdir=/lib/udev \
30 --with-rootlibdir=/lib \
31 --disable-extras \
32 --with-pci-ids-path=/usr/share/misc/pci.ids.gz &&
33 make &&
34 make install &&
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/lib/firmware $fs/run/udev
42 cp -a $_pkg/sbin $fs
43 cp -a $_pkg/etc $fs
44 cp -a $_pkg/lib/libudev*so* $fs/lib
45 cp -a $_pkg/lib/udev $fs/lib
47 # Copy rules files to udev conf dir
48 mv -f $fs/lib/udev/rules.d $fs/etc/udev
49 cp $WOK/$SOURCE/stuff/udev.conf $fs/etc/udev
50 cp $WOK/$SOURCE/stuff/*.rules $fs/etc/udev/rules.d
52 # Fix permissions
53 chmod +x $fs/lib/udev/*
54 chown -R root.root $fs
55 }
57 pre_install()
58 {
59 # Remove old rules and libs
60 rm -rf $1/lib/udev/rules.d
61 rm -rf $1/lib/udev/vol_id
62 rm -f $1/lib/libvolume_id*
63 rm -f $1/lib/libudev.so.1.0
64 rm -f $1/lib/libudev.so.2.0
65 }
67 list_udev_group()
68 {
69 object=$1
70 [ -n "$object" ] || object=GROUP
71 grep $object /etc/udev/rules.d/* | \
72 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
73 }
75 post_install()
76 {
77 # Sanity check for udev+ldap boot
78 list_udev_group GROUP | while read x ; do
79 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
80 done
81 list_udev_group OWNER | while read x ; do
82 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
83 done
84 }