# Maintainer: Natanael Copa pkgname=cmake pkgver=2.8.12.1 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 \ --docdir=/share/cmake-${pkgver%.*}/doc \ --system-libs \ $(parallel_opt) make || return 1 } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } md5sums="9d38cd4e2c94c3cea97d0e2924814acc cmake-2.8.12.1.tar.gz" sha256sums="fa28c12791d64c36ba6b6cb062a4b4bd4223053f6b9ea501b1bdbdf4d5df3a67 cmake-2.8.12.1.tar.gz" sha512sums="91b07b33208fa66228b05a940422a99569ab8a0d8132de24b0ab19fc2f7a1f0697701234a5a374fb5884f0b48f693e917c284011f1c9ec9b94e82e06b70d9b7d cmake-2.8.12.1.tar.gz"