# Maintainer: Natanael Copa pkgname=cmake pkgver=3.0.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" ./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="21a1c85e1a3b803c4b48e7ff915a863e cmake-3.0.0.tar.gz" sha256sums="99a34b7f74000404feffd82fba9d9e0cd623428c74b6a4851a0dee1c272606c0 cmake-3.0.0.tar.gz" sha512sums="e8b8098fda7d9db239df0a0151e34eb11f40aa0265386684acfb1aff93b401ad86163c1e13a3197700cf26ab7d284cf0a21caa2e2bfb07a62e9816ba4c15ae90 cmake-3.0.0.tar.gz"