wok-6.x annotate eudev/receipt @ rev 23548
Up bcrelay (1.4.0)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 06 17:04:09 2020 +0000 (2020-04-06) |
parents | 9e01bc6321ea |
children | b6e9ec8873bb |
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 |
Hans-G?nter@22707 | 43 cp -a $install/sbin $fs |
Hans-G?nter@22707 | 44 cp -a $install/etc $fs |
Hans-G?nter@22707 | 45 cp -a $install/lib/libudev*so* $fs/lib |
Hans-G?nter@22707 | 46 cp -a $install/lib/udev $fs/lib |
tcg@17143 | 47 |
Hans-G?nter@22707 | 48 # Copy rules files to udev configuration directory |
Hans-G?nter@22707 | 49 mv -f $fs/lib/udev/rules.d $fs/etc/udev |
Hans-G?nter@22707 | 50 cp $stuff/udev.conf $fs/etc/udev |
Hans-G?nter@22707 | 51 cp $stuff/*.rules $fs/etc/udev/rules.d |
tcg@17143 | 52 |
tcg@17143 | 53 # Create some devices and directories that Udev cannot handle |
tcg@17143 | 54 # due to them being required very early in the boot process |
tcg@17143 | 55 mkdir -p $fs/lib/udev/devices/pts |
tcg@17143 | 56 mkdir -p $fs/lib/udev/devices/shm |
tcg@17143 | 57 mknod -m 0666 $fs/lib/udev/devices/null c 1 3 |
tcg@17143 | 58 |
tcg@17143 | 59 # Fix permissions |
Hans-G?nter@22707 | 60 chmod +x $fs/lib/udev/* |
Hans-G?nter@22707 | 61 chown -R root.root $fs |
tcg@17143 | 62 } |
tcg@17143 | 63 |
tcg@17143 | 64 list_udev_group() |
tcg@17143 | 65 { |
al@18663 | 66 object=$2 |
al@18663 | 67 [ -n "$object" ] || object=GROUP |
pascal@18730 | 68 grep $object "$1"/etc/udev/rules.d/* | \ |
al@18663 | 69 sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq |
tcg@17143 | 70 } |
tcg@17143 | 71 |
tcg@17143 | 72 post_install() |
tcg@17143 | 73 { |
al@18663 | 74 # Sanity check for udev+ldap boot |
al@18663 | 75 list_udev_group "$1" GROUP | \ |
Hans-G?nter@22707 | 76 while read x |
Hans-G?nter@22707 | 77 do |
al@18663 | 78 grep -q ^$x: "$1/etc/group" || chroot "$1/" addgroup -S $x |
Hans-G?nter@22707 | 79 done |
al@18663 | 80 |
al@18663 | 81 list_udev_group "$1" OWNER | \ |
Hans-G?nter@22707 | 82 while read x |
Hans-G?nter@22707 | 83 do |
al@18663 | 84 grep -q ^$x: "$1/etc/passwd" || chroot "$1/" adduser -S -D -H $x |
Hans-G?nter@22707 | 85 done |
tcg@17143 | 86 } |