wok-current annotate eudev/receipt @ rev 24053

Up slitaz-boot-script (471)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 27 13:42:59 2021 +0000 (2021-05-27)
parents 281ca267525d
children 83927a09d38d
rev   line source
tcg@17143 1 # SliTaz package receipt.
tcg@17143 2
tcg@17143 3 PACKAGE="eudev"
Hans-G?nter@22707 4 VERSION="3.2.9"
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@22707 12 WGET_URL="https://dev.gentoo.org/~blueness/$PACKAGE/$TARBALL"
Hans-G?nter@22707 13
tcg@17143 14 PROVIDE="udev"
Hans-G?nter@22707 15 DEPENDS="acl dbus kmod pciids usbids util-linux-blkid"
Hans-G?nter@22707 16 BUILD_DEPENDS="acl-dev dbus-dev gperf kmod-dev pcre-dev pkg-config
Hans-G?nter@22707 17 util-linux-blkid-dev util-linux-uuid-dev"
tcg@17143 18
tcg@17143 19 # Rules to configure and make the package.
tcg@17143 20 compile_rules()
tcg@17143 21 {
Hans-G?nter@22707 22 # 3.2.9 unrecognised:
Hans-G?nter@22707 23 # --disable-keymap
Hans-G?nter@22707 24 # --enable-floppy
Hans-G?nter@22707 25
Hans-G?nter@22707 26 ./configure \
Hans-G?nter@22707 27 --sysconfdir=/etc \
Hans-G?nter@22707 28 --exec-prefix="" \
Hans-G?nter@22707 29 --with-rootprefix="" \
Hans-G?nter@22707 30 --disable-manpages \
Hans-G?nter@22707 31 --disable-introspection \
Hans-G?nter@22707 32 --enable-rule-generator \
tcg@17143 33 $CONFIGURE_ARGS &&
tcg@17143 34 make &&
tcg@17143 35 make DESTDIR=$DESTDIR install
tcg@17143 36 }
tcg@17143 37
tcg@17143 38 # Rules to gen a SliTaz package suitable for Tazpkg.
tcg@17143 39 genpkg_rules()
tcg@17143 40 {
tcg@17143 41 mkdir -p $fs/lib/firmware
tcg@17143 42
mojo@23807 43 cp -a $install/bin $fs
Hans-G?nter@22707 44 cp -a $install/sbin $fs
Hans-G?nter@22707 45 cp -a $install/etc $fs
Hans-G?nter@22707 46 cp -a $install/lib/libudev*so* $fs/lib
Hans-G?nter@22707 47 cp -a $install/lib/udev $fs/lib
tcg@17143 48
Hans-G?nter@22707 49 # Copy rules files to udev configuration directory
Hans-G?nter@22707 50 mv -f $fs/lib/udev/rules.d $fs/etc/udev
Hans-G?nter@22707 51 cp $stuff/udev.conf $fs/etc/udev
Hans-G?nter@22707 52 cp $stuff/*.rules $fs/etc/udev/rules.d
tcg@17143 53
tcg@17143 54 # Create some devices and directories that Udev cannot handle
tcg@17143 55 # due to them being required very early in the boot process
tcg@17143 56 mkdir -p $fs/lib/udev/devices/pts
tcg@17143 57 mkdir -p $fs/lib/udev/devices/shm
tcg@17143 58 mknod -m 0666 $fs/lib/udev/devices/null c 1 3
tcg@17143 59
tcg@17143 60 # Fix permissions
Hans-G?nter@22707 61 chmod +x $fs/lib/udev/*
Hans-G?nter@22707 62 chown -R root.root $fs
tcg@17143 63 }
tcg@17143 64
tcg@17143 65 list_udev_group()
tcg@17143 66 {
al@18663 67 object=$2
al@18663 68 [ -n "$object" ] || object=GROUP
pascal@18730 69 grep $object "$1"/etc/udev/rules.d/* | \
al@18663 70 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq
tcg@17143 71 }
tcg@17143 72
tcg@17143 73 post_install()
tcg@17143 74 {
al@18663 75 # Sanity check for udev+ldap boot
al@18663 76 list_udev_group "$1" GROUP | \
Hans-G?nter@22707 77 while read x
Hans-G?nter@22707 78 do
al@18663 79 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x
Hans-G?nter@22707 80 done
al@18663 81
al@18663 82 list_udev_group "$1" OWNER | \
Hans-G?nter@22707 83 while read x
Hans-G?nter@22707 84 do
al@18663 85 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x
Hans-G?nter@22707 86 done
tcg@17143 87 }