APKBUILD 935 Bytes
Newer Older
Natanael Copa's avatar
Natanael Copa committed
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.3
Natanael Copa's avatar
Natanael Copa committed
4
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
5
6
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
Natanael Copa's avatar
Natanael Copa committed
7
arch="x86 x86_64"
Natanael Copa's avatar
Natanael Copa committed
8
license="CMake"
Natanael Copa's avatar
Natanael Copa committed
9
depends=
10
makedepends="ncurses-dev"
Natanael Copa's avatar
Natanael Copa committed
11
source="http://www.$pkgname.org/files/v${pkgver%.*}/$pkgname-$pkgver.tar.gz"
Natanael Copa's avatar
Natanael Copa committed
12
13
14
15
16
17
18
19
20
21
22
23
24
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"
}

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

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

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

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

Natanael Copa's avatar
Natanael Copa committed
46
md5sums="a76a44b93acf5e3badda9de111385921  cmake-2.8.3.tar.gz"