wok-next annotate eudev/receipt @ rev 19741

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