# Maintainer: Natanael Copa pkgname=cmake pkgver=3.1.3 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="5697a77503bb5636f4b4057dcc02aa32 cmake-3.1.3.tar.gz" sha256sums="45f4d3fa8a2f61cc092ae461aac4cac1bab4ac6706f98274ea7f314dd315c6d0 cmake-3.1.3.tar.gz" sha512sums="348bed66dd23a22e2fc04d9c88f26bd61d110bfae80dfb1734be668d57c9bc58fe27d3f5274e40ab2b5185185b2a1e7b90721c1fe71e4e5d15ac598c840a896b cmake-3.1.3.tar.gz"