APKBUILD 917 Bytes
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Natanael Copa's avatar
Natanael Copa committed
2
pkgname=cmake
Natanael Copa's avatar
Natanael Copa committed
3
pkgver=2.8.1
4
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
5 6 7
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
license="CMake"
Natanael Copa's avatar
Natanael Copa committed
8
depends=
9
makedepends="ncurses-dev"
Natanael Copa's avatar
Natanael Copa committed
10
source="http://www.$pkgname.org/files/v${pkgver%.*}/$pkgname-$pkgver.tar.gz"
Natanael Copa's avatar
Natanael Copa committed
11 12 13 14 15 16 17 18 19 20 21 22 23
subpackages="$pkgname-doc"


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

24 25
build ()
{
Natanael Copa's avatar
Natanael Copa committed
26
	cd $startdir/src/$pkgname-$pkgver
27 28
	# bug in cmake.
	# http://www.mail-archive.com/cmake@cmake.org/msg09515.html
Natanael Copa's avatar
Natanael Copa committed
29 30
#	export CC="gcc"
#	export CXX="g++"
31

Natanael Copa's avatar
Natanael Copa committed
32 33
	./bootstrap --prefix=/usr \
		--mandir=/share/man \
Natanael Copa's avatar
Natanael Copa committed
34
		--docdir=/share/cmake-${pkgver%.*}/doc \
Natanael Copa's avatar
Natanael Copa committed
35 36 37
		$(parallel_opt)

	make || return 1
Natanael Copa's avatar
Natanael Copa committed
38 39 40 41
}

package() {
	cd $startdir/src/$pkgname-$pkgver
Natanael Copa's avatar
Natanael Copa committed
42 43
	make DESTDIR="$pkgdir" install
}
Natanael Copa's avatar
Natanael Copa committed
44

Natanael Copa's avatar
Natanael Copa committed
45
md5sums="a92ad653f9ccc1595d16cd9707f49acc  cmake-2.8.1.tar.gz"