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