wok-current view udev/receipt @ rev 14850
*vnc*: add LICENSE
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 18 10:30:42 2013 +0000 (2013-07-18) |
parents | 9358cad090a0 |
children | 380ffe05937a |
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="182"
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.xz"
10 WEB_SITE="http://www.freedesktop.org/software/systemd/man/udev.html"
11 WGET_URL="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
13 DEPENDS="util-linux-blkid pciids usbids acl kmod"
14 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \
15 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
16 libgudev-dev pcre-dev liblzma-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 ./configure \
23 --exec-prefix="" \
24 --with-rootprefix="" \
25 --bindir=/sbin \
26 --sysconfdir=/etc \
27 --libexecdir=/lib \
28 --disable-manpages \
29 --disable-introspection \
30 --disable-keymap \
31 --enable-floppy \
32 --enable-rule_generator \
33 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
34 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
35 --with-systemdsystemunitdir=no \
36 $CONFIGURE_ARGS &&
37 make && make install
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/lib/firmware
45 cp -a $install/sbin $fs
46 cp -a $install/etc $fs
47 cp -a $install/lib/libudev*so* $fs/lib
48 cp -a $install/lib/udev $fs/lib
50 # Have udevd in PATH
51 mv $fs/lib/udev/udevd $fs/sbin
53 # Copy rules files to udev conf dir
54 mv -f $fs/lib/udev/rules.d $fs/etc/udev
55 cp $stuff/udev.conf $fs/etc/udev
56 cp $stuff/*.rules $fs/etc/udev/rules.d
58 # Create some devices and directories that Udev cannot handle
59 # due to them being required very early in the boot process
60 mkdir -p $fs/lib/udev/devices/pts
61 mkdir -p $fs/lib/udev/devices/shm
62 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
64 # Fix permissions
65 chmod +x $fs/lib/udev/*
66 chown -R root.root $fs
67 }
69 list_udev_group()
70 {
71 object=$2
72 [ -n "$object" ] || object=GROUP
73 grep $object $1/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 "$1" GROUP | while read x ; do
81 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
82 done
83 list_udev_group "$1" OWNER | while read x ; do
84 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
85 done
86 }