wok-next annotate udev/receipt @ rev 21276
try to build gens-gs again
author | Hans-G?nter Theisgen |
---|---|
date | Sat Dec 07 15:51:18 2019 +0100 (2019-12-07) |
parents | 342b30daff76 |
children |
rev | line source |
---|---|
al@20456 | 1 # SliTaz package receipt v2. |
pankso@5 | 2 |
pankso@5 | 3 PACKAGE="udev" |
pankso@12485 | 4 VERSION="182" |
pankso@210 | 5 CATEGORY="base-system" |
al@20456 | 6 SHORT_DESC="Udev creat automaticly right devices in /dev" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
al@19612 | 9 WEB_SITE="https://www.freedesktop.org/software/systemd/man/udev.html" |
al@19612 | 10 |
pankso@12485 | 11 TARBALL="$PACKAGE-$VERSION.tar.xz" |
al@19612 | 12 WGET_URL="https://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL" |
pankso@5 | 13 |
al@20513 | 14 BUILD_DEPENDS="util-linux-blkid-dev gperf pciids acl-dev \ |
al@19779 | 15 usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \ |
al@20452 | 16 libgudev-dev pcre-dev xz-dev util-linux-uuid-dev" |
al@21020 | 17 SPLIT="$PACKAGE-dev" |
pankso@9753 | 18 |
al@20604 | 19 BUILD_WARNING="Install new udev package and rebuild hal" |
al@20604 | 20 |
al@20456 | 21 compile_rules() { |
pascal@19621 | 22 sed -i 's/.*mtd-user.*/&\n#include <stdint.h>/' src/mtd_probe/mtd_probe.h |
pascal@19940 | 23 export LDFLAGS="$LDFLAGS -lrt" |
pankso@12485 | 24 ./configure \ |
pankso@1270 | 25 --exec-prefix="" \ |
pankso@12485 | 26 --with-rootprefix="" \ |
pankso@12485 | 27 --bindir=/sbin \ |
pankso@12485 | 28 --libexecdir=/lib \ |
pankso@12485 | 29 --disable-manpages \ |
pankso@12485 | 30 --disable-introspection \ |
pankso@12485 | 31 --disable-keymap \ |
pankso@12485 | 32 --enable-floppy \ |
pankso@12485 | 33 --enable-rule_generator \ |
pankso@12485 | 34 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \ |
pankso@12485 | 35 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \ |
pankso@12485 | 36 --with-systemdsystemunitdir=no \ |
pankso@12485 | 37 $CONFIGURE_ARGS && |
al@20604 | 38 fix libtool && |
al@20534 | 39 make && |
al@20534 | 40 make install |
pankso@5 | 41 } |
pankso@5 | 42 |
al@20456 | 43 genpkg_rules() { |
al@20456 | 44 case $PACKAGE in |
al@20456 | 45 udev) |
al@20456 | 46 mkdir -p $fs/lib/firmware |
pankso@789 | 47 |
al@20456 | 48 cp -a $install/sbin $fs |
al@20456 | 49 cp -a $install/etc $fs |
al@20456 | 50 cp -a $install/lib/libudev*so* $fs/lib |
al@20456 | 51 cp -a $install/lib/udev $fs/lib |
pankso@12976 | 52 |
al@20456 | 53 # Have udevd in PATH |
al@20456 | 54 mv $fs/lib/udev/udevd $fs/sbin |
rcx@3782 | 55 |
al@20456 | 56 # Copy rules files to udev conf dir |
al@20456 | 57 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
al@20456 | 58 cp $stuff/udev.conf $fs/etc/udev |
al@20456 | 59 cp $stuff/*.rules $fs/etc/udev/rules.d |
pankso@12976 | 60 |
al@20456 | 61 # Create some devices and directories that Udev cannot handle |
al@20456 | 62 # due to them being required very early in the boot process |
al@20456 | 63 mkdir -p $fs/lib/udev/devices/pts |
al@20456 | 64 mkdir -p $fs/lib/udev/devices/shm |
al@20456 | 65 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
pankso@12976 | 66 |
al@20456 | 67 # Fix permissions |
al@20456 | 68 chmod +x $fs/lib/udev/* |
al@20456 | 69 chown -R root.root $fs |
al@20749 | 70 DEPENDS="kmod util-linux-blkid pciids usbids acl" |
al@20456 | 71 ;; |
al@20456 | 72 *-dev) |
al@20604 | 73 copy @dev |
al@20456 | 74 ;; |
al@20456 | 75 esac |
pankso@5 | 76 } |
pankso@2085 | 77 |
al@20456 | 78 post_install_udev() { |
al@18567 | 79 # Sanity check for udev+ldap boot |
al@20456 | 80 grep GROUP "$1/etc/udev/rules.d/"* \ |
al@20456 | 81 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \ |
al@20456 | 82 | sort \ |
al@20456 | 83 | uniq \ |
al@20456 | 84 | while read x; do |
pascal@18730 | 85 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x |
al@18567 | 86 done |
al@20456 | 87 |
al@20456 | 88 grep OWNER "$1/etc/udev/rules.d/"* \ |
al@20456 | 89 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \ |
al@20456 | 90 | sort \ |
al@20456 | 91 | uniq \ |
al@20457 | 92 | while read x; do |
pascal@18730 | 93 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x |
al@18567 | 94 done |
pascal@3174 | 95 } |