wok-next annotate udev/receipt @ rev 20194

Up irrlicht (1.8.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 03 11:27:16 2017 +0100 (2017-11-03)
parents e70c0b9c5adf
children 0fcf48f89432
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
pascal@19940 41 export LDFLAGS="$LDFLAGS -lrt"
pankso@12485 42 ./configure \
pankso@1270 43 --exec-prefix="" \
pankso@12485 44 --with-rootprefix="" \
pankso@12485 45 --bindir=/sbin \
pankso@1261 46 --sysconfdir=/etc \
pankso@12485 47 --libexecdir=/lib \
pankso@12485 48 --disable-manpages \
pankso@12485 49 --disable-introspection \
pankso@12485 50 --disable-keymap \
pankso@12485 51 --enable-floppy \
pankso@12485 52 --enable-rule_generator \
pankso@12485 53 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
pankso@12485 54 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
pankso@12485 55 --with-systemdsystemunitdir=no \
pankso@12485 56 $CONFIGURE_ARGS &&
pankso@10368 57 make && make install
pankso@5 58 }
pankso@5 59
pankso@5 60 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 61 genpkg_rules()
pankso@5 62 {
pankso@12976 63 mkdir -p $fs/lib/firmware
pankso@789 64
pankso@12485 65 cp -a $install/sbin $fs
pankso@12485 66 cp -a $install/etc $fs
pankso@12485 67 cp -a $install/lib/libudev*so* $fs/lib
pankso@12485 68 cp -a $install/lib/udev $fs/lib
pankso@12976 69
pankso@12485 70 # Have udevd in PATH
pankso@12485 71 mv $fs/lib/udev/udevd $fs/sbin
rcx@3782 72
pankso@12485 73 # Copy rules files to udev conf dir
pankso@3821 74 mv -f $fs/lib/udev/rules.d $fs/etc/udev
slaxemulator@9685 75 cp $stuff/udev.conf $fs/etc/udev
pankso@10918 76 cp $stuff/*.rules $fs/etc/udev/rules.d
pankso@12976 77
pankso@12976 78 # Create some devices and directories that Udev cannot handle
pankso@12485 79 # due to them being required very early in the boot process
pankso@12485 80 mkdir -p $fs/lib/udev/devices/pts
pankso@12976 81 mkdir -p $fs/lib/udev/devices/shm
pankso@12485 82 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
pankso@12976 83
pankso@2273 84 # Fix permissions
pankso@3149 85 chmod +x $fs/lib/udev/*
pankso@3149 86 chown -R root.root $fs
pankso@5 87 }
pankso@2085 88
pascal@3174 89 list_udev_group()
pascal@3174 90 {
al@18567 91 object=${2:-GROUP}
pascal@18730 92 grep $object "$1/etc/udev/rules.d/"* | \
al@18567 93 sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" | sort | uniq
pascal@3174 94 }
pascal@3174 95
pascal@3174 96 post_install()
pascal@3174 97 {
al@18567 98 # Sanity check for udev+ldap boot
al@18567 99 list_udev_group "$1" GROUP | \
al@18567 100 while read x; do
pascal@18730 101 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
al@18567 102 done
al@18567 103 list_udev_group "$1" OWNER | \
al@18567 104 while read x; do
pascal@18730 105 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
al@18567 106 done
pascal@3174 107 }