# Maintainer: Natanael Copa pkgname=cmake pkgver=2.8.12.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 \ --docdir=/share/cmake-${pkgver%.*}/doc \ --system-libs \ $(parallel_opt) make || return 1 } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } md5sums="17c6513483d23590cbce6957ec6d1e66 cmake-2.8.12.2.tar.gz" sha256sums="8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e cmake-2.8.12.2.tar.gz" sha512sums="a0fe8f6305052ba7894a7d58aa30f97b4be1f52eb7de650273a704929a6fbe81c7cebfa6e68a18c9e7d62f7ed02c944f74c2974da9aacc70e2cb186e0a1be44d cmake-2.8.12.2.tar.gz"