wok-current view udev/receipt @ rev 9963
dahdi-tools: fix bdeps
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 18 15:55:36 2011 +0200 (2011-05-18) |
parents | 4d303f80ad7a |
children | a7a9578a4345 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="168"
5 BUILD_WARNING="Install new udev package and rebuild hal"
6 CATEGORY="base-system"
7 SHORT_DESC="Udev creat automaticly right devices in /dev."
8 MAINTAINER="pankso@slitaz.org"
9 TARBALL="$PACKAGE-$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"
13 DEPENDS="util-linux-ng-blkid"
14 BUILD_DEPENDS="util-linux-ng-blkid-dev gperf pkg-config pciutils acl-dev \
15 libgio-dev gobject-introspection-dev usbutils-dev libusb-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids
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 \
26 --prefix=/usr \
27 --exec-prefix="" \
28 --sysconfdir=/etc \
29 --libexecdir=/lib/udev \
30 --with-rootlibdir=/lib &&
31 make &&
32 make install &&
33 rm /usr/share/pci.ids
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/lib/firmware $fs/usr $fs/run/udev
41 cp -a $_pkg/sbin $fs
42 cp -a $_pkg/etc $fs
43 cp -a $_pkg/lib/libudev*so* $fs/lib
44 cp -a $_pkg/lib/udev $fs/lib
45 cp -a $_pkg/usr/lib $fs/usr
47 # Copy rules files to udev conf dir
48 mv -f $fs/lib/udev/rules.d $fs/etc/udev
49 cp $stuff/udev.conf $fs/etc/udev
50 cp $stuff/*.rules $fs/etc/udev/rules.d
51 # Fix permissions
52 chmod +x $fs/lib/udev/*
53 chown -R root.root $fs
54 }
56 pre_install()
57 {
58 # Remove old rules and libs
59 rm -rf $1/lib/udev/rules.d
60 rm -rf $1/lib/udev/vol_id
61 rm -f $1/lib/libvolume_id*
62 rm -f $1/lib/libudev.so.1.0
63 rm -f $1/lib/libudev.so.2.0
64 }
66 list_udev_group()
67 {
68 object=$1
69 [ -n "$object" ] || object=GROUP
70 grep $object /etc/udev/rules.d/* | \
71 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
72 }
74 post_install()
75 {
76 # Sanity check for udev+ldap boot
77 list_udev_group GROUP | while read x ; do
78 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
79 done
80 list_udev_group OWNER | while read x ; do
81 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
82 done
83 }