summaryrefslogtreecommitdiff
path: root/pcr/eudev/PKGBUILD
blob: 41ddcf55631f45ee25dc9c13f02d91088c142be2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer (Manjaro): artoo <artoo@manjaro.org>
# Contributor (Manjaro): Alexey D. <lq07829icatm@rambler.ru>
# Contributor (Manjaro): Ivailo Monev <xakepa10@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_udev_ver=220

pkgbase=eudev
pkgname=( 'eudev' 'libeudev')
pkgver=3.2.1
pkgrel=3
arch=('i686' 'x86_64' 'armv7h')
url="http://www.gentoo.org/proj/en/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'
	"gperf-build-fix.patch::https://github.com/gentoo/eudev/commit/5bab4d8de0dcbb8e2e7d4d5125b4aea1652a0d60.patch"
	"global-properties-fix.patch::https://github.com/gentoo/eudev/commit/90a8c95446b345cc9b388fdb30866e1cb77fe711.patch")
sha256sums=('88f530c1540750e6daa91b5eaeebf88e761e6f0c86515c1c28eedfd871f027c6'
            '892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13'
            '77dd1fd318b4456409aceb077f060b87944defb07cf39d29ad1968dc6f361875'
            '846e9ddbb95c8394ba7efe75107cc1308426921bc042f5d6b48fa4c2dcbac151'
            '9c61af4d5bd3417ec87a241327f063aae67b46adbcd9eef6f87510815f95f724'
            '09a224de7960ba7ca54abaebb14b58c5a07859b7f7bf0db016d26f2436a704bf')

prepare(){
    cd "${srcdir}/${pkgbase}-${pkgver}"
    sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
        -e 's/GROUP="cdrom"/GROUP="optical"/' \
        -e 's/GROUP="tape"/GROUP="storage"/' \
        -i rules/*.rules
    patch -p1 -i ${srcdir}/gperf-build-fix.patch
    patch -p1 -i ${srcdir}/global-properties-fix.patch
}

build() {
	cd "${srcdir}/${pkgbase}-${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}")
	depends=("libeudev" 'kbd' 'kmod' 'hwids' 'util-linux')
	optdepends=('eudev-systemd: makes packages compiled with systemd features run'
		'udev-openrc: udev starup scripts for openrc')
	backup=('etc/udev/udev.conf')


	cd "${srcdir}/${pkgbase}-${pkgver}"

	make DESTDIR="${pkgdir}" install

	rm -rv "$pkgdir"/usr/lib/pkgconfig
	rm -v "$pkgdir"/usr/include/libudev.h
	rm -v "$pkgdir"/usr/lib/libudev*.{so*,a}

	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"
}

package_libeudev() {
	pkgdesc="eudev client libraries"
	depends=('glib2' 'glibc')
	optdepends=('libeudev-systemd: systemd client libraries')
	conflicts=('libudev.so')
	provides=("libudev=${_udev_ver}" 'libudev.so')

	cd "${srcdir}/${pkgbase}-${pkgver}"
	make -C src/libudev DESTDIR="$pkgdir" install
}