wok-4.x view udev/receipt @ rev 4035
Add: PuTTY
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Mon Sep 07 17:17:20 2009 +0000 (2009-09-07) |
parents | 290869e0529e |
children | 822a67bd7150 |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="145"
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 glib acl attr libusb libusb-compat"
9 BUILD_DEPENDS="$DEPENDS util-linux-ng-blkid-dev gperf pkg-config glib-dev \
10 libusb-dev usbutils-dev pciutils acl-dev"
11 MAINTAINER="pankso@slitaz.org"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WEB_SITE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
14 WGET_URL="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 gzip -d /usr/share/misc/pci.ids.gz
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 $CONFIGURE_ARGS &&
29 make &&
30 make DESTDIR=$PWD/_pkg install &&
31 gzip /usr/share/misc/pci.ids
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/lib/firmware $fs/etc/udev $fs/usr/lib
38 for dir in sbin etc lib
39 do
40 cp -a $_pkg/$dir $fs
41 done
42 ln -s /lib/libudev.so.0.3.0 $fs/lib/libudev.so
44 # Remove -dev files
45 rm -rf $fs/lib/*.*a
46 rm -rf $fs/lib/pkgconfig
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/90-permissions.rules $fs/etc/udev/rules.d
52 cp $src/rules/packages/40-alsa.rules $fs/etc/udev/rules.d
53 cp $src/rules/packages/40-zaptel.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 }