wok view udev/receipt @ rev 5904

gst-plugins-good: fix for gcc 4.5.0
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 26 13:09:49 2010 +0200 (2010-07-26)
parents dc63242ab522
children 964f5d384827
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="156"
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 #sed -i s/u8/__u8/ /usr/include/scsi/scsi.h
20 cd $src
21 ./configure \
22 --prefix=/usr \
23 --exec-prefix="" \
24 --sysconfdir=/etc \
25 --libexecdir=/lib/udev \
26 --with-rootlibdir=/lib \
27 --enable-static \
28 --disable-extras \
29 --disable-introspection \
30 $CONFIGURE_ARGS &&
31 make &&
32 make DESTDIR=$PWD/_pkg install &&
33 gzip /usr/share/misc/pci.ids
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr \
40 $fs/dev/.udev
41 for dir in sbin etc lib
42 do
43 cp -a $_pkg/$dir $fs
44 done
46 # Remove -dev files
47 rm -rf $fs/lib/*.*a
48 rm -rf $fs/lib/pkgconfig
50 # Copy rules files to udev conf dir
51 mv -f $fs/lib/udev/rules.d $fs/etc/udev
52 cp stuff/udev.conf $fs/etc/udev
53 cp stuff/*.rules $fs/etc/udev/rules.d
54 # Fix permissions
55 chmod +x $fs/lib/udev/*
56 chown -R root.root $fs
57 }
59 pre_install()
60 {
61 # Remove old rules and libs
62 rm -rf $1/lib/udev/rules.d
63 rm -rf $1/lib/udev/vol_id
64 rm -f $1/lib/libvolume_id*
65 rm -f $1/lib/libudev.so.1.0
66 rm -f $1/lib/libudev.so.2.0
67 }
69 list_udev_group()
70 {
71 object=$1
72 [ -n "$object" ] || object=GROUP
73 grep $object /etc/udev/rules.d/* | \
74 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
75 }
77 post_install()
78 {
79 # Sanity check for udev+ldap boot
80 list_udev_group GROUP | while read x ; do
81 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
82 done
83 list_udev_group OWNER | while read x ; do
84 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
85 done
86 }