summaryrefslogtreecommitdiff
path: root/nonsystemd/eudev/PKGBUILD
blob: 5bf06f27c6610a0fc6a9071fc7176814d594badb (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
89
90
91
92
93
94
95
96
97
98
# Maintainer: David P. <megver83@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
# Maintainer (Artix): artoo <artoo@artixlinux.org>
# Contributor (Artix): Alexey D. <lq07829icatm@rambler.ru>
# Contributor (Artix): Ivailo Monev <xakepa10@gmail.com>

_udev_ver=243

pkgbase=eudev
pkgname=('eudev' 'eudev-libudev')
pkgver=3.2.9
pkgrel=2
pkgdesc="The userspace dev tools (udev) forked by Gentoo"
arch=('x86_64' 'i686' 'armv7h')
url="http://www.gentoo.org/proj/en/eudev/"
license=('GPL')
makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool' 'kmod' 'util-linux' 'libelf')
options=('!libtool')
source=("$pkgname-$pkgver.tar.gz::https://github.com/gentoo/eudev/archive/v${pkgver}.tar.gz"
        'initcpio_hooks'
        'initcpio_install'
        '30-udev-hwdb.hook'
        '30-udev-reload.hook'
        'udev-hook'
        'udev-hwdb-path.patch'
        'udev-default-rules.patch')
sha256sums=('7d281276b480da3935d1acb239748c2c9db01a8043aad7e918ce57a223d8cd24'
            '892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13'
            '77dd1fd318b4456409aceb077f060b87944defb07cf39d29ad1968dc6f361875'
            '2782bd3a7686596e98bd2d3fdef9d59d7d439682b87bbcc43b1fd1f5fabb3505'
            '13596caef6ed85b58de674ebe7c47d9c7dd676240de5cc28ef3ccee2ce1d8a90'
            '80c8f87549374d3bc7c2831b9e069b0005cc5ef90122c2d02e78e27c9bc1dbed'
            'e05e468d15d09fb49343f33bc8d21c08f54db3ecff412dc35d4acb0630f869a3'
            '13c167e448411b53b18532469e783e2e51a4c46ff4cf9c46e0481d6440b53f8d')

prepare(){
    cd "${pkgbase}-${pkgver}"
    patch -Np 1 -i ${srcdir}/udev-hwdb-path.patch
    patch -Np 1 -i ${srcdir}/udev-default-rules.patch
    ./autogen.sh
}

build() {
    cd "${pkgbase}-${pkgver}"

    ./configure \
        --prefix=/usr \
        --with-rootprefix=/usr \
        --sysconfdir=/etc \
        --libdir=/usr/lib \
        --sbindir=/usr/bin \
        --enable-introspection \
        --enable-kmod \
        --enable-manpages \
        --enable-split-usr

    make
}

check(){
    cd "${pkgbase}-${pkgver}"
    make -k check
}

package_eudev() {
    provides=("udev=${_udev_ver}" )
    depends=("eudev-libudev=$pkgver" 'kbd' 'kmod' 'hwdata' 'util-linux')
    backup=('etc/udev/udev.conf')

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

    make DESTDIR="${pkgdir}" install

    install -dm755 ${srcdir}/_libeudev

    mv -v ${pkgdir}/usr/lib/libudev*.so* ${srcdir}/_libeudev

    install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
    install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"

    # pacman hooks
    install -Dm755 ${srcdir}/udev-hook "$pkgdir"/usr/share/libalpm/scripts/udev-hook
    install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook
}

package_eudev-libudev() {
    pkgdesc="eudev client libraries"
    depends=('glibc' 'libelf')
    provides=("libudev=${_udev_ver}" 'libudev.so')

    provides+=("libeudev=$pkgver")
    conflicts+=('libeudev')
    replaces+=('libeudev')

    install -dm755 ${pkgdir}/usr/lib
    mv -v ${srcdir}/_libeudev/libudev*.so* ${pkgdir}/usr/lib
}