aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: ba82e051e1569d351d749fbb80faf4405ab2c295 (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
62
63
64
65
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=3.6.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"
	# jsoncpp seems to need cmake to build so to avoid recursive build dep
	# we use the bundled
	./bootstrap --prefix=/usr \
		--mandir=/share/man \
		--datadir=/share/$pkgname \
		--docdir=/share/doc/$pkgname \
		--system-libs \
		--no-system-jsoncpp \
		$(parallel_opt)

	make || return 1
}

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

md5sums="139d7affdd4e8ab1edfc9f4322d69e43  cmake-3.6.2.tar.gz"
sha256sums="189ae32a6ac398bb2f523ae77f70d463a6549926cde1544cd9cc7c6609f8b346  cmake-3.6.2.tar.gz"
sha512sums="50b217d3205cc65c2b55ece4ba050b1aa80dfa8a7e22ee0ec16c741cd99a639847d197a2e8448d7710c2a6ea7ba7bbcd6e3f12810f65dcc74bd27bcdb02f844a  cmake-3.6.2.tar.gz"