wok-6.x view udev/receipt @ rev 11152

ekiga: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 02 08:35:14 2011 +0100 (2011-11-02)
parents ffc5c60a9d3f
children 329bc88c9d17
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="170"
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 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 $CONFIGURE_ARGS \
25 --prefix=/usr \
26 --exec-prefix="" \
27 --sysconfdir=/etc \
28 --libexecdir=/lib/udev \
29 --with-rootlibdir=/lib \
30 --with-pci-ids-path=/usr/share/misc/pci.ids.gz &&
31 make && make install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/lib/firmware $fs/usr $fs/run/udev
39 cp -a $_pkg/sbin $fs
40 cp -a $_pkg/etc $fs
41 cp -a $_pkg/lib/libudev*so* $fs/lib
42 cp -a $_pkg/lib/udev $fs/lib
43 cp -a $_pkg/usr/lib $fs/usr
45 # OLD: Copy rules files to udev conf dir
46 mv -f $fs/lib/udev/rules.d $fs/etc/udev
47 cp $stuff/udev.conf $fs/etc/udev
48 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 }