wok-6.x annotate udev/receipt @ rev 12862
Up: hostapd to 1.0.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu May 24 21:09:25 2012 +0000 (2012-05-24) |
parents | 8e30e2cf0cdf |
children | dac216ce48c5 |
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@12485 | 43 mkdir -p $fs/lib/firmware $fs/run/udev |
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@12485 | 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@10405 | 57 |
pankso@12485 | 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@12485 | 61 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
pankso@12485 | 62 |
pankso@2273 | 63 # Fix permissions |
pankso@3149 | 64 chmod +x $fs/lib/udev/* |
pankso@3149 | 65 chown -R root.root $fs |
pankso@5 | 66 } |
pankso@2085 | 67 |
pascal@3174 | 68 list_udev_group() |
pascal@3174 | 69 { |
pascal@12195 | 70 object=$2 |
pascal@3174 | 71 [ -n "$object" ] || object=GROUP |
pascal@12195 | 72 grep $object $1/etc/udev/rules.d/* | \ |
pascal@12195 | 73 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
pascal@3174 | 74 } |
pascal@3174 | 75 |
pascal@3174 | 76 post_install() |
pascal@3174 | 77 { |
pascal@3174 | 78 # Sanity check for udev+ldap boot |
pascal@12195 | 79 list_udev_group "$1" GROUP | while read x ; do |
pankso@7874 | 80 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
pascal@3174 | 81 done |
pascal@12195 | 82 list_udev_group "$1" OWNER | while read x ; do |
pankso@3195 | 83 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 84 done |
pascal@3174 | 85 } |