wok view udev/receipt @ rev 7088

Changed libsigc++ TARBALL to .tar.bz2.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Nov 03 01:09:57 2010 +0000 (2010-11-03)
parents 964f5d384827
children 31edb0bbba7b
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="163"
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 MAINTAINER="pankso@slitaz.org"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
13 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 gzip -d /usr/share/misc/pci.ids.gz
19 cd $src
20 grep -qs 'define u8' extras/*_id/*.c ||
21 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
22 extras/scsi_id/scsi_serial.c extras/ata_id/ata_id.c
23 ./configure \
24 --prefix=/usr \
25 --exec-prefix="" \
26 --sysconfdir=/etc \
27 --libexecdir=/lib/udev \
28 --with-rootlibdir=/lib \
29 --enable-static \
30 --disable-extras \
31 --disable-introspection \
32 $CONFIGURE_ARGS &&
33 make &&
34 make DESTDIR=$PWD/_pkg install &&
35 gzip /usr/share/misc/pci.ids
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr \
42 $fs/dev/.udev
43 for dir in sbin etc lib
44 do
45 cp -a $_pkg/$dir $fs
46 done
48 # Remove -dev files
49 rm -rf $fs/lib/*.*a
50 rm -rf $fs/lib/pkgconfig
52 # Copy rules files to udev conf dir
53 mv -f $fs/lib/udev/rules.d $fs/etc/udev
54 cp stuff/udev.conf $fs/etc/udev
55 cp stuff/*.rules $fs/etc/udev/rules.d
56 # Fix permissions
57 chmod +x $fs/lib/udev/*
58 chown -R root.root $fs
59 }
61 pre_install()
62 {
63 # Remove old rules and libs
64 rm -rf $1/lib/udev/rules.d
65 rm -rf $1/lib/udev/vol_id
66 rm -f $1/lib/libvolume_id*
67 rm -f $1/lib/libudev.so.1.0
68 rm -f $1/lib/libudev.so.2.0
69 }
71 list_udev_group()
72 {
73 object=$1
74 [ -n "$object" ] || object=GROUP
75 grep $object /etc/udev/rules.d/* | \
76 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
77 }
79 post_install()
80 {
81 # Sanity check for udev+ldap boot
82 list_udev_group GROUP | while read x ; do
83 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
84 done
85 list_udev_group OWNER | while read x ; do
86 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
87 done
88 }