diff options
author | Yen Chi Hsuan | 2016-05-28 21:07:05 +0800 |
---|---|---|
committer | Yen Chi Hsuan | 2016-05-28 21:07:05 +0800 |
commit | 778abd91780818d7f5ed3c3977fe6376556ac4a1 (patch) | |
tree | 66753a51b605ed556e66704629f2679a64ec8409 /PKGBUILD | |
download | aur-778abd91780818d7f5ed3c3977fe6376556ac4a1.tar.gz |
New package
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..79aaac592f7f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Yen Chi Hsuan <yan12125 at gmail.com> +_pkgname=SimpleITK +pkgname=simpleitk +pkgver=0.9.1 +pkgrel=1 +pkgdesc="A simplified layer built on top of ITK, intended to facilitate its use in rapid prototyping, education, interpreted languages." +arch=('i686' 'x86_64') +url="http://www.simpleitk.org/" +license=('Apache') +depends=('insight-toolkit') +makedepends=('cmake' 'git' 'mono' 'python' 'python-pip' 'python-virtualenv' 'swig' 'tcl' 'tk') +optdepends=( + 'mono: C# bindings' + 'python: Python bindings' + 'tcl: Tcl/TK bindings' + 'tk: Tcl/TK bindings' +) +source=( + "https://sourceforge.net/projects/$pkgname/files/$_pkgname/$pkgver/Source/$_pkgname-$pkgver.tar.xz" + 'python-package.patch' +) +md5sums=('3b759cf21b89e213343ac6a4e616cd45' + '1c97647461d932ca2e672606d1687f77') + +prepare() { + cd "$_pkgname-$pkgver" + + patch -Np1 -i ../python-package.patch +} + +build() { + cd "$_pkgname-$pkgver" + + mkdir -p build && cd build + + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBUILD_TESTING:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DSimpleITK_PYTHON_WHEEL:BOOL=ON \ + .. + + make all dist.Python +} + +package() { + _builddir="$srcdir/$_pkgname-$pkgver/build" + + cd $_builddir + + make DESTDIR="$pkgdir/" install + + pip install --root="$pkgdir/" --ignore-installed \ + "$_builddir/Wrapping/dist/$_pkgname-$pkgver-"*"-linux_$CARCH.whl" + + install -Dm755 "$_builddir/bin/SimpleITKLua" "$pkgdir/usr/bin/SimpleITKLua" + install -Dm755 "$_builddir/bin/SimpleITKTclsh" "$pkgdir/usr/bin/SimpleITKTclsh" + install -Dm755 "$_builddir/Wrapping/CSharpBinaries/libSimpleITKCSharpNative.so" "$pkgdir/usr/lib/libSimpleITKCSharpNative.so" + install -Dm755 "$_builddir/Wrapping/CSharpBinaries/SimpleITKCSharpManaged.dll" "$pkgdir/usr/lib/SimpleITKCSharpManaged.dll" +} |