# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=cmake pkgver=3.7.2 pkgrel=1 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 libuv-dev xz-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" } 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 \ --system-curl \ --system-expat \ --no-system-jsoncpp \ --system-zlib \ --system-bzip2 \ --system-liblzma \ --system-libarchive \ $(parallel_opt) make || return 1 } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } md5sums="79bd7e65cd81ea3aa2619484ad6ff25a cmake-3.7.2.tar.gz" sha256sums="dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0 cmake-3.7.2.tar.gz" sha512sums="b2ed0192e12267de19eb178c2dedc69d06fc33dfadd47efbe0ccf6969ad72d290fa4bff02861c379a8752337d67d2485d7e1ba947cb219f2e4041a53a195e88d cmake-3.7.2.tar.gz"