wok-next diff eudev/receipt @ rev 19766

Up cookutils.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 12 11:40:38 2017 +0300 (2017-06-12)
parents c5336999f370
children 77529bc3b589
line diff
     1.1 --- a/eudev/receipt	Thu Mar 02 05:17:16 2017 +0200
     1.2 +++ b/eudev/receipt	Mon Jun 12 11:40:38 2017 +0300
     1.3 @@ -1,7 +1,7 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="eudev"
     1.8 -VERSION="3.2"
     1.9 +VERSION="3.2.2"
    1.10  CATEGORY="base-system"
    1.11  SHORT_DESC="Programs for dynamic creation of device nodes"
    1.12  MAINTAINER="tcg.thegamer@gmail.com"
    1.13 @@ -11,18 +11,20 @@
    1.14  
    1.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.16  WGET_URL="${WEB_SITE}$TARBALL"
    1.17 +TARBALL_MD5="41e19b70462692fefd072a3f38818b6e"
    1.18  
    1.19 -DEPENDS="dbus util-linux-blkid pciids usbids acl kmod"
    1.20  BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf"
    1.21 +SPLIT="eudev-dev"
    1.22  
    1.23  # Rules to configure and make the package.
    1.24  compile_rules()
    1.25  {
    1.26  	sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
    1.27 +	sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c
    1.28  	cat > config.cache <<"EOF"
    1.29  HAVE_BLKID=1
    1.30  BLKID_LIBS="-lblkid"
    1.31 -BLKID_CFLAGS="-I/tools/include"
    1.32 +BLKID_CFLAGS="-I/include"
    1.33  EOF
    1.34  
    1.35  	./configure \
    1.36 @@ -39,53 +41,51 @@
    1.37  		$CONFIGURE_ARGS &&
    1.38  	make &&
    1.39  	make install
    1.40 +
    1.41 +	mkdir -p $install/etc/udev
    1.42 +	cp $stuff/udev.conf $install/etc/udev
    1.43 +	cp $stuff/*.rules $install/etc/udev/rules.d
    1.44 +
    1.45 +	# https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html
    1.46 +	# /lib/udev/rules.d : default rules files. Do not edit these files.
    1.47 +	# /etc/udev/rules.d : customized rules files. You can modify these files
    1.48 +	# Rules files in /etc/udev/rules.d override files of the same name
    1.49 +	# in /lib/udev/rules.d.
    1.50  }
    1.51  
    1.52  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.53  genpkg_rules()
    1.54  {
    1.55 -	mkdir -p $fs/lib/firmware $fs/usr/lib
    1.56 +	case $PACKAGE in
    1.57 +		eudev)
    1.58 +			copy @std
    1.59 +			DEPENDS="dbus util-linux-blkid util-linux-uuid pciids usbids acl kmod"
    1.60 +			;;
    1.61 +		eudev-dev)
    1.62 +			copy @dev
    1.63 +			;;
    1.64 +	esac
    1.65 +}
    1.66  
    1.67 -	cp -a $install/sbin $fs
    1.68 -	cp -a $install/etc $fs
    1.69 -	cp -a $install/lib/libudev.so* $fs/lib
    1.70 -	cp -a $install/lib/udev $fs/lib
    1.71 -	cp -a $install/usr/lib/libudev.so $fs/usr/lib
    1.72 -
    1.73 -	# Copy rules files to udev conf dir
    1.74 -	mv -f $fs/lib/udev/rules.d $fs/etc/udev
    1.75 -	cp $stuff/udev.conf $fs/etc/udev
    1.76 -	cp $stuff/*.rules $fs/etc/udev/rules.d
    1.77 +post_install_eudev()
    1.78 +{
    1.79 +	mkdir -p "$1/lib/firmware"
    1.80  
    1.81  	# Create some devices and directories that Udev cannot handle
    1.82  	# due to them being required very early in the boot process
    1.83 -	mkdir -p $fs/lib/udev/devices/pts
    1.84 -	mkdir -p $fs/lib/udev/devices/shm
    1.85 -	mknod -m 0666 $fs/lib/udev/devices/null c 1 3
    1.86 +	mkdir -p "$1/lib/udev/devices/pts"
    1.87 +	mkdir -p "$1/lib/udev/devices/shm"
    1.88 +	[ -e "$1/lib/udev/devices/null" ] || mknod -m 0666 "$1/lib/udev/devices/null" c 1 3
    1.89  
    1.90 -	# Fix permissions
    1.91 -	chmod +x $fs/lib/udev/*
    1.92 -	chown -R root.root $fs
    1.93 -
    1.94 -}
    1.95 -
    1.96 -list_udev_group()
    1.97 -{
    1.98 -	object=$2
    1.99 -	[ -n "$object" ] || object=GROUP
   1.100 -	grep $object "$1"/etc/udev/rules.d/* | \
   1.101 -		sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
   1.102 -}
   1.103 -
   1.104 -post_install()
   1.105 -{
   1.106  	# Sanity check for udev+ldap boot
   1.107 -	list_udev_group "$1" GROUP | \
   1.108 +	grep GROUP "$1"/etc/udev/rules.d/* | \
   1.109 +	sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
   1.110  	while read x ; do
   1.111  		grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
   1.112  	done
   1.113  
   1.114 -	list_udev_group "$1" OWNER | \
   1.115 +	grep OWNER "$1"/etc/udev/rules.d/* | \
   1.116 +	sed 's/.*OWNER="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq | \
   1.117  	while read x ; do
   1.118  		grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
   1.119  	done