wok-next view udev/receipt @ rev 20194
Up irrlicht (1.8.4)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 03 11:27:16 2017 +0100 (2017-11-03) |
parents | e70c0b9c5adf |
children | 0fcf48f89432 |
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 WEB_SITE="https://www.freedesktop.org/software/systemd/man/udev.html"
11 HOST_ARCH="i486 arm"
13 TARBALL="$PACKAGE-$VERSION.tar.xz"
14 WGET_URL="https://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
16 DEPENDS="util-linux-blkid pciids usbids acl kmod"
17 BUILD_DEPENDS="util-linux-blkid-dev gperf pkg-config pciids acl-dev \
18 usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
19 libgudev-dev pcre-dev liblzma-dev util-linux-uuid-dev"
21 # Use build host: gperf
22 case "$ARCH" in
23 arm*) BUILD_DEPENDS="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
24 esac
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 case "$ARCH" in
30 arm*)
31 # ARM Hack
32 for la in libgthread-2.0.la libglib-2.0.la
33 do
34 if grep -q "^libdir='/usr/lib'" /usr/lib/${la}; then
35 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
36 /usr/lib/${la}
37 fi
38 done ;;
39 esac
40 sed -i 's/.*mtd-user.*/&\n#include <stdint.h>/' src/mtd_probe/mtd_probe.h
41 export LDFLAGS="$LDFLAGS -lrt"
42 ./configure \
43 --exec-prefix="" \
44 --with-rootprefix="" \
45 --bindir=/sbin \
46 --sysconfdir=/etc \
47 --libexecdir=/lib \
48 --disable-manpages \
49 --disable-introspection \
50 --disable-keymap \
51 --enable-floppy \
52 --enable-rule_generator \
53 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
54 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
55 --with-systemdsystemunitdir=no \
56 $CONFIGURE_ARGS &&
57 make && make install
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 mkdir -p $fs/lib/firmware
65 cp -a $install/sbin $fs
66 cp -a $install/etc $fs
67 cp -a $install/lib/libudev*so* $fs/lib
68 cp -a $install/lib/udev $fs/lib
70 # Have udevd in PATH
71 mv $fs/lib/udev/udevd $fs/sbin
73 # Copy rules files to udev conf dir
74 mv -f $fs/lib/udev/rules.d $fs/etc/udev
75 cp $stuff/udev.conf $fs/etc/udev
76 cp $stuff/*.rules $fs/etc/udev/rules.d
78 # Create some devices and directories that Udev cannot handle
79 # due to them being required very early in the boot process
80 mkdir -p $fs/lib/udev/devices/pts
81 mkdir -p $fs/lib/udev/devices/shm
82 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
84 # Fix permissions
85 chmod +x $fs/lib/udev/*
86 chown -R root.root $fs
87 }
89 list_udev_group()
90 {
91 object=${2:-GROUP}
92 grep $object "$1/etc/udev/rules.d/"* | \
93 sed "s|.*$object=\"\([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 | \
100 while read x; do
101 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
102 done
103 list_udev_group "$1" OWNER | \
104 while read x; do
105 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
106 done
107 }