wok-current view udev/receipt @ rev 24603
inxi: update deps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 02 09:21:45 2022 +0000 (2022-03-02) |
parents | 86790a278e70 |
children | 73f36875e5a7 |
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="https://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 pciids 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 case "$ARCH" in
22 arm*) BUILD_DEPENDS="util-linux-blkid-dev kmod-dev acl-dev glib-dev"
23 esac
25 current_version()
26 {
27 wget -O - $(dirname $WGET_URL) 2>/dev/null | \
28 sed "/rc[0-9]/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 case "$ARCH" in
35 arm*)
36 # ARM Hack
37 for la in libgthread-2.0.la libglib-2.0.la
38 do
39 if grep -q "^libdir='/usr/lib'" /usr/lib/${la}; then
40 sed -i s"#/usr/lib#/cross/$ARCH/sysroot/usr/lib#" \
41 /usr/lib/${la}
42 fi
43 done ;;
44 esac
45 ./configure \
46 --exec-prefix="" \
47 --with-rootprefix="" \
48 --bindir=/sbin \
49 --sysconfdir=/etc \
50 --libexecdir=/lib \
51 --disable-manpages \
52 --disable-introspection \
53 --disable-keymap \
54 --enable-floppy \
55 --enable-rule_generator \
56 --with-pci-ids-path=/usr/share/misc/pci.ids.gz \
57 --with-usb-ids-path=/usr/share/misc/usb.ids.gz \
58 --with-systemdsystemunitdir=no \
59 $CONFIGURE_ARGS &&
60 make && make install
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $fs/lib/firmware
68 cp -a $install/sbin $fs
69 cp -a $install/etc $fs
70 cp -a $install/lib/libudev*so* $fs/lib
71 cp -a $install/lib/udev $fs/lib
73 # Have udevd in PATH
74 mv $fs/lib/udev/udevd $fs/sbin
76 # Copy rules files to udev conf dir
77 mv -f $fs/lib/udev/rules.d $fs/etc/udev
78 cp $stuff/udev.conf $fs/etc/udev
79 cp $stuff/*.rules $fs/etc/udev/rules.d
81 # Create some devices and directories that Udev cannot handle
82 # due to them being required very early in the boot process
83 mkdir -p $fs/lib/udev/devices/pts
84 mkdir -p $fs/lib/udev/devices/shm
85 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
87 # Fix permissions
88 chmod +x $fs/lib/udev/*
89 chown -R root.root $fs
90 }
92 list_udev_group()
93 {
94 object=${2:-GROUP}
95 grep $object "$1/etc/udev/rules.d/"* | \
96 sed "s|.*$object=\"\([a-zA-Z0-9]*\)\".*|\1|" | sort | uniq
97 }
99 post_install()
100 {
101 # Sanity check for udev+ldap boot
102 list_udev_group "$1" GROUP | \
103 while read x; do
104 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
105 done
106 list_udev_group "$1" OWNER | \
107 while read x; do
108 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
109 done
110 }