aboutsummaryrefslogtreecommitdiffstats
path: root/community/sparse/APKBUILD
blob: 1cddc40bc86269a08123d6449477a57edc66ad59 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=sparse
pkgver=0.5.2
pkgrel=0
pkgdesc="A semantic parser of source files"
url="http://sparse.wiki.kernel.org/"
arch="all"
license="MIT"
depends="gcc"
depends_dev=""
makedepends="libxml2-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.kernel.org/pub/software/devel/sparse/dist/$pkgname-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	default_prepare || return 1
	sed -i -e '/^PREFIX=/s:=.*:=/usr:' \
		-e '/^CFLAGS =/{s:=:+= $(CPPFLAGS):;s:${CFLAGS}::}' \
		"$builddir"/Makefile || return 1
}

build() {
	cd "$builddir"
	make PREFIX=/usr || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 FAQ README \
		Documentation/data-structures.txt \
		Documentation/sparse.txt \
		"$pkgdir"/usr/share/doc/$pkgname/ || return 1
}

sha512sums="1c2e541db97d89b2dbe57c07f0af04831f4ef85dae316017c2a192c9da2fdf5f660d6a337a1a7b620080540fef97e9cd4582524d75b8b438861d030a90f135e4  sparse-0.5.2.tar.xz"