wok view udev-light/receipt @ rev 10037
gfortran: update host tools prefix
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 20 06:13:09 2011 +0200 (2011-05-20) |
parents | 11aa2220aadf |
children | a7a9578a4345 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev-light"
4 VERSION="168"
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 make &&
34 make install &&
35 rm /usr/share/pci.ids
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/lib/firmware $fs/run/udev
43 cp -a $_pkg/sbin $fs
44 cp -a $_pkg/etc $fs
45 cp -a $_pkg/lib/libudev*so* $fs/lib
46 cp -a $_pkg/lib/udev $fs/lib
48 # Copy rules files to udev conf dir
49 mv -f $fs/lib/udev/rules.d $fs/etc/udev
50 cp $WOK/$SOURCE/stuff/udev.conf $fs/etc/udev
51 cp $WOK/$SOURCE/stuff/*.rules $fs/etc/udev/rules.d
53 # Fix permissions
54 chmod +x $fs/lib/udev/*
55 chown -R root.root $fs
56 }
58 pre_install()
59 {
60 # Remove old rules and libs
61 rm -rf $1/lib/udev/rules.d
62 rm -rf $1/lib/udev/vol_id
63 rm -f $1/lib/libvolume_id*
64 rm -f $1/lib/libudev.so.1.0
65 rm -f $1/lib/libudev.so.2.0
66 }
68 list_udev_group()
69 {
70 object=$1
71 [ -n "$object" ] || object=GROUP
72 grep $object /etc/udev/rules.d/* | \
73 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
74 }
76 post_install()
77 {
78 # Sanity check for udev+ldap boot
79 list_udev_group GROUP | while read x ; do
80 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
81 done
82 list_udev_group OWNER | while read x ; do
83 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
84 done
85 }