wok annotate eudev/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (2022-05-21)
parents 42a93682ac45
children 20ad21d5532c
rev   line source
tcg@17143 1 # SliTaz package receipt.
tcg@17143 2
tcg@17143 3 PACKAGE="eudev"
Hans-G?nter@24523 4 VERSION="3.2.11"
tcg@17143 5 CATEGORY="base-system"
Hans-G?nter@22707 6 SHORT_DESC="Fork of udev to avoid depending on systemd."
tcg@17143 7 MAINTAINER="tcg.thegamer@gmail.com"
pascal@17147 8 LICENSE="GPL2"
Hans-G?nter@22707 9 WEB_SITE="https://wiki.gentoo.org/wiki/Project:Eudev"
Hans-G?nter@22707 10
tcg@17143 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@24523 12 WGET_URL="https://github.com/eudev-project/$PACKAGE/archive/refs/tags/v$VERSION.tar.gz"
Hans-G?nter@22707 13
tcg@17143 14 PROVIDE="udev"
pascal@24126 15 DEPENDS="acl dbus kmod pciids usbids util-linux-blkid eudev-lib"
Hans-G?nter@24524 16 BUILD_DEPENDS="acl-dev automake dbus-dev gperf kmod-dev libtool libxslt
Hans-G?nter@24523 17 pcre-dev pkg-config util-linux-blkid-dev util-linux-uuid-dev"
tcg@17143 18
pascal@24614 19 # What is the latest version available today?
pascal@24126 20 current_version()
pascal@24126 21 {
pascal@24614 22 wget -O - https://github.com/eudev-project/eudev/releases 2>/dev/null | \
pascal@24614 23 sed '/archive.*tar/!d;s|.*/[A-Za-z-]*\(.*\).tar.*|\1|;q'
pascal@24126 24 }
pascal@24126 25
tcg@17143 26 # Rules to configure and make the package.
tcg@17143 27 compile_rules()
tcg@17143 28 {
Hans-G?nter@22707 29 # 3.2.9 unrecognised:
Hans-G?nter@22707 30 # --disable-keymap
Hans-G?nter@22707 31 # --enable-floppy
Hans-G?nter@22707 32
Hans-G?nter@24523 33 ./autogen.sh &&
Hans-G?nter@22707 34 ./configure \
Hans-G?nter@22707 35 --sysconfdir=/etc \
Hans-G?nter@22707 36 --exec-prefix="" \
Hans-G?nter@22707 37 --with-rootprefix="" \
Hans-G?nter@22707 38 --disable-manpages \
Hans-G?nter@22707 39 --disable-introspection \
Hans-G?nter@22707 40 --enable-rule-generator \
tcg@17143 41 $CONFIGURE_ARGS &&
tcg@17143 42 make &&
Hans-G?nter@24523 43 make install DESTDIR=$DESTDIR
tcg@17143 44 }
tcg@17143 45
tcg@17143 46 # Rules to gen a SliTaz package suitable for Tazpkg.
tcg@17143 47 genpkg_rules()
tcg@17143 48 {
tcg@17143 49 mkdir -p $fs/lib/firmware
tcg@17143 50
mojo@23807 51 cp -a $install/bin $fs
Hans-G?nter@22707 52 cp -a $install/sbin $fs
Hans-G?nter@22707 53 cp -a $install/etc $fs
Hans-G?nter@22707 54 cp -a $install/lib/udev $fs/lib
tcg@17143 55
Hans-G?nter@22707 56 # Copy rules files to udev configuration directory
Hans-G?nter@22707 57 mv -f $fs/lib/udev/rules.d $fs/etc/udev
Hans-G?nter@22707 58 cp $stuff/udev.conf $fs/etc/udev
Hans-G?nter@22707 59 cp $stuff/*.rules $fs/etc/udev/rules.d
tcg@17143 60
tcg@17143 61 # Create some devices and directories that Udev cannot handle
tcg@17143 62 # due to them being required very early in the boot process
tcg@17143 63 mkdir -p $fs/lib/udev/devices/pts
tcg@17143 64 mkdir -p $fs/lib/udev/devices/shm
tcg@17143 65 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
tcg@17143 66
tcg@17143 67 # Fix permissions
Hans-G?nter@22707 68 chmod +x $fs/lib/udev/*
Hans-G?nter@22707 69 chown -R root.root $fs
tcg@17143 70 }
tcg@17143 71
tcg@17143 72 list_udev_group()
tcg@17143 73 {
al@18663 74 object=$2
al@18663 75 [ -n "$object" ] || object=GROUP
pascal@18730 76 grep $object "$1"/etc/udev/rules.d/* | \
al@18663 77 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
tcg@17143 78 }
tcg@17143 79
tcg@17143 80 post_install()
tcg@17143 81 {
al@18663 82 # Sanity check for udev+ldap boot
al@18663 83 list_udev_group "$1" GROUP | \
Hans-G?nter@22707 84 while read x
Hans-G?nter@22707 85 do
al@18663 86 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
Hans-G?nter@22707 87 done
al@18663 88
al@18663 89 list_udev_group "$1" OWNER | \
Hans-G?nter@22707 90 while read x
Hans-G?nter@22707 91 do
al@18663 92 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
Hans-G?nter@22707 93 done
tcg@17143 94 }