wok annotate udev/receipt @ rev 19922
Up ipxe (1.0.0-20170417)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 20 09:45:12 2017 +0200 (2017-04-20) |
parents | 9e01bc6321ea |
children | 86790a278e70 |
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" |
pascal@19246 | 16 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciids 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 { |
al@18567 | 88 object=${2:-GROUP} |
pascal@18730 | 89 grep $object "$1/etc/udev/rules.d/"* | \ |
al@18567 | 90 sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" | sort | uniq |
pascal@3174 | 91 } |
pascal@3174 | 92 |
pascal@3174 | 93 post_install() |
pascal@3174 | 94 { |
al@18567 | 95 # Sanity check for udev+ldap boot |
al@18567 | 96 list_udev_group "$1" GROUP | \ |
al@18567 | 97 while read x; do |
pascal@18730 | 98 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x |
al@18567 | 99 done |
al@18567 | 100 list_udev_group "$1" OWNER | \ |
al@18567 | 101 while read x; do |
pascal@18730 | 102 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x |
al@18567 | 103 done |
pascal@3174 | 104 } |