wok-next view udev/receipt @ rev 20765

Up cookutils (1066); add xmahjongg
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jun 06 00:54:44 2018 +0300 (2018-06-06)
parents 10df65db91ad
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="udev"
4 VERSION="182"
5 CATEGORY="base-system"
6 SHORT_DESC="Udev creat automaticly right devices in /dev"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.freedesktop.org/software/systemd/man/udev.html"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
14 BUILD_DEPENDS_arm="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
15 BUILD_DEPENDS="util-linux-blkid-dev gperf pciids acl-dev \
16 usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
17 libgudev-dev pcre-dev xz-dev util-linux-uuid-dev"
18 SPLIT="udev-dev"
20 BUILD_WARNING="Install new udev package and rebuild hal"
22 compile_rules() {
23 case "$ARCH" in
24 arm*) # ARM Hack
25 for la in libgthread-2.0.la libglib-2.0.la; do
26 if grep -q "^libdir='/usr/lib'" /usr/lib/$la; then
27 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
28 /usr/lib/$la
29 fi
30 done ;;
31 esac
33 sed -i 's/.*mtd-user.*/&\n#include <stdint.h>/' src/mtd_probe/mtd_probe.h
34 export LDFLAGS="$LDFLAGS -lrt"
35 ./configure \
36 --exec-prefix="" \
37 --with-rootprefix="" \
38 --bindir=/sbin \
39 --libexecdir=/lib \
40 --disable-manpages \
41 --disable-introspection \
42 --disable-keymap \
43 --enable-floppy \
44 --enable-rule_generator \
45 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
46 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
47 --with-systemdsystemunitdir=no \
48 $CONFIGURE_ARGS &&
49 fix libtool &&
50 make &&
51 make install
52 }
54 genpkg_rules() {
55 case $PACKAGE in
56 udev)
57 mkdir -p $fs/lib/firmware
59 cp -a $install/sbin $fs
60 cp -a $install/etc $fs
61 cp -a $install/lib/libudev*so* $fs/lib
62 cp -a $install/lib/udev $fs/lib
64 # Have udevd in PATH
65 mv $fs/lib/udev/udevd $fs/sbin
67 # Copy rules files to udev conf dir
68 mv -f $fs/lib/udev/rules.d $fs/etc/udev
69 cp $stuff/udev.conf $fs/etc/udev
70 cp $stuff/*.rules $fs/etc/udev/rules.d
72 # Create some devices and directories that Udev cannot handle
73 # due to them being required very early in the boot process
74 mkdir -p $fs/lib/udev/devices/pts
75 mkdir -p $fs/lib/udev/devices/shm
76 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
78 # Fix permissions
79 chmod +x $fs/lib/udev/*
80 chown -R root.root $fs
81 DEPENDS="kmod util-linux-blkid pciids usbids acl"
82 ;;
83 *-dev)
84 copy @dev
85 ;;
86 esac
87 }
89 post_install_udev() {
90 # Sanity check for udev+ldap boot
91 grep GROUP "$1/etc/udev/rules.d/"* \
92 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \
93 | sort \
94 | uniq \
95 | while read x; do
96 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
97 done
99 grep OWNER "$1/etc/udev/rules.d/"* \
100 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \
101 | sort \
102 | uniq \
103 | while read x; do
104 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
105 done
106 }