eudev/PKGBUILD

104 lines
2.7 KiB
Bash
Raw Normal View History

2015-06-01 13:15:16 +00:00
# Maintainer: artoo <artoo@manjaro.org>
# Contributor: Alexey D. <lq07829icatm@rambler.ru>
# Contributor: Ivailo Monev <xakepa10@gmail.com>
_udev_ver=219
_src_uri='http://dev.gentoo.org/~blueness/eudev'
pkgname=( 'eudev' 'libeudev' )
pkgver=3.0
pkgrel=3
pkgdesc="The userspace dev tools (udev) forked by Gentoo"
arch=('i686' 'x86_64')
url="http://www.gentoo.org/proj/en/eudev/"
license=('GPL')
makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool')
backup=('etc/udev/udev.conf')
options=(!makeflags !libtool)
source=("${_src_uri}/${pkgname}-${pkgver}.tar.gz"
'initcpio_hooks'
'initcpio_install')
sha256sums=('74db8aaf13cc392edfb821291783ecd64d815e6f81409f57e290d3017750db29'
'892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13'
'77dd1fd318b4456409aceb077f060b87944defb07cf39d29ad1968dc6f361875')
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 \
--enable-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'
)
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
mv "$pkgdir"/usr/lib/lib{g,}udev*.{so,a}* usr/lib
# ...pkgconfig
mkdir -pm755 usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/pkgconfig/{libudev,gudev-1.0}.pc usr/lib/pkgconfig
# ...headers
mkdir -pm755 usr/include
mv "$pkgdir"/usr/include/{gudev-1.0,libudev.h} usr/include
}
package_libeudev() {
pkgdesc="eudev client libraries"
depends=( 'glibc' 'glib2' )
provides=(
"libudev=${_udevver}"
'libgudev-1.0.so'
'libudev.so'
)
conflicts=(
'libeudev>=1.8'
'libgudev-1.0.so'
'libudev.so'
)
mv "$srcdir/_libeudev"/* "$pkgdir"
}