wok-current view udev/receipt @ rev 15518
Up: thunderbird-langpack-pl (17.0.10esr)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Tue Nov 19 22:24:27 2013 +0100 (2013-11-19) |
parents | dac216ce48c5 |
children | b67414949731 |
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 LICENSE="GPL2"
10 TARBALL="$PACKAGE-$VERSION.tar.xz"
11 WEB_SITE="http://www.freedesktop.org/software/systemd/man/udev.html"
12 WGET_URL="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
14 DEPENDS="util-linux-blkid pciids usbids acl kmod"
15 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \
16 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
17 libgudev-dev pcre-dev liblzma-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 cd $src
23 ./configure \
24 --exec-prefix="" \
25 --with-rootprefix="" \
26 --bindir=/sbin \
27 --sysconfdir=/etc \
28 --libexecdir=/lib \
29 --disable-manpages \
30 --disable-introspection \
31 --disable-keymap \
32 --enable-floppy \
33 --enable-rule_generator \
34 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
35 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
36 --with-systemdsystemunitdir=no \
37 $CONFIGURE_ARGS &&
38 make && make install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p $fs/lib/firmware
46 cp -a $install/sbin $fs
47 cp -a $install/etc $fs
48 cp -a $install/lib/libudev*so* $fs/lib
49 cp -a $install/lib/udev $fs/lib
51 # Have udevd in PATH
52 mv $fs/lib/udev/udevd $fs/sbin
54 # Copy rules files to udev conf dir
55 mv -f $fs/lib/udev/rules.d $fs/etc/udev
56 cp $stuff/udev.conf $fs/etc/udev
57 cp $stuff/*.rules $fs/etc/udev/rules.d
59 # Create some devices and directories that Udev cannot handle
60 # due to them being required very early in the boot process
61 mkdir -p $fs/lib/udev/devices/pts
62 mkdir -p $fs/lib/udev/devices/shm
63 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
65 # Fix permissions
66 chmod +x $fs/lib/udev/*
67 chown -R root.root $fs
68 }
70 list_udev_group()
71 {
72 object=$2
73 [ -n "$object" ] || object=GROUP
74 grep $object $1/etc/udev/rules.d/* | \
75 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
76 }
78 post_install()
79 {
80 # Sanity check for udev+ldap boot
81 list_udev_group "$1" GROUP | while read x ; do
82 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
83 done
84 list_udev_group "$1" OWNER | while read x ; do
85 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
86 done
87 }