# Maintainer: fbt # Contributor: artoo # Contributor: Alexey D. # Contributor: Ivailo Monev _udev_ver=237 _src_uri='http://dev.gentoo.org/~blueness/eudev' pkgname=( 'eudev' 'libeudev' ) pkgver=3.2.5 pkgrel=1 pkgdesc="The userspace dev tools (udev) forked by Gentoo" arch=('i686' 'x86_64') url="https://github.com/gentoo/eudev" license=('GPL') makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool' 'kmod') options=( '!libtool' '!staticlibs') source=( "$pkgname-$pkgver.tar.gz::https://github.com/gentoo/eudev/archive/v${pkgver}.tar.gz" 'initcpio_hooks' 'initcpio_install' 'udev-hwdb.hook' ) prepare(){ cd "${srcdir}/${pkgbase}-${pkgver}" sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ -e 's/GROUP="tape"/GROUP="storage"/' \ -e 's/GROUP="cdrom"/GROUP="optical"/' \ -i rules/*.rules } build() { cd "${srcdir}/${pkgname}-${pkgver}" ./autogen.sh ./configure \ --prefix=/usr \ --with-rootprefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib \ --sbindir=/usr/bin \ --enable-introspection \ --enable-kmod \ --enable-manpages \ --enable-split-usr make } package_eudev() { pkgdesc="The userspace dev tools (udev) forked by Gentoo" provides=( "udev=${_udevver}" ) backup=( 'etc/udev/udev.conf' ) depends=( 'glib2' 'kbd' 'kmod' 'hwids' 'util-linux' 'libeudev' ) optdepends=( 'libsystemd-standalone: to run packages built against systemd' 'upower-pm-utils: pm-utils support' ) cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install # initramfs hooks install -Dm644 "$srcdir/initcpio_hooks" "$pkgdir/usr/lib/initcpio/hooks/udev" install -Dm644 "$srcdir/initcpio_install" "$pkgdir/usr/lib/initcpio/install/udev" install -Dm644 "$srcdir/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook" # These go into a separate package rm -rv "$pkgdir"/usr/lib/pkgconfig rm -v "$pkgdir"/usr/include/libudev.h rm -v "$pkgdir"/usr/lib/libudev*.{so*,a} } package_libeudev() { pkgdesc="eudev client libraries" depends=( 'glibc' 'glib2' ) conflicts=( 'libudev.so' ) provides=( "libudev=$_udev_ver" 'libudev.so' ) cd "${srcdir}/${pkgbase}-${pkgver}" make -C src/libudev DESTDIR="$pkgdir" install } sha1sums=('c46eb61d12fc48429d67a899a9b2a15162042324' 'defa489254f38e57723a8ff70654f29e47bd448a' 'a6a6ee5c751fb92e2c79e0a297e4c318c8f6bb75' '6cdf611d37604062ae4c380307421cef6fde445d')