wok-next view eudev/receipt @ rev 20430
fake-sane: fix copy-paste typo
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jan 24 13:29:11 2018 +0200 (2018-01-24) |
parents | 250165915708 |
children | 90a5eb560fd6 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="eudev"
4 VERSION="3.2.4"
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 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/eudev.html"
11 PROVIDE="udev"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="${WEB_SITE}$TARBALL"
15 TARBALL_MD5="66acef4c6094aab4aced7ae83b74b0d2"
17 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf kmod-dev"
18 SPLIT="eudev-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
24 sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c
25 cat > config.cache <<"EOF"
26 HAVE_BLKID=1
27 BLKID_LIBS="-lblkid"
28 BLKID_CFLAGS="-I/include"
29 EOF
31 ./configure \
32 --bindir=/sbin \
33 --sbindir=/sbin \
34 --libdir=/usr/lib \
35 --sysconfdir=/etc \
36 --libexecdir=/lib \
37 --with-rootprefix= \
38 --with-rootlibdir=/lib \
39 --enable-manpages \
40 --disable-static \
41 --config-cache \
42 --enable-kmod \
43 $CONFIGURE_ARGS &&
44 make &&
45 make install
47 cp $stuff/*.rules $install/etc/udev/rules.d
48 cp -a $stuff/udev/* $install/lib/udev
50 mkdir -p "$install/lib/firmware" "$install/lib/udev/keymaps/force-release"
52 chown -R root:root $install
54 # https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html
55 # /lib/udev/rules.d : default rules files. Do not edit these files.
56 # /etc/udev/rules.d : customized rules files. You can modify these files
57 # Rules files in /etc/udev/rules.d override files of the same name
58 # in /lib/udev/rules.d.
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 case $PACKAGE in
65 eudev)
66 copy @std
67 DEPENDS="kmod liblzma util-linux-blkid util-linux-uuid zlib dbus"
68 PROVIDE="udev"
69 ;;
70 eudev-dev)
71 copy @dev
72 PROVIDE="udev-dev"
73 ;;
74 esac
75 }
77 post_install_eudev() {
78 # Create some devices and directories that Udev cannot handle
79 # due to them being required very early in the boot process
80 mkdir -p "$1/lib/udev/devices/pts"
81 mkdir -p "$1/lib/udev/devices/shm"
82 [ -e "$1/lib/udev/devices/null" ] || mknod -m 0666 "$1/lib/udev/devices/null" c 1 3
84 # Sanity check for udev+ldap boot
85 grep GROUP= "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
86 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
87 while read x; do
88 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
89 done
91 grep OWNER= "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
92 sed 's/.*OWNER="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
93 while read x; do
94 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
95 done
96 }