wok-current view udev/receipt @ rev 10078

Up: udev to 169. Add $CONFIGURE_ARGS.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri May 20 05:54:39 2011 +0000 (2011-05-20)
parents 5fd3793c22cb
children a8b249937127
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="169"
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 $CONFIGURE_ARGS &&
32 make &&
33 make install &&
34 rm /usr/share/pci.ids
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/lib/firmware $fs/usr $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
46 cp -a $_pkg/usr/lib $fs/usr
48 # Copy rules files to udev conf dir
49 mv -f $fs/lib/udev/rules.d $fs/etc/udev
50 cp $stuff/udev.conf $fs/etc/udev
51 cp $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 }