wok-current view 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 |
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 DEPENDS="util-linux-blkid pciids usbids acl kmod"
16 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciutils acl-dev \
17 libgio-dev usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
18 libgudev-dev pcre-dev liblzma-dev util-linux-uuid-dev"
20 # Use build host: gperf
21 BUILD_DEPENDS="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 case "$ARCH" in
27 arm*)
28 # ARM Hack
29 for la in libgthread-2.0.la libglib-2.0.la
30 do
31 if grep -q "^libdir='/usr/lib'" /usr/lib/${la}; then
32 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
33 /usr/lib/${la}
34 fi
35 done ;;
36 esac
37 ./configure \
38 --exec-prefix="" \
39 --with-rootprefix="" \
40 --bindir=/sbin \
41 --sysconfdir=/etc \
42 --libexecdir=/lib \
43 --disable-manpages \
44 --disable-introspection \
45 --disable-keymap \
46 --enable-floppy \
47 --enable-rule_generator \
48 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
49 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
50 --with-systemdsystemunitdir=no \
51 $CONFIGURE_ARGS &&
52 make && make install
53 }
55 # Rules to gen a SliTaz package suitable for Tazpkg.
56 genpkg_rules()
57 {
58 mkdir -p $fs/lib/firmware
60 cp -a $install/sbin $fs
61 cp -a $install/etc $fs
62 cp -a $install/lib/libudev*so* $fs/lib
63 cp -a $install/lib/udev $fs/lib
65 # Have udevd in PATH
66 mv $fs/lib/udev/udevd $fs/sbin
68 # Copy rules files to udev conf dir
69 mv -f $fs/lib/udev/rules.d $fs/etc/udev
70 cp $stuff/udev.conf $fs/etc/udev
71 cp $stuff/*.rules $fs/etc/udev/rules.d
73 # Create some devices and directories that Udev cannot handle
74 # due to them being required very early in the boot process
75 mkdir -p $fs/lib/udev/devices/pts
76 mkdir -p $fs/lib/udev/devices/shm
77 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
79 # Fix permissions
80 chmod +x $fs/lib/udev/*
81 chown -R root.root $fs
82 }
84 list_udev_group()
85 {
86 object=$2
87 [ -n "$object" ] || object=GROUP
88 grep $object $1/etc/udev/rules.d/* | \
89 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
90 }
92 post_install()
93 {
94 # Sanity check for udev+ldap boot
95 list_udev_group "$1" GROUP | while read x ; do
96 grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
97 done
98 list_udev_group "$1" OWNER | while read x ; do
99 grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
100 done
101 }