summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5558b824692c0b8eac391e5a4593397d864fbd3b (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
# Contributor: Mael Kerbiriou <mael.kerbiriouATfreeDOTfr>

pkgname=wld-git
pkgver=r171.6586736
pkgrel=1

pkgdesc='A primitive drawing library targeted at Wayland'
arch=('i686' 'x86_64')
license=('MIT')
url='https://github.com/michaelforney/wld'

depends=('wayland' 'libdrm' 'fontconfig' 'pixman')
makedepends=('git')

provides=('wld')
conflicts=('wld')

source=('git+https://github.com/michaelforney/wld.git')

md5sums=('SKIP')

pkgver() {
	cd wld
	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd wld
	
	if pkg-config --exists libdrm_intel; then
		DRM_DRIVERS+=' intel'
	fi
	
	if pkg-config --exists libdrm_nouveau; then
		DRM_DRIVERS+=' nouveau'
	fi
	
	export DRM_DRIVERS
	make -e PREFIX="/usr"
}

package() {
	cd wld
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/"$pkgname"/COPYING
	make -e PREFIX=/usr DESTDIR="$pkgdir" install
}