# Maintainer: Natanael Copa pkgname=eudev pkgver=3.1.2 pkgrel=5 pkgdesc="OpenRC compatible fork of systemd-udev" url="https://wiki.gentoo.org/wiki/Project:Eudev" arch="all" license="GPLv2" depends="udev-init-scripts" depends_dev="" replaces="udev" makedepends="$depends_dev gperf glib-dev linux-headers kmod-dev gobject-introspection-dev" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-libgudev $pkgname-libs" source="http://dev.gentoo.org/~blueness/eudev/eudev-$pkgver.tar.gz udev-postmount.initd setup-udev " _builddir="$srcdir"/eudev-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" # we need disable kmod til busybox depmod generates binary formats: # modules.dep.bin modules.alias.bin modules.symbols.bin # modules.builtin.bin ./configure \ --build=$CBUILD \ --host=$CHOST \ --sysconfdir=/etc \ --with-rootprefix= \ --with-rootrundir=/run \ --with-rootlibexecdir=/lib/udev \ --libdir=/usr/lib \ --enable-split-usr \ --enable-manpages \ --disable-hwdb \ --enable-kmod \ --exec-prefix=/ \ --enable-gudev \ --enable-introspection \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" sharepkgconfigdir=/usr/lib/pkgconfig \ install || return 1 for i in $source; do case $i in *.initd) install -Dm755 "$srcdir"/$i \ "$pkgdir"/etc/init.d/${i%.initd} || return 1 ;; esac done install -Dm755 "$srcdir"/setup-udev "$pkgdir"/sbin/setup-udev } dev() { replaces="udev-dev" default_dev } libs() { pkgdesc="Dynamic library to access udev device information" replaces="libudev" depends="" mkdir -p "$subpkgdir"/lib for i in "$pkgdir"/usr/lib/libudev.so.*; do mv $i "$subpkgdir"/lib || return 1 ln -s ../../lib/${i##*/} "$pkgdir"/usr/lib/${i##*/} || return 1 done } libgudev() { pkgdesc="A GObject wrapper of the library gudev" replaces="libgudev" depends="" mkdir -p "$subpkgdir"/usr/lib || return 1 mv "$pkgdir"/usr/lib/libgudev* "$subpkgdir"/usr/lib/ || return 1 mv "$pkgdir"/usr/lib/girepository-* \ "$subpkgdir"/usr/lib/ } md5sums="07ab33fe310d250f06fc28f010e3fde2 eudev-3.1.2.tar.gz 17ca36a764f5e8a89454344cde828740 udev-postmount.initd 6fe6a4b05f2768e240c3a20caa0f0cee setup-udev" sha256sums="4393b69e93dd8117defde6519b199d479f9d051f52061157a1a7a41b8fe10273 eudev-3.1.2.tar.gz b0327069dbb57b39600079b87df80915dabb77c2fa298d6ae109ca04f8ba08b5 udev-postmount.initd 7c961c05700e881677249d3aa0ac3a4b489d203cab7464d38f1a78c3692026be setup-udev" sha512sums="d9aeb37a163ce4a0c116f75a927b4b99f8445d06624fbb3c28ade18f3effd8c54af5a4a52477c31a0452822a3dc0901468263195256e9dbf79d2ef08cf46f2b6 eudev-3.1.2.tar.gz 8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd aa8a040ad503633bf751e8cab34535715f0db2a8b4b716a1dc0b00a6f9c6a78fabc0652daba3e43df91d4d80c68563c00a27b7bc6f419573bc7704a5c7f76ee1 setup-udev"