wok-6.x annotate udev/receipt @ rev 4785

python: back to 2.5.1. Unwanted commit.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Jan 16 23:07:49 2010 +0100 (2010-01-16)
parents e5746ed8d8cb
children dc63242ab522
rev   line source
pankso@5 1 # SliTaz package receipt.
pankso@5 2
pankso@5 3 PACKAGE="udev"
pankso@4751 4 VERSION="150"
pascal@1890 5 BUILD_WARNING="Install new udev package and rebuild hal"
pankso@210 6 CATEGORY="base-system"
pankso@5 7 SHORT_DESC="Udev creat automaticly right devices in /dev."
pankso@4119 8 DEPENDS="glibc-base util-linux-ng-blkid"
pankso@4119 9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config pciutils"
pankso@5 10 MAINTAINER="pankso@slitaz.org"
pankso@5 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@5 12 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
pankso@5 13 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
pankso@5 14
pankso@5 15 # Rules to configure and make the package.
pankso@5 16 compile_rules()
pankso@5 17 {
pankso@3830 18 gzip -d /usr/share/misc/pci.ids.gz
pankso@5 19 cd $src
pankso@1261 20 ./configure \
pankso@1261 21 --prefix=/usr \
pankso@1270 22 --exec-prefix="" \
pankso@1261 23 --sysconfdir=/etc \
pankso@3821 24 --libexecdir=/lib/udev \
pankso@3821 25 --with-rootlibdir=/lib \
pascal@1535 26 --enable-static \
pankso@4119 27 --disable-extras \
pankso@4573 28 --disable-introspection \
pascal@1535 29 $CONFIGURE_ARGS &&
pankso@3706 30 make &&
pankso@3830 31 make DESTDIR=$PWD/_pkg install &&
pankso@3830 32 gzip /usr/share/misc/pci.ids
pankso@5 33 }
pankso@5 34
pankso@5 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 36 genpkg_rules()
pankso@5 37 {
pankso@4341 38 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr \
pankso@4341 39 $fs/dev/.udev
pankso@3821 40 for dir in sbin etc lib
pankso@3149 41 do
pankso@3149 42 cp -a $_pkg/$dir $fs
pascal@1878 43 done
pankso@4119 44 #cp -a $_pkg/usr/lib $fs/usr
pankso@4119 45 #ln -s /lib/libudev.so.0.3.0 $fs/lib/libudev.so
pankso@789 46
rcx@3782 47 # Remove -dev files
rcx@3782 48 rm -rf $fs/lib/*.*a
rcx@3782 49 rm -rf $fs/lib/pkgconfig
rcx@3782 50
erjo@1988 51 # Copy rules files to udev conf dir
pankso@3821 52 mv -f $fs/lib/udev/rules.d $fs/etc/udev
pankso@5 53 cp stuff/udev.conf $fs/etc/udev
pankso@5 54 cp stuff/90-permissions.rules $fs/etc/udev/rules.d
pankso@4240 55 cp stuff/92-hal.rules $fs/etc/udev/rules.d
pankso@4573 56 #cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
pankso@3149 57 cp $src/rules/packages/40-zaptel.rules $fs/etc/udev/rules.d
pankso@2273 58 # Fix permissions
pankso@3149 59 chmod +x $fs/lib/udev/*
pankso@3149 60 chown -R root.root $fs
pankso@5 61 }
pankso@2085 62
pankso@3149 63 pre_install()
pankso@2085 64 {
pankso@3149 65 # Remove old rules and libs
pankso@3149 66 rm -rf $1/lib/udev/rules.d
pankso@3149 67 rm -rf $1/lib/udev/vol_id
pankso@3149 68 rm -f $1/lib/libvolume_id*
pankso@3149 69 rm -f $1/lib/libudev.so.1.0
pankso@3149 70 rm -f $1/lib/libudev.so.2.0
pankso@2085 71 }
pascal@3174 72
pascal@3174 73 list_udev_group()
pascal@3174 74 {
pascal@3174 75 object=$1
pascal@3174 76 [ -n "$object" ] || object=GROUP
pascal@3174 77 grep $object /etc/udev/rules.d/* | \
pascal@3174 78 sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
pascal@3174 79 }
pascal@3174 80
pascal@3174 81 post_install()
pascal@3174 82 {
pascal@3174 83 # Sanity check for udev+ldap boot
pascal@3174 84 list_udev_group GROUP | while read x ; do
pankso@3195 85 grep -q ^$x: $1/etc/group || chroot $1/ addgroup $x
pascal@3174 86 done
pascal@3174 87 list_udev_group OWNER | while read x ; do
pankso@3195 88 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
pascal@3174 89 done
pascal@3174 90 }