diff options
author | m-pilia | 2017-11-06 00:29:15 +0100 |
---|---|---|
committer | m-pilia | 2017-11-06 00:29:15 +0100 |
commit | 047077dbdacd76c3af6051397292f4f673f65961 (patch) | |
tree | b11ba4b1ef5af44625166f34454d97727081f5ea | |
download | aur-047077dbdacd76c3af6051397292f4f673f65961.tar.gz |
submission
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 63 |
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9e66d3eb752b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = elastix-git + pkgdesc = Toolbox for rigid and nonrigid registration of images + pkgver = 4.304@3344.r945.g522843d9 + pkgrel = 1 + url = http://elastix.isi.uu.nl/ + arch = x86_64 + license = apache + makedepends = cmake + depends = insight-toolkit + provides = elastix + source = git+https://github.com/SuperElastix/elastix.git + sha512sums = SKIP + +pkgname = elastix-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7aa2bf607cee --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer of this PKBGUILD file: Martino Pilia <martino.pilia@gmail.com> +_pkgname=elastix +pkgname=${_pkgname}-git +pkgver=4.304@3344.r945.g522843d9 +pkgrel=1 +pkgdesc='Toolbox for rigid and nonrigid registration of images' +arch=('x86_64') +url='http://elastix.isi.uu.nl/' +license=('apache') +provides=('elastix') +depends=('insight-toolkit') +makedepends=('cmake') +optdepends=() +source=('git+https://github.com/SuperElastix/elastix.git') +sha512sums=('SKIP') + +pkgver() { + cd "$_pkgname" + git describe --long --tags | \ + sed 's/^elastix_0//;s/_/./;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/${_pkgname}" + + git checkout master + + # will not build with C++ 11 + sed -i '15iset(CMAKE_CXX_FLAGS_RELEASE "-std=c++03")' \ + CMakeLists.txt + + mkdir build || : + cd build + + cmake .. \ + -DCMAKE_INSTALL_PREFIX:PATH="$pkgdir/usr" \ + -DCMAKE_BUILD_TYPE:STRING=Release +} + +build() { + cd "${srcdir}/${_pkgname}/build" + make +} + +package() { + cd "${srcdir}/${_pkgname}/build" + + make install + + mkdir elastix + mv $pkgdir/usr/include/* elastix/. + mv elastix $pkgdir/usr/include/. + + cd .. + + install -D -m644 \ + "src/LICENSE" \ + "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" + + install -D -m644 \ + "src/NOTICE" \ + "$pkgdir/usr/share/licenses/$_pkgname/NOTICE" +} |