wok view udev/receipt @ rev 9687
xorg-libXmu: clean up.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 06 21:41:32 2011 +0000 (2011-05-06) |
parents | 6a0b5f79f102 |
children | 4d303f80ad7a |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="166"
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 DEPENDS="glibc-base util-linux-ng-blkid"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config pciutils \
10 acl-dev libgio-dev libgio gobject-introspection usbutils usbutils-dev"
11 MAINTAINER="pankso@slitaz.org"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
14 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 gzip -d -c /usr/share/misc/pci.ids.gz > /usr/share/pci.ids
20 cd $src
21 grep -qs 'define u8' extras/*_id/*.c ||
22 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
23 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c
24 ./configure \
25 --prefix=/usr \
26 --exec-prefix="" \
27 --sysconfdir=/etc \
28 --libexecdir=/lib/udev \
29 --with-rootlibdir=/lib &&
30 make &&
31 make install &&
32 rm /usr/share/pci.ids
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/lib/firmware $fs/usr $fs/dev/.udev
40 cp -a $_pkg/sbin $fs
41 cp -a $_pkg/etc $fs
42 cp -a $_pkg/lib/libudev*so* $fs/lib
43 cp -a $_pkg/lib/udev $fs/lib
44 cp -a $_pkg/usr/lib $fs/usr
46 # Copy rules files to udev conf dir
47 mv -f $fs/lib/udev/rules.d $fs/etc/udev
48 cp $stuff/udev.conf $fs/etc/udev
49 cp $stuff/*.rules $fs/etc/udev/rules.d
50 # Fix permissions
51 chmod +x $fs/lib/udev/*
52 chown -R root.root $fs
53 }
55 pre_install()
56 {
57 # Remove old rules and libs
58 rm -rf $1/lib/udev/rules.d
59 rm -rf $1/lib/udev/vol_id
60 rm -f $1/lib/libvolume_id*
61 rm -f $1/lib/libudev.so.1.0
62 rm -f $1/lib/libudev.so.2.0
63 }
65 list_udev_group()
66 {
67 object=$1
68 [ -n "$object" ] || object=GROUP
69 grep $object /etc/udev/rules.d/* | \
70 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
71 }
73 post_install()
74 {
75 # Sanity check for udev+ldap boot
76 list_udev_group GROUP | while read x ; do
77 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
78 done
79 list_udev_group OWNER | while read x ; do
80 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
81 done
82 }