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