# Contributor: Sören Tempel # Contributor: Natanael Copa # Maintainer: Ariadne Conill pkgname=eudev pkgver=3.2.12 _pkgver=${pkgver/_pre/-pre} pkgrel=4 pkgdesc="init system agnostic fork of systemd-udev" url="https://github.com/eudev-project/eudev" arch="all" license="GPL-2.0-or-later" depends="udev-init-scripts" replaces="udev" provides="udev=176" provider_priority=100 makedepends=" gperf glib-dev linux-headers kmod-dev gobject-introspection-dev util-linux-dev " checkdepends="tree xz perl" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc $pkgname-netifnames::noarch $pkgname-rule-generator::noarch $pkgname-hwids" triggers="eudev.trigger=/lib/udev/rules.d:/usr/lib/udev/rules.d" source="https://github.com/eudev-project/eudev/releases/download/v$_pkgver/eudev-$_pkgver.tar.gz default-rules.patch load-fbcon.patch no-sgx.patch udev-postmount.initd " builddir="$srcdir"/"$pkgname"-"$_pkgver" build() { CFLAGS="$CFLAGS -flto=auto" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --sysconfdir=/etc \ --with-rootprefix= \ --with-rootrundir=/run \ --with-rootlibexecdir=/lib/udev \ --libdir=/usr/lib \ --enable-split-usr \ --enable-manpages \ --enable-kmod \ --exec-prefix=/ \ --bindir=/bin make } check() { make check } package() { make DESTDIR="$pkgdir" sharepkgconfigdir=/usr/lib/pkgconfig \ install install -Dm755 "$srcdir"/udev-postmount.initd \ "$pkgdir"/etc/init.d/udev-postmount } dev() { replaces="udev-dev" default_dev } libs() { pkgdesc="Dynamic library to access udev device information" replaces="libudev" depends="" mkdir -p "$subpkgdir"/lib local i; for i in "$pkgdir"/usr/lib/libudev.so.*; do mv $i "$subpkgdir"/lib ln -s ../../lib/${i##*/} "$pkgdir"/usr/lib/${i##*/} done } netifnames() { pkgdesc="udev rules for systemd-style interface names" depends="!$pkgname-rule-generator" mkdir -p "$subpkgdir"/lib/udev/rules.d mv "$pkgdir"/lib/udev/rules.d/80-net-name-slot.rules \ "$subpkgdir"/lib/udev/rules.d/ } generator() { pkgdesc="generate udev net persistance rules" depends="!$pkgname-netifnames" # Since we didn't enable rules-generator which disables netifnames, we # install the rule-generator files. sed -i 's/"write_net_rules"/"\/lib\/udev\/rule_generator\/write_net_rules"/' \ "$builddir"/rule_generator/75-persistent-net-generator.rules install -Dm644 "$builddir"/rule_generator/75-persistent-net-generator.rules \ "$subpkgdir"/lib/udev/rules.d/75-persistent-net-generator.rules install -Dm755 "$builddir"/rule_generator/write_net_rules \ "$subpkgdir"/lib/udev/rule_generator/write_net_rules install -Dm755 "$builddir"/rule_generator/rule_generator.functions \ "$subpkgdir"/lib/udev/rule_generator.functions } hwids() { pkgdesc="Hardware identification databases (from eudev)" provides="hwids-udev=$pkgver-r$pkgrel" install_if="hwdata eudev=$pkgver-r$pkgrel" triggers="eudev-hwids.trigger=/lib/udev/hwdb.d:/etc/udev/hwdb.d:/usr/lib/udev/hwdb.d" amove etc/udev/hwdb.d } sha512sums=" da63364e4337515b60a39d354344c03afa1f79d76e264f2ec859c8b8c922595cf24c046e5b0a1bbaa33c5eb6d47632e7853a51bc9304dce2c308318e094a6ec1 eudev-3.2.12.tar.gz 683e3c26ca4f058303f8db7d4977e436d728386ee6866719c4f11ff31db27572d3f486f51d3173310e1ec2cf995fa4c396f2415bdf45dabdd80e6e55e798a314 default-rules.patch ff5928fd555e095d9f3234dd004ac4c5925405d308777e9b018e8e03112cd109935b51d75a3bc4a2a1018eb486e8a5e5ef6ee978860002a8fff93b116e9721f5 load-fbcon.patch 1558800e4132ed2c10b37805fca044ff3129cdfebec71d3e758143fab9ffda824e86d52960926a9042b21fc22f0cda8fe6690484913bd7c3dc4436af92923efe no-sgx.patch 8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd "