summaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: ff6023089ed52061530ccf26fb5ab26b2f6479e1 (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.0
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="21a1c85e1a3b803c4b48e7ff915a863e  cmake-3.0.0.tar.gz"
sha256sums="99a34b7f74000404feffd82fba9d9e0cd623428c74b6a4851a0dee1c272606c0  cmake-3.0.0.tar.gz"
sha512sums="e8b8098fda7d9db239df0a0151e34eb11f40aa0265386684acfb1aff93b401ad86163c1e13a3197700cf26ab7d284cf0a21caa2e2bfb07a62e9816ba4c15ae90  cmake-3.0.0.tar.gz"