# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=cmake pkgver=3.9.0 pkgrel=0 pkgdesc="CMake is a cross-platform open-source make system" url="http://www.cmake.org" arch="all" license="CMake" makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev libuv-dev xz-dev rhash-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 needs cmake to build so to avoid recursive build # dependency, we use the bundled version of jsoncpp ./bootstrap --prefix=/usr \ --mandir=/share/man \ --datadir=/share/$pkgname \ --docdir=/share/doc/$pkgname \ --system-libs \ --no-system-jsoncpp \ $(parallel_opt) make } package() { cd $startdir/src/$pkgname-$pkgver make DESTDIR="$pkgdir" install } sha512sums="151c5531dec2c9d3170d95c06b9cc92d22285555cb9c074837ff2d0d0bee2ea285726323fa11c59d2290b1a9586492571d34e49709e35481478c403bf1ca9c48 cmake-3.9.0.tar.gz"