summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 675aeb520ffcb8c74cbe9a4be726a346aac9a7ce (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
# Maintainer : Daniel Bermond < gmail-com: danielbermond >
# Contributor: Joel Teichroeb <joel@teichroeb.net>
# Contributor: Scimmia

pkgbase=wayland-git
pkgname=('wayland-git' 'wayland-docs-git')
pkgver=1.17.0.r6.gb77cf86
pkgrel=1
pkgdesc='A computer display server protocol'
arch=('x86_64')
url='https://wayland.freedesktop.org/'
license=('MIT')
depends=('glibc' 'libffi' 'expat' 'libxml2')
makedepends=('git' 'libxslt' 'doxygen' 'xmlto' 'graphviz' 'docbook-xsl')
source=('git+https://gitlab.freedesktop.org/wayland/wayland.git')
sha256sums=('SKIP')

prepare() {
    mkdir -p docs/share
}

pkgver() {
    cd wayland
    
    # git, tags available
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
    cd wayland
    
    ./autogen.sh \
        --prefix='/usr' \
        --disable-static
        
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    
    make
}

check() {
    cd wayland
    
    make check
}

package_wayland-git() {
    provides=("wayland=${pkgver}")
    conflicts=('wayland')
    
    cd wayland
    
    make DESTDIR="$pkgdir" install
    
    mv "$pkgdir"/usr/share/{doc,man} "${srcdir}/docs/share"
    
    install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_wayland-docs-git() {
    pkgdesc+=' (documentation)'
    arch=('any')
    depends=()
    provides=("wayland-docs=${pkgver}")
    conflicts=('wayland-docs')
    
    cd wayland
    
    mv "${srcdir}/docs" "${pkgdir}/usr"
    
    install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}