wok-next view eudev/receipt @ rev 19639

Up xcb-util-*
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Feb 13 02:58:19 2017 +0200 (2017-02-13)
parents 9e01bc6321ea
children c5336999f370
line source
1 # SliTaz package receipt.
3 PACKAGE="eudev"
4 VERSION="3.2"
5 CATEGORY="base-system"
6 SHORT_DESC="Programs for dynamic creation of device nodes"
7 MAINTAINER="tcg.thegamer@gmail.com"
8 LICENSE="GPL2"
9 WEB_SITE="http://dev.gentoo.org/~blueness/eudev/"
10 PROVIDE="udev"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}$TARBALL"
15 DEPENDS="dbus util-linux-blkid pciids usbids acl kmod"
16 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
22 cat > config.cache <<"EOF"
23 HAVE_BLKID=1
24 BLKID_LIBS="-lblkid"
25 BLKID_CFLAGS="-I/tools/include"
26 EOF
28 ./configure \
29 --bindir=/sbin \
30 --sbindir=/sbin \
31 --libdir=/usr/lib \
32 --sysconfdir=/etc \
33 --libexecdir=/lib \
34 --with-rootprefix= \
35 --with-rootlibdir=/lib \
36 --enable-manpages \
37 --disable-static \
38 --config-cache \
39 $CONFIGURE_ARGS &&
40 make &&
41 make install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/lib/firmware
49 cp -a $install/sbin $fs
50 cp -a $install/etc $fs
51 cp -a $install/lib/libudev.so* $fs/lib
52 cp -a $install/lib/udev $fs/lib
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
69 }
71 list_udev_group()
72 {
73 object=$2
74 [ -n "$object" ] || object=GROUP
75 grep $object "$1"/etc/udev/rules.d/* | \
76 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
77 }
79 post_install()
80 {
81 # Sanity check for udev+ldap boot
82 list_udev_group "$1" GROUP | \
83 while read x ; do
84 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
85 done
87 list_udev_group "$1" OWNER | \
88 while read x ; do
89 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
90 done
91 }