wok-next view eudev/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | a3c581bf52b8 |
children | 5e01e6d2531a |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="eudev"
4 VERSION="3.2.5"
5 CATEGORY="base-system"
6 SHORT_DESC="Programs for dynamic creation of device nodes"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://dev.gentoo.org/~blueness/eudev/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/development/chapter06/eudev.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}$TARBALL"
14 TARBALL_MD5="6ca08c0e14380f87df8e8aceac123671"
16 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf kmod-dev"
17 SPLIT="$PACKAGE-dev"
19 compile_rules() {
20 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
21 sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c
22 cat > config.cache <<"EOF"
23 HAVE_BLKID=1
24 BLKID_LIBS="-lblkid"
25 BLKID_CFLAGS="-I/include"
26 EOF
28 ./configure \
29 --bindir=/sbin \
30 --sbindir=/sbin \
31 --libdir=/usr/lib \
32 --libexecdir=/lib \
33 --with-rootprefix= \
34 --with-rootlibdir=/lib \
35 --enable-manpages \
36 --disable-static \
37 --config-cache \
38 --enable-kmod \
39 $CONFIGURE_ARGS &&
40 fix libtool &&
41 make &&
42 make install || return 1
44 cp $stuff/*.rules $install/etc/udev/rules.d
45 cp -a $stuff/udev/* $install/lib/udev
47 mkdir -p "$install/lib/firmware" "$install/lib/udev/keymaps/force-release"
49 chown -R root:root $install
51 # https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html
52 # /lib/udev/rules.d : default rules files. Do not edit these files.
53 # /etc/udev/rules.d : customized rules files. You can modify these files
54 # Rules files in /etc/udev/rules.d override files of the same name
55 # in /lib/udev/rules.d.
56 }
58 genpkg_rules() {
59 case $PACKAGE in
60 eudev)
61 copy @std
62 DEPENDS="kmod liblzma util-linux-blkid util-linux-uuid zlib dbus"
63 PROVIDE="udev"
64 TAGS="LFS"
65 ;;
66 eudev-dev)
67 copy @dev
68 PROVIDE="udev-dev"
69 ;;
70 esac
71 }
73 post_install_eudev() {
74 # Create some devices and directories that Udev cannot handle
75 # due to them being required very early in the boot process
76 mkdir -p "$1/lib/udev/devices/pts"
77 mkdir -p "$1/lib/udev/devices/shm"
78 [ -e "$1/lib/udev/devices/null" ] || mknod -m 0666 "$1/lib/udev/devices/null" c 1 3
80 # Sanity check for udev+ldap boot
81 grep GROUP= "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
82 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
83 while read x; do
84 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
85 done
87 grep OWNER= "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
88 sed 's/.*OWNER="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
89 while read x; do
90 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
91 done
92 }