eudev/PKGBUILD
fbt ef48ea0bdd v++
Signed-off-by: fbt <fbt@fleshless.org>
2017-08-02 12:12:57 +03:00

102 lines
2.6 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=220
_src_uri='http://dev.gentoo.org/~blueness/eudev'
pkgname=( 'eudev' 'libeudev' )
pkgver=3.2.2
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')
backup=('etc/udev/udev.conf')
options=(!makeflags !libtool)
source=("${_src_uri}/${pkgname}-${pkgver}.tar.gz"
'initcpio_hooks'
'initcpio_install')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--with-rootprefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--with-html-dir=/usr/share/doc/${pkgname}-${pkgver}/html \
--disable-gudev \
--enable-introspection \
--enable-kmod \
--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=(
'eudev-systemdcompat: makes packages compiled with systemd features run'
'libsystemd-standalone: same as the above, but built from upstream sources'
'upower-pm-utils: pm-utils support'
)
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
for i in "${pkgdir}/usr/lib/udev/rules.d/"*.rules; do
sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
s#GROUP="tape"#GROUP="storage"#g;
s#GROUP="cdrom"#GROUP="optical"#g' "${i}"
done
install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"
# split out...
mkdir -pm755 "${srcdir}/_libeudev"
cd "${srcdir}/_libeudev"
# ...libs
mkdir -pm755 usr/lib usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/libudev*.{so,a}* usr/lib/
mv "$pkgdir"/usr/lib/pkgconfig/libudev.pc usr/lib/pkgconfig/libudev.pc
# ...headers
mkdir -pm755 usr/include
mv "$pkgdir"/usr/include/libudev.h usr/include
}
package_libeudev() {
pkgdesc="eudev client libraries"
depends=( 'glibc' 'glib2' )
provides=(
"libudev"
'libudev.so'
)
conflicts=(
'libeudev'
'libudev.so'
)
mv "$srcdir/_libeudev"/* "$pkgdir"
}
sha1sums=('240d7b589ef1da1bb85a950f919e826239363350'
'defa489254f38e57723a8ff70654f29e47bd448a'
'a6a6ee5c751fb92e2c79e0a297e4c318c8f6bb75')