wok-next annotate eudev/receipt @ rev 19582
Up: eudev, man-db (added), vim. Extra up: ncurses, tk, python, cacerts.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 30 02:04:27 2016 +0200 (2016-12-30) |
parents | 9e01bc6321ea |
children | c5336999f370 |
rev | line source |
---|---|
tcg@17143 | 1 # SliTaz package receipt. |
tcg@17143 | 2 |
tcg@17143 | 3 PACKAGE="eudev" |
al@19582 | 4 VERSION="3.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@19582 | 14 |
tcg@17143 | 15 DEPENDS="dbus util-linux-blkid pciids usbids acl kmod" |
al@19582 | 16 BUILD_DEPENDS="gobject-introspection-dev util-linux-blkid-dev gperf" |
tcg@17143 | 17 |
tcg@17143 | 18 # Rules to configure and make the package. |
tcg@17143 | 19 compile_rules() |
tcg@17143 | 20 { |
al@19582 | 21 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl |
al@19582 | 22 cat > config.cache <<"EOF" |
al@19582 | 23 HAVE_BLKID=1 |
al@19582 | 24 BLKID_LIBS="-lblkid" |
al@19582 | 25 BLKID_CFLAGS="-I/tools/include" |
al@19582 | 26 EOF |
al@19582 | 27 |
tcg@17143 | 28 ./configure \ |
al@19582 | 29 --bindir=/sbin \ |
al@19582 | 30 --sbindir=/sbin \ |
al@19582 | 31 --libdir=/usr/lib \ |
pascal@17147 | 32 --sysconfdir=/etc \ |
al@19582 | 33 --libexecdir=/lib \ |
al@19582 | 34 --with-rootprefix= \ |
al@19582 | 35 --with-rootlibdir=/lib \ |
al@19582 | 36 --enable-manpages \ |
al@19582 | 37 --disable-static \ |
al@19582 | 38 --config-cache \ |
tcg@17143 | 39 $CONFIGURE_ARGS && |
tcg@17143 | 40 make && |
al@19582 | 41 make install |
tcg@17143 | 42 } |
tcg@17143 | 43 |
tcg@17143 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
tcg@17143 | 45 genpkg_rules() |
tcg@17143 | 46 { |
tcg@17143 | 47 mkdir -p $fs/lib/firmware |
tcg@17143 | 48 |
tcg@17143 | 49 cp -a $install/sbin $fs |
tcg@17143 | 50 cp -a $install/etc $fs |
al@19582 | 51 cp -a $install/lib/libudev.so* $fs/lib |
tcg@17143 | 52 cp -a $install/lib/udev $fs/lib |
tcg@17143 | 53 |
tcg@17143 | 54 # Copy rules files to udev conf dir |
tcg@17143 | 55 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
tcg@17143 | 56 cp $stuff/udev.conf $fs/etc/udev |
tcg@17143 | 57 cp $stuff/*.rules $fs/etc/udev/rules.d |
tcg@17143 | 58 |
tcg@17143 | 59 # Create some devices and directories that Udev cannot handle |
tcg@17143 | 60 # due to them being required very early in the boot process |
tcg@17143 | 61 mkdir -p $fs/lib/udev/devices/pts |
tcg@17143 | 62 mkdir -p $fs/lib/udev/devices/shm |
tcg@17143 | 63 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
tcg@17143 | 64 |
tcg@17143 | 65 # Fix permissions |
tcg@17143 | 66 chmod +x $fs/lib/udev/* |
tcg@17143 | 67 chown -R root.root $fs |
tcg@17143 | 68 |
tcg@17143 | 69 } |
tcg@17143 | 70 |
tcg@17143 | 71 list_udev_group() |
tcg@17143 | 72 { |
al@18663 | 73 object=$2 |
al@18663 | 74 [ -n "$object" ] || object=GROUP |
pascal@18730 | 75 grep $object "$1"/etc/udev/rules.d/* | \ |
al@18663 | 76 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
tcg@17143 | 77 } |
tcg@17143 | 78 |
tcg@17143 | 79 post_install() |
tcg@17143 | 80 { |
al@18663 | 81 # Sanity check for udev+ldap boot |
al@18663 | 82 list_udev_group "$1" GROUP | \ |
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@18663 | 87 list_udev_group "$1" OWNER | \ |
al@18663 | 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 } |