# Maintainer: Natanael Copa pkgname=cmake pkgver=3.0.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 \ --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="e2e05d84cb44a42f1371d9995631dcf5 cmake-3.0.1.tar.gz" sha256sums="ea11a8fb6679496de4e198ab93007968faa638663691cdf731ae2d4ed74e00c2 cmake-3.0.1.tar.gz" sha512sums="2ac7f0f37664f851fa440af05ea070a606a6f994bda3d977d3881dee207ba7ccbd3c9f296db7cfff492d3a7b5a6694c91e56896114f622305e8bdb6dbbff6407 cmake-3.0.1.tar.gz"