wok annotate eudev/receipt @ rev 17143

Add eudev and devel.
author necrophcodr <tcg.thegamer@gmail.com>
date Wed Sep 10 12:01:22 2014 +0200 (2014-09-10)
parents
children 8f0d02db4d84
rev   line source
tcg@17143 1 # SliTaz package receipt.
tcg@17143 2
tcg@17143 3 PACKED_SIZE="676.0K"
tcg@17143 4 UNPACKED_SIZE="5.3M"
tcg@17143 5 PACKAGE="eudev"
tcg@17143 6 VERSION="1.9"
tcg@17143 7 CATEGORY="base-system"
tcg@17143 8 SHORT_DESC="Fork of udev to avoid depending on systemd"
tcg@17143 9 MAINTAINER="tcg.thegamer@gmail.com"
tcg@17143 10 LICENSE="GPLv2"
tcg@17143 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
tcg@17143 12 WEB_SITE="http://dev.gentoo.org/~blueness/eudev"
tcg@17143 13 WGET_URL="${WEB_SITE}/${TARBALL}"
tcg@17143 14 PROVIDE="udev"
tcg@17143 15
tcg@17143 16 DEPENDS="dbus util-linux-blkid pciids usbids acl kmod"
tcg@17143 17 BUILD_DEPENDS="util-linux-blkid-dev util-linux-uuid-dev pcre-dev kmod-dev dbus-dev gperf pkg-config acl-dev"
tcg@17143 18
tcg@17143 19 # Rules to configure and make the package.
tcg@17143 20 compile_rules()
tcg@17143 21 {
tcg@17143 22 cd $src
tcg@17143 23 ./configure \
tcg@17143 24 --exec-prefix="" \
tcg@17143 25 --with-rootprefix="" \
tcg@17143 26 --disable-manpages \
tcg@17143 27 --disable-introspection \
tcg@17143 28 --disable-keymap \
tcg@17143 29 --enable-floppy \
tcg@17143 30 --enable-rule-generator \
tcg@17143 31 $CONFIGURE_ARGS &&
tcg@17143 32 make &&
tcg@17143 33 make DESTDIR=$DESTDIR install
tcg@17143 34 }
tcg@17143 35
tcg@17143 36 # Rules to gen a SliTaz package suitable for Tazpkg.
tcg@17143 37 genpkg_rules()
tcg@17143 38 {
tcg@17143 39 mkdir -p $fs/lib/firmware
tcg@17143 40
tcg@17143 41 cp -a $install/sbin $fs
tcg@17143 42 cp -a $install/etc $fs
tcg@17143 43 cp -a $install/lib/libgudev*so* $fs/lib
tcg@17143 44 cp -a $install/lib/udev $fs/lib
tcg@17143 45
tcg@17143 46 # Copy rules files to udev conf dir
tcg@17143 47 mv -f $fs/lib/udev/rules.d $fs/etc/udev
tcg@17143 48 cp $stuff/udev.conf $fs/etc/udev
tcg@17143 49 cp $stuff/*.rules $fs/etc/udev/rules.d
tcg@17143 50
tcg@17143 51 # Create some devices and directories that Udev cannot handle
tcg@17143 52 # due to them being required very early in the boot process
tcg@17143 53 mkdir -p $fs/lib/udev/devices/pts
tcg@17143 54 mkdir -p $fs/lib/udev/devices/shm
tcg@17143 55 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
tcg@17143 56
tcg@17143 57 # Fix permissions
tcg@17143 58 chmod +x $fs/lib/udev/*
tcg@17143 59 chown -R root.root $fs
tcg@17143 60
tcg@17143 61 }
tcg@17143 62
tcg@17143 63 list_udev_group()
tcg@17143 64 {
tcg@17143 65 object=$2
tcg@17143 66 [ -n "$object" ] || object=GROUP
tcg@17143 67 grep $object $1/etc/udev/rules.d/* | \
tcg@17143 68 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
tcg@17143 69 }
tcg@17143 70
tcg@17143 71 post_install()
tcg@17143 72 {
tcg@17143 73 # Sanity check for udev+ldap boot
tcg@17143 74 list_udev_group "$1" GROUP | while read x ; do
tcg@17143 75 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
tcg@17143 76 done
tcg@17143 77 list_udev_group "$1" OWNER | while read x ; do
tcg@17143 78 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
tcg@17143 79 done
tcg@17143 80 }