summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bbf14d28d6528333d1a3cb553ea5b1552be9d165 (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
_pkgname="cppast"
pkgname="${_pkgname}-git"
pkgver=436.b155d6a
pkgrel=2
pkgdesc="Library to parse and work with the C++ AST"
arch=('x86_64')
url="https://github.com/foonathan/cppast"
license=('MIT')
depends=()
provides=("${_pkgname}")
conflicts=()
epoch=1
source=("${_pkgname}::git+https://github.com/foonathan/cppast.git"
	"CMakeLists.txt.patch")

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

prepare() {
	patch -p0 < CMakeLists.txt.patch
	cd "${_pkgname}"
	mkdir -p build
	cd build
	cmake -G "Unix Makefiles" ..
}

build() {
	cd "${_pkgname}/build"
	make
}

check() {
	: #Do nothing
}

package() {
	cd "${_pkgname}/build"
	make PREFIX=/usr DESTDIR="$pkgdir/" install

	install -m644 -D "${srcdir}/${_pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
	install -m644 -D "${srcdir}/${_pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
	rsync -a --chmod 755 "${srcdir}/${_pkgname}/include" "${pkgdir}/usr/"
}

sha256sums=('SKIP'
	'3bb8d82d3258a6800b672d7c7adc50331b26b3b1dd12926d0402c91ff5ddd293')