wok-next view udev/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents 996a44dea70d
children e70c0b9c5adf
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 libgio-dev 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 ./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:-GROUP}
91 grep $object "$1/etc/udev/rules.d/"* | \
92 sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" | sort | uniq
93 }
95 post_install()
96 {
97 # Sanity check for udev+ldap boot
98 list_udev_group "$1" GROUP | \
99 while read x; do
100 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
101 done
102 list_udev_group "$1" OWNER | \
103 while read x; do
104 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
105 done
106 }