diff options
author | Alex Dewar | 2019-05-08 15:05:26 +0100 |
---|---|---|
committer | Alex Dewar | 2019-05-08 15:05:26 +0100 |
commit | 65119946b5f25ea660aa4b5d5eb2057268c45982 (patch) | |
tree | cf145b3ea8cbfc3c267f8919a4080c7097445b84 | |
parent | 74b852f52a73b74bfc75cdbd2e05dfa2a8f51739 (diff) | |
download | aur-65119946b5f25ea660aa4b5d5eb2057268c45982.tar.gz |
Add pygenn
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 40 |
2 files changed, 39 insertions, 10 deletions
@@ -1,11 +1,16 @@ pkgbase = genn_cpu_only - pkgdesc = GeNN: GPU-enhanced neural networks (version 4, without CUDA support) + pkgdesc = GeNN: GPU-enhanced neural networks (version 4; without CUDA backend) pkgver = 4.0.0_RC1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/genn-team/genn arch = x86_64 license = GPL makedepends = doxygen + makedepends = python + makedepends = python-numpy + makedepends = swig + optdepends = python: for pygenn + optdepends = python-numpy: for pygenn provides = genn conflicts = genn options = staticlibs @@ -1,36 +1,60 @@ # Maintainer: Alex Dewar <a.dewar@sussex.ac.uk> pkgname=genn_cpu_only pkgver=4.0.0_RC1 -pkgrel=1 -pkgdesc="GeNN: GPU-enhanced neural networks (version 4, without CUDA support)" +pkgrel=2 +pkgdesc="GeNN: GPU-enhanced neural networks (version 4; without CUDA backend)" arch=(x86_64) url="https://github.com/genn-team/genn" license=('GPL') -makedepends=(doxygen) +makedepends=(doxygen python python-numpy swig) +optdepends=("python: for pygenn" "python-numpy: for pygenn") +options=(staticlibs !emptydirs) provides=(genn) conflicts=(genn) -options=(staticlibs !emptydirs) source=("$url/archive/${pkgver//_/-}.tar.gz") sha256sums=('b94c0b8c05d8525987f9d4279478dd41f68e8d9824cb5344adb5fbe257b38e99') +# Make sure we aren't building with CUDA support +export CUDA_PATH= + +prepare() { + cd genn-${pkgver//_/-} + + # Set output dir + sed -i "s|/usr/local|$pkgdir/usr|" Makefile + + # Delete tmp files + find . -name '*~' -delete +} + build() { cd genn-${pkgver//_/-} # Generate documentation with doxygen - ./makedoc + msg2 "Generating documentation" + ./makedoc > /dev/null # Build libgenn.a etc. - sed -i 's|/usr/local|'$pkgdir'/usr|' Makefile - CPU_ONLY=1 CUDA_PATH= make + make + + # Build pygenn + make DYNAMIC=1 LIBRARY_DIRECTORY=`pwd`/pygenn/genn_wrapper/ + python setup.py build } package() { cd genn-${pkgver//_/-} # Install libs and headers - CPU_ONLY=1 CUDA_PATH= PREFIX="$pkgdir"/usr/ make install + PREFIX="$pkgdir"/usr/ make install # Install documentation mkdir -p "$pkgdir"/usr/share/genn/documentation cp -rf documentation/html/* "$pkgdir"/usr/share/genn/documentation + + # Copy userproject folder + cp -R userproject "$pkgdir"/usr/src/genn + + # Install pygenn + python setup.py install --prefix=/usr --root="$pkgdir" } |