aboutsummaryrefslogtreecommitdiffstats
path: root/community/sparse/APKBUILD
blob: 775d2ae7b4ac2812cf012dc5e573c902f6ebc297 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=sparse
pkgver=0.5.0
pkgrel=1
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
}

md5sums="68bc834c57836251fbee55a7707bab39  sparse-0.5.0.tar.xz"
sha256sums="921fcf918c6778d1359f3886ac8cb4cf632faa6242627bc2ae2db75e983488d5  sparse-0.5.0.tar.xz"
sha512sums="0cb70a74034c4bc4d5340ab7d19288a438f4b6d0c4c63ac95d1f4cc3c5fdfe1370a27a607605a6f0c85ea6f371141c55abfdb4438d9e87b2d544fff5674f7ce4  sparse-0.5.0.tar.xz"