wok-next annotate eudev/receipt @ rev 19941
gst0-ffmpeg*: tiny patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 15 19:06:21 2017 +0200 (2017-10-15) |
parents | 6d2b71cbba60 |
children | 4a43dd1d951b |
rev | line source |
---|---|
al@19741 | 1 # SliTaz package receipt v2. |
tcg@17143 | 2 |
tcg@17143 | 3 PACKAGE="eudev" |
al@19866 | 4 VERSION="3.2.4" |
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@19866 | 15 TARBALL_MD5="66acef4c6094aab4aced7ae83b74b0d2" |
al@19582 | 16 |
al@19866 | 17 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf kmod-dev" |
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 \ |
al@19866 | 42 --enable-kmod \ |
tcg@17143 | 43 $CONFIGURE_ARGS && |
tcg@17143 | 44 make && |
al@19582 | 45 make install |
al@19741 | 46 |
al@19741 | 47 cp $stuff/*.rules $install/etc/udev/rules.d |
al@19866 | 48 cp -a $stuff/udev/* $install/lib/udev |
al@19863 | 49 |
al@19866 | 50 mkdir -p "$install/lib/firmware" "$install/lib/udev/keymaps/force-release" |
al@19866 | 51 |
al@19866 | 52 chown -R root:root $install |
al@19741 | 53 |
al@19741 | 54 # https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html |
al@19741 | 55 # /lib/udev/rules.d : default rules files. Do not edit these files. |
al@19741 | 56 # /etc/udev/rules.d : customized rules files. You can modify these files |
al@19741 | 57 # Rules files in /etc/udev/rules.d override files of the same name |
al@19741 | 58 # in /lib/udev/rules.d. |
tcg@17143 | 59 } |
tcg@17143 | 60 |
tcg@17143 | 61 # Rules to gen a SliTaz package suitable for Tazpkg. |
tcg@17143 | 62 genpkg_rules() |
tcg@17143 | 63 { |
al@19741 | 64 case $PACKAGE in |
al@19741 | 65 eudev) |
al@19741 | 66 copy @std |
al@19866 | 67 DEPENDS="kmod liblzma util-linux-blkid util-linux-uuid zlib dbus" |
al@19880 | 68 PROVIDE="udev" |
al@19741 | 69 ;; |
al@19741 | 70 eudev-dev) |
al@19741 | 71 copy @dev |
al@19880 | 72 PROVIDE="udev-dev" |
al@19741 | 73 ;; |
al@19741 | 74 esac |
al@19741 | 75 } |
tcg@17143 | 76 |
al@19863 | 77 post_install_eudev() { |
tcg@17143 | 78 # Create some devices and directories that Udev cannot handle |
tcg@17143 | 79 # due to them being required very early in the boot process |
al@19741 | 80 mkdir -p "$1/lib/udev/devices/pts" |
al@19741 | 81 mkdir -p "$1/lib/udev/devices/shm" |
al@19741 | 82 [ -e "$1/lib/udev/devices/null" ] || mknod -m 0666 "$1/lib/udev/devices/null" c 1 3 |
tcg@17143 | 83 |
al@18663 | 84 # Sanity check for udev+ldap boot |
al@19852 | 85 grep GROUP "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \ |
al@19741 | 86 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \ |
al@19863 | 87 while read x; do |
al@18663 | 88 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x |
al@18663 | 89 done |
al@18663 | 90 |
al@19852 | 91 grep OWNER "$1"/etc/udev/rules.d/* "$1"/lib/udev/rules.d/* 2>/dev/null | \ |
al@19741 | 92 sed 's/.*OWNER="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \ |
al@19863 | 93 while read x; do |
al@18663 | 94 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x |
al@18663 | 95 done |
tcg@17143 | 96 } |