aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: 4a5010ed768294245639d1055cd359360918a11a (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=3.1.2
pkgrel=0
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
arch="all"
license="CMake"
depends=
makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev"
subpackages="$pkgname-doc"

case $pkgver in
*.*.*.*) _v=v${pkgver%.*.*};;
*.*.*) _v=v${pkgver%.*};;
esac

source="http://www.cmake.org/files/$_v/cmake-${pkgver}.tar.gz
	"

_builddir="$srcdir/$pkgname-$pkgver"

parallel_opt() {
	local i n
	for i in $MAKEOPTS; do 
		case "$i" in
			-j*) n=${i#-j};;
		esac;
	done
	[ -n "$n" ] && echo "--parallel $n"
}

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./bootstrap --prefix=/usr \
		--mandir=/share/man \
		--datadir=/share/$pkgname \
		--docdir=/share/doc/$pkgname \
		--system-libs \
		$(parallel_opt)

	make || return 1
}

package() {
	cd $startdir/src/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install
}

md5sums="75f61184aa70664bc7b3158293950f04  cmake-3.1.2.tar.gz"
sha256sums="2b210f7d867a1e716c1895357ebe63c7b9ae61fdb5f2d300ab2f01795f085b35  cmake-3.1.2.tar.gz"
sha512sums="5cd1c46a6514f8f8f8e709bd793ebe3a5f686d28940f20baf642f9781b209ffa495e1788206cb32235d63ee237ef182020111845e3391cfdf2b3dc29c5a245e5  cmake-3.1.2.tar.gz"