wok-current annotate udev/receipt @ rev 15928
cups: fix install file in /
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Feb 22 11:22:36 2014 +0100 (2014-02-22) |
parents | 380ffe05937a |
children | 9be2dfe2fe72 |
rev | line source |
---|---|
pankso@5 | 1 # SliTaz package receipt. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@12485 | 4 VERSION="182" |
pascal@1890 | 5 BUILD_WARNING="Install new udev package and rebuild hal" |
pankso@210 | 6 CATEGORY="base-system" |
pankso@5 | 7 SHORT_DESC="Udev creat automaticly right devices in /dev." |
pankso@5 | 8 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 9 LICENSE="GPL2" |
pankso@12485 | 10 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pankso@12485 | 11 WEB_SITE="http://www.freedesktop.org/software/systemd/man/udev.html" |
pankso@12485 | 12 WGET_URL="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" |
pankso@5 | 13 |
pankso@12485 | 14 DEPENDS="util-linux-blkid pciids usbids acl kmod" |
pankso@12481 | 15 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \ |
pankso@12485 | 16 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \ |
pascal@15628 | 17 libgudev-dev pcre-dev liblzma-dev util-linux-uuid-dev" |
pankso@9753 | 18 |
pankso@5 | 19 # Rules to configure and make the package. |
pankso@5 | 20 compile_rules() |
pankso@5 | 21 { |
pankso@5 | 22 cd $src |
pankso@12485 | 23 ./configure \ |
pankso@1270 | 24 --exec-prefix="" \ |
pankso@12485 | 25 --with-rootprefix="" \ |
pankso@12485 | 26 --bindir=/sbin \ |
pankso@1261 | 27 --sysconfdir=/etc \ |
pankso@12485 | 28 --libexecdir=/lib \ |
pankso@12485 | 29 --disable-manpages \ |
pankso@12485 | 30 --disable-introspection \ |
pankso@12485 | 31 --disable-keymap \ |
pankso@12485 | 32 --enable-floppy \ |
pankso@12485 | 33 --enable-rule_generator \ |
pankso@12485 | 34 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \ |
pankso@12485 | 35 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \ |
pankso@12485 | 36 --with-systemdsystemunitdir=no \ |
pankso@12485 | 37 $CONFIGURE_ARGS && |
pankso@10368 | 38 make && make install |
pankso@5 | 39 } |
pankso@5 | 40 |
pankso@5 | 41 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 42 genpkg_rules() |
pankso@5 | 43 { |
pankso@12976 | 44 mkdir -p $fs/lib/firmware |
pankso@789 | 45 |
pankso@12485 | 46 cp -a $install/sbin $fs |
pankso@12485 | 47 cp -a $install/etc $fs |
pankso@12485 | 48 cp -a $install/lib/libudev*so* $fs/lib |
pankso@12485 | 49 cp -a $install/lib/udev $fs/lib |
pankso@12976 | 50 |
pankso@12485 | 51 # Have udevd in PATH |
pankso@12485 | 52 mv $fs/lib/udev/udevd $fs/sbin |
rcx@3782 | 53 |
pankso@12485 | 54 # Copy rules files to udev conf dir |
pankso@3821 | 55 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
slaxemulator@9685 | 56 cp $stuff/udev.conf $fs/etc/udev |
pankso@10918 | 57 cp $stuff/*.rules $fs/etc/udev/rules.d |
pankso@12976 | 58 |
pankso@12976 | 59 # Create some devices and directories that Udev cannot handle |
pankso@12485 | 60 # due to them being required very early in the boot process |
pankso@12485 | 61 mkdir -p $fs/lib/udev/devices/pts |
pankso@12976 | 62 mkdir -p $fs/lib/udev/devices/shm |
pankso@12485 | 63 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
pankso@12976 | 64 |
pankso@2273 | 65 # Fix permissions |
pankso@3149 | 66 chmod +x $fs/lib/udev/* |
pankso@3149 | 67 chown -R root.root $fs |
pankso@5 | 68 } |
pankso@2085 | 69 |
pascal@3174 | 70 list_udev_group() |
pascal@3174 | 71 { |
pascal@12195 | 72 object=$2 |
pascal@3174 | 73 [ -n "$object" ] || object=GROUP |
pascal@12195 | 74 grep $object $1/etc/udev/rules.d/* | \ |
pascal@12195 | 75 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
pascal@3174 | 76 } |
pascal@3174 | 77 |
pascal@3174 | 78 post_install() |
pascal@3174 | 79 { |
pascal@3174 | 80 # Sanity check for udev+ldap boot |
pascal@12195 | 81 list_udev_group "$1" GROUP | while read x ; do |
pankso@7874 | 82 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
pascal@3174 | 83 done |
pascal@12195 | 84 list_udev_group "$1" OWNER | while read x ; do |
pankso@3195 | 85 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 86 done |
pascal@3174 | 87 } |