wok annotate eudev/receipt @ rev 17146

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