eudev/PKGBUILD
fbt c91c2cdadc no hooks
Signed-off-by: fbt <fbt@fleshless.org>
2024-04-27 20:41:46 +00:00

95 lines
2.2 KiB
Bash

# Maintainer: fbt <fbt@fleshless.org>
# Contributor: artoo <artoo@manjaro.org>
# Contributor: Alexey D. <lq07829icatm@rambler.ru>
# Contributor: Ivailo Monev <xakepa10@gmail.com>
_udev_ver=247
pkgname=('eudev' 'libeudev')
pkgver=3.2.14
pkgrel=1
pkgdesc="The userspace dev tools (udev) forked by Gentoo"
arch=('i686' 'x86_64')
url="https://github.com/eudev-project/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"
'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=${_udev_ver}" )
backup=( 'etc/udev/udev.conf' )
depends=(
'kbd'
'kmod'
'hwinfo'
'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/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook"
# Make network interface name randomization be optional, not the default
sed -i 's/=="0"/!="1"/g' "$pkgdir/usr/lib/udev/rules.d/80-net-name-slot.rules"
# 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=('8cc76f20d73cae6dde49daa06c6a2bcd059b72b0'
'6cdf611d37604062ae4c380307421cef6fde445d')