# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=cmake pkgver=3.5.0 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" # jsoncpp seems to need cmake to build so to avoid recursive build dep # we use the bundled ./bootstrap --prefix=/usr \ --mandir=/share/man \ --datadir=/share/$pkgname \ --docdir=/share/doc/$pkgname \ --system-libs \ --no-system-jsoncpp \ $(parallel_opt) make || return 1 } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } md5sums="33c5d09d4c33d4ffcc63578a6ba8777e cmake-3.5.0.tar.gz" sha256sums="92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa cmake-3.5.0.tar.gz" sha512sums="4fef712560f1975f8d19e897c7b1903811f7bad9314602961b5b32ac58f367bf1308f96cc5edaceb99ac9084b1e0517e4ecb4b5996d2ad53b6aec305ae879b09 cmake-3.5.0.tar.gz"