wok-next annotate eudev/receipt @ rev 19863

Up eudev, make-slitaz-icons, ntfs-3g, pcmanfm, polkit, slitaz-base-files, slitaz-boot-scripts, slitaz-icons-paper.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Sep 12 01:34:11 2017 +0300 (2017-09-12)
parents 77529bc3b589
children 6d2b71cbba60
rev   line source
al@19741 1 # SliTaz package receipt v2.
tcg@17143 2
tcg@17143 3 PACKAGE="eudev"
al@19741 4 VERSION="3.2.2"
tcg@17143 5 CATEGORY="base-system"
al@19582 6 SHORT_DESC="Programs for dynamic creation of device nodes"
tcg@17143 7 MAINTAINER="tcg.thegamer@gmail.com"
pascal@17147 8 LICENSE="GPL2"
al@19582 9 WEB_SITE="http://dev.gentoo.org/~blueness/eudev/"
al@19863 10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/eudev.html"
tcg@17143 11 PROVIDE="udev"
tcg@17143 12
al@19582 13 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19582 14 WGET_URL="${WEB_SITE}$TARBALL"
al@19741 15 TARBALL_MD5="41e19b70462692fefd072a3f38818b6e"
al@19582 16
al@19582 17 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf"
al@19741 18 SPLIT="eudev-dev"
tcg@17143 19
tcg@17143 20 # Rules to configure and make the package.
tcg@17143 21 compile_rules()
tcg@17143 22 {
al@19582 23 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
al@19741 24 sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c
al@19582 25 cat > config.cache <<"EOF"
al@19582 26 HAVE_BLKID=1
al@19582 27 BLKID_LIBS="-lblkid"
al@19741 28 BLKID_CFLAGS="-I/include"
al@19582 29 EOF
al@19582 30
tcg@17143 31 ./configure \
al@19582 32 --bindir=/sbin \
al@19582 33 --sbindir=/sbin \
al@19582 34 --libdir=/usr/lib \
pascal@17147 35 --sysconfdir=/etc \
al@19582 36 --libexecdir=/lib \
al@19582 37 --with-rootprefix= \
al@19582 38 --with-rootlibdir=/lib \
al@19582 39 --enable-manpages \
al@19582 40 --disable-static \
al@19582 41 --config-cache \
tcg@17143 42 $CONFIGURE_ARGS &&
tcg@17143 43 make &&
al@19582 44 make install
al@19741 45
al@19741 46 cp $stuff/*.rules $install/etc/udev/rules.d
al@19863 47 cp $stuff/udev/* $install/lib/udev
al@19863 48
al@19863 49 mkdir -p "$install/lib/firmware"
al@19741 50
al@19741 51 # https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html
al@19741 52 # /lib/udev/rules.d : default rules files. Do not edit these files.
al@19741 53 # /etc/udev/rules.d : customized rules files. You can modify these files
al@19741 54 # Rules files in /etc/udev/rules.d override files of the same name
al@19741 55 # in /lib/udev/rules.d.
tcg@17143 56 }
tcg@17143 57
tcg@17143 58 # Rules to gen a SliTaz package suitable for Tazpkg.
tcg@17143 59 genpkg_rules()
tcg@17143 60 {
al@19741 61 case $PACKAGE in
al@19741 62 eudev)
al@19741 63 copy @std
al@19741 64 DEPENDS="dbus util-linux-blkid util-linux-uuid pciids usbids acl kmod"
al@19741 65 ;;
al@19741 66 eudev-dev)
al@19741 67 copy @dev
al@19741 68 ;;
al@19741 69 esac
al@19741 70 }
tcg@17143 71
al@19863 72 post_install_eudev() {
tcg@17143 73 # Create some devices and directories that Udev cannot handle
tcg@17143 74 # due to them being required very early in the boot process
al@19741 75 mkdir -p "$1/lib/udev/devices/pts"
al@19741 76 mkdir -p "$1/lib/udev/devices/shm"
al@19741 77 [ -e "$1/lib/udev/devices/null" ] || mknod -m 0666 "$1/lib/udev/devices/null" c 1 3
tcg@17143 78
al@18663 79 # Sanity check for udev+ldap boot
al@19852 80 grep GROUP "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
al@19741 81 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
al@19863 82 while read x; do
al@18663 83 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
al@18663 84 done
al@18663 85
al@19852 86 grep OWNER "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \
al@19741 87 sed 's/.*OWNER="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
al@19863 88 while read x; do
al@18663 89 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
al@18663 90 done
tcg@17143 91 }