wok view udev/receipt @ rev 17145

libnxml: fix genpkg_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 10 12:55:03 2014 +0200 (2014-09-10)
parents 3865e09ec026
children 8f0d02db4d84
line source
1 # SliTaz package receipt.
3 PACKAGE="udev"
4 VERSION="182"
5 BUILD_WARNING="Install new udev package and rebuild hal"
6 CATEGORY="base-system"
7 SHORT_DESC="Udev creat automaticly right devices in /dev."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL2"
10 TARBALL="$PACKAGE-$VERSION.tar.xz"
11 WEB_SITE="http://www.freedesktop.org/software/systemd/man/udev.html"
12 WGET_URL="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
13 HOST_ARCH="i486 arm"
15 PROVIDES="udev"
17 DEPENDS="util-linux-blkid pciids usbids acl kmod"
18 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \
19 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
20 libgudev-dev pcre-dev liblzma-dev util-linux-uuid-dev"
22 # Use build host: gperf
23 case "$ARCH" in
24 arm*) BUILD_DEPENDS="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
25 esac
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 case "$ARCH" in
31 arm*)
32 # ARM Hack
33 for la in libgthread-2.0.la libglib-2.0.la
34 do
35 if grep -q "^libdir='/usr/lib'" /usr/lib/${la}; then
36 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
37 /usr/lib/${la}
38 fi
39 done ;;
40 esac
41 ./configure \
42 --exec-prefix="" \
43 --with-rootprefix="" \
44 --bindir=/sbin \
45 --sysconfdir=/etc \
46 --libexecdir=/lib \
47 --disable-manpages \
48 --disable-introspection \
49 --disable-keymap \
50 --enable-floppy \
51 --enable-rule_generator \
52 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
53 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
54 --with-systemdsystemunitdir=no \
55 $CONFIGURE_ARGS &&
56 make && make install
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/lib/firmware
64 cp -a $install/sbin $fs
65 cp -a $install/etc $fs
66 cp -a $install/lib/libudev*so* $fs/lib
67 cp -a $install/lib/udev $fs/lib
69 # Have udevd in PATH
70 mv $fs/lib/udev/udevd $fs/sbin
72 # Copy rules files to udev conf dir
73 mv -f $fs/lib/udev/rules.d $fs/etc/udev
74 cp $stuff/udev.conf $fs/etc/udev
75 cp $stuff/*.rules $fs/etc/udev/rules.d
77 # Create some devices and directories that Udev cannot handle
78 # due to them being required very early in the boot process
79 mkdir -p $fs/lib/udev/devices/pts
80 mkdir -p $fs/lib/udev/devices/shm
81 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
83 # Fix permissions
84 chmod +x $fs/lib/udev/*
85 chown -R root.root $fs
86 }
88 list_udev_group()
89 {
90 object=$2
91 [ -n "$object" ] || object=GROUP
92 grep $object $1/etc/udev/rules.d/* | \
93 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
94 }
96 post_install()
97 {
98 # Sanity check for udev+ldap boot
99 list_udev_group "$1" GROUP | while read x ; do
100 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
101 done
102 list_udev_group "$1" OWNER | while read x ; do
103 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
104 done
105 }