wok-current annotate eudev/receipt @ rev 17844
Up libcups cups-doc (2.0.2)
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Tue Mar 24 01:34:13 2015 -0400 (2015-03-24) |
parents | 8f0d02db4d84 |
children | 124c3a7da04f |
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" |
pascal@17147 | 8 LICENSE="GPL2" |
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 \ |
pascal@17147 | 22 --sysconfdir=/etc \ |
tcg@17143 | 23 --exec-prefix="" \ |
tcg@17143 | 24 --with-rootprefix="" \ |
tcg@17143 | 25 --disable-manpages \ |
tcg@17143 | 26 --disable-introspection \ |
tcg@17143 | 27 --disable-keymap \ |
tcg@17143 | 28 --enable-floppy \ |
tcg@17143 | 29 --enable-rule-generator \ |
tcg@17143 | 30 $CONFIGURE_ARGS && |
tcg@17143 | 31 make && |
tcg@17143 | 32 make DESTDIR=$DESTDIR install |
tcg@17143 | 33 } |
tcg@17143 | 34 |
tcg@17143 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
tcg@17143 | 36 genpkg_rules() |
tcg@17143 | 37 { |
tcg@17143 | 38 mkdir -p $fs/lib/firmware |
tcg@17143 | 39 |
tcg@17143 | 40 cp -a $install/sbin $fs |
tcg@17143 | 41 cp -a $install/etc $fs |
tcg@17143 | 42 cp -a $install/lib/libgudev*so* $fs/lib |
tcg@17143 | 43 cp -a $install/lib/udev $fs/lib |
tcg@17143 | 44 |
tcg@17143 | 45 # Copy rules files to udev conf dir |
tcg@17143 | 46 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
tcg@17143 | 47 cp $stuff/udev.conf $fs/etc/udev |
tcg@17143 | 48 cp $stuff/*.rules $fs/etc/udev/rules.d |
tcg@17143 | 49 |
tcg@17143 | 50 # Create some devices and directories that Udev cannot handle |
tcg@17143 | 51 # due to them being required very early in the boot process |
tcg@17143 | 52 mkdir -p $fs/lib/udev/devices/pts |
tcg@17143 | 53 mkdir -p $fs/lib/udev/devices/shm |
tcg@17143 | 54 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
tcg@17143 | 55 |
tcg@17143 | 56 # Fix permissions |
tcg@17143 | 57 chmod +x $fs/lib/udev/* |
tcg@17143 | 58 chown -R root.root $fs |
tcg@17143 | 59 |
tcg@17143 | 60 } |
tcg@17143 | 61 |
tcg@17143 | 62 list_udev_group() |
tcg@17143 | 63 { |
tcg@17143 | 64 object=$2 |
tcg@17143 | 65 [ -n "$object" ] || object=GROUP |
tcg@17143 | 66 grep $object $1/etc/udev/rules.d/* | \ |
tcg@17143 | 67 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
tcg@17143 | 68 } |
tcg@17143 | 69 |
tcg@17143 | 70 post_install() |
tcg@17143 | 71 { |
tcg@17143 | 72 # Sanity check for udev+ldap boot |
tcg@17143 | 73 list_udev_group "$1" GROUP | while read x ; do |
tcg@17143 | 74 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
tcg@17143 | 75 done |
tcg@17143 | 76 list_udev_group "$1" OWNER | while read x ; do |
tcg@17143 | 77 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
tcg@17143 | 78 done |
tcg@17143 | 79 } |