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