aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: 0d85317e0192980c4eb32a451d18135e4a2ba471 (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.0.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="db4c687a31444a929d2fdc36c4dfb95f  cmake-3.0.2.tar.gz"
sha256sums="6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e  cmake-3.0.2.tar.gz"
sha512sums="de267bd6c5b318e48fae64c28947de009fb2413bdc6b4454b5e4bbb7d50b78aaef5d7e9d9655cfb9299aa5704fd3e4bbabc6816d3f378f76856f56ab161efe02  cmake-3.0.2.tar.gz"