wok-next view udev/receipt @ rev 20534

Clean default configure options when site script used.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 30 19:31:50 2018 +0300 (2018-03-30)
parents d43bf7aae921
children 10df65db91ad
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"
10 BUILD_WARNING="Install new udev package and rebuild hal"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://www.kernel.org/pub/linux/utils/kernel/hotplug/$TARBALL"
15 BUILD_DEPENDS_arm="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
16 BUILD_DEPENDS="util-linux-blkid-dev gperf pciids acl-dev \
17 usbutils-dev libusb-dev glib-dev pciids usbids kmod-dev \
18 libgudev-dev pcre-dev xz-dev util-linux-uuid-dev"
19 SPLIT="udev-dev"
21 compile_rules() {
22 case "$ARCH" in
23 arm*) # ARM Hack
24 for la in libgthread-2.0.la libglib-2.0.la; do
25 if grep -q "^libdir='/usr/lib'" /usr/lib/$la; then
26 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
27 /usr/lib/$la
28 fi
29 done ;;
30 esac
32 sed -i 's/.*mtd-user.*/&\n#include <stdint.h>/' src/mtd_probe/mtd_probe.h
33 export LDFLAGS="$LDFLAGS -lrt"
34 ./configure \
35 --exec-prefix="" \
36 --with-rootprefix="" \
37 --bindir=/sbin \
38 --libexecdir=/lib \
39 --disable-manpages \
40 --disable-introspection \
41 --disable-keymap \
42 --enable-floppy \
43 --enable-rule_generator \
44 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
45 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
46 --with-systemdsystemunitdir=no \
47 $CONFIGURE_ARGS &&
48 make &&
49 make install
50 }
52 genpkg_rules() {
53 case $PACKAGE in
54 udev)
55 mkdir -p $fs/lib/firmware
57 cp -a $install/sbin $fs
58 cp -a $install/etc $fs
59 cp -a $install/lib/libudev*so* $fs/lib
60 cp -a $install/lib/udev $fs/lib
62 # Have udevd in PATH
63 mv $fs/lib/udev/udevd $fs/sbin
65 # Copy rules files to udev conf dir
66 mv -f $fs/lib/udev/rules.d $fs/etc/udev
67 cp $stuff/udev.conf $fs/etc/udev
68 cp $stuff/*.rules $fs/etc/udev/rules.d
70 # Create some devices and directories that Udev cannot handle
71 # due to them being required very early in the boot process
72 mkdir -p $fs/lib/udev/devices/pts
73 mkdir -p $fs/lib/udev/devices/shm
74 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
76 # Fix permissions
77 chmod +x $fs/lib/udev/*
78 chown -R root.root $fs
79 DEPENDS="util-linux-blkid pciids usbids acl kmod"
80 ;;
81 *-dev)
82 mkdir -p $fs/lib $fs/usr/lib/pkgconfig $fs/usr/include
83 cp -a $install/lib/libudev*a $fs/lib
84 cp -a $install/lib/pkgconfig/libudev.pc $fs/usr/lib/pkgconfig
85 cp -a $install/usr/share/pkgconfig/* $fs/usr/lib/pkgconfig
86 cp -a $install/usr/include/libudev.h $fs/usr/include
87 ;;
88 esac
89 }
91 post_install_udev() {
92 # Sanity check for udev+ldap boot
93 grep GROUP "$1/etc/udev/rules.d/"* \
94 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \
95 | sort \
96 | uniq \
97 | while read x; do
98 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
99 done
101 grep OWNER "$1/etc/udev/rules.d/"* \
102 | sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" \
103 | sort \
104 | uniq \
105 | while read x; do
106 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
107 done
108 }