wok-next annotate udev/receipt @ rev 17001
linux-cloop: apply patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 11 16:36:05 2014 +0200 (2014-08-11) |
parents | 9be2dfe2fe72 |
children | 526980ca17c4 |
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@16067 | 13 HOST_ARCH="i486 arm" |
pankso@5 | 14 |
pankso@12485 | 15 DEPENDS="util-linux-blkid pciids usbids acl kmod" |
pankso@12481 | 16 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \ |
pankso@12485 | 17 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \ |
pascal@15628 | 18 libgudev-dev pcre-dev liblzma-dev util-linux-uuid-dev" |
pankso@9753 | 19 |
pankso@16067 | 20 # Use build host: gperf |
pascal@16069 | 21 case "$ARCH" in |
pascal@16069 | 22 arm*) BUILD_DEPENDS="util-linux-blkid-dev kmod-dev acl-dev glib-dev" |
pascal@16069 | 23 esac |
pankso@16067 | 24 |
pankso@5 | 25 # Rules to configure and make the package. |
pankso@5 | 26 compile_rules() |
pankso@5 | 27 { |
pankso@16067 | 28 case "$ARCH" in |
pankso@16067 | 29 arm*) |
pankso@16067 | 30 # ARM Hack |
pankso@16067 | 31 for la in libgthread-2.0.la libglib-2.0.la |
pankso@16067 | 32 do |
pankso@16067 | 33 if grep -q "^libdir='/usr/lib'" /usr/lib/${la}; then |
pankso@16067 | 34 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \ |
pankso@16067 | 35 /usr/lib/${la} |
pankso@16067 | 36 fi |
pankso@16067 | 37 done ;; |
pankso@16067 | 38 esac |
pankso@12485 | 39 ./configure \ |
pankso@1270 | 40 --exec-prefix="" \ |
pankso@12485 | 41 --with-rootprefix="" \ |
pankso@12485 | 42 --bindir=/sbin \ |
pankso@1261 | 43 --sysconfdir=/etc \ |
pankso@12485 | 44 --libexecdir=/lib \ |
pankso@12485 | 45 --disable-manpages \ |
pankso@12485 | 46 --disable-introspection \ |
pankso@12485 | 47 --disable-keymap \ |
pankso@12485 | 48 --enable-floppy \ |
pankso@12485 | 49 --enable-rule_generator \ |
pankso@12485 | 50 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \ |
pankso@12485 | 51 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \ |
pankso@12485 | 52 --with-systemdsystemunitdir=no \ |
pankso@12485 | 53 $CONFIGURE_ARGS && |
pankso@10368 | 54 make && make install |
pankso@5 | 55 } |
pankso@5 | 56 |
pankso@5 | 57 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@5 | 58 genpkg_rules() |
pankso@5 | 59 { |
pankso@12976 | 60 mkdir -p $fs/lib/firmware |
pankso@789 | 61 |
pankso@12485 | 62 cp -a $install/sbin $fs |
pankso@12485 | 63 cp -a $install/etc $fs |
pankso@12485 | 64 cp -a $install/lib/libudev*so* $fs/lib |
pankso@12485 | 65 cp -a $install/lib/udev $fs/lib |
pankso@12976 | 66 |
pankso@12485 | 67 # Have udevd in PATH |
pankso@12485 | 68 mv $fs/lib/udev/udevd $fs/sbin |
rcx@3782 | 69 |
pankso@12485 | 70 # Copy rules files to udev conf dir |
pankso@3821 | 71 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
slaxemulator@9685 | 72 cp $stuff/udev.conf $fs/etc/udev |
pankso@10918 | 73 cp $stuff/*.rules $fs/etc/udev/rules.d |
pankso@12976 | 74 |
pankso@12976 | 75 # Create some devices and directories that Udev cannot handle |
pankso@12485 | 76 # due to them being required very early in the boot process |
pankso@12485 | 77 mkdir -p $fs/lib/udev/devices/pts |
pankso@12976 | 78 mkdir -p $fs/lib/udev/devices/shm |
pankso@12485 | 79 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
pankso@12976 | 80 |
pankso@2273 | 81 # Fix permissions |
pankso@3149 | 82 chmod +x $fs/lib/udev/* |
pankso@3149 | 83 chown -R root.root $fs |
pankso@5 | 84 } |
pankso@2085 | 85 |
pascal@3174 | 86 list_udev_group() |
pascal@3174 | 87 { |
pascal@12195 | 88 object=$2 |
pascal@3174 | 89 [ -n "$object" ] || object=GROUP |
pascal@12195 | 90 grep $object $1/etc/udev/rules.d/* | \ |
pascal@12195 | 91 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
pascal@3174 | 92 } |
pascal@3174 | 93 |
pascal@3174 | 94 post_install() |
pascal@3174 | 95 { |
pascal@3174 | 96 # Sanity check for udev+ldap boot |
pascal@12195 | 97 list_udev_group "$1" GROUP | while read x ; do |
pankso@7874 | 98 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x |
pascal@3174 | 99 done |
pascal@12195 | 100 list_udev_group "$1" OWNER | while read x ; do |
pankso@3195 | 101 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x |
pascal@3174 | 102 done |
pascal@3174 | 103 } |