summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD62
3 files changed, 41 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54beae43faa0..82207b5275a1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,17 +5,16 @@ pkgbase = torch7-cunn-git
url = https://github.com/torch/cunn
arch = x86_64
arch = i686
- license = BSD
+ license = custom
makedepends = cmake
makedepends = git
- depends = torch7-git>=r819
depends = cuda
- depends = torch7-nn-git
depends = torch7-cutorch-git
+ depends = torch7-git>=r819
+ depends = torch7-nn-git
provides = torch7-cunn
conflicts = torch7-cunn
- source = torch7-cunn-git::git+https://github.com/torch/cunn
- sha512sums = SKIP
+ source = torch7-cunn::git+https://github.com/torch/cunn
+ b2sums = SKIP
pkgname = torch7-cunn-git
-
diff --git a/.gitignore b/.gitignore
index 2269feac6eec..05c6d4d4c97b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-*/
-*.sw*
-*.pkg*
-*.tar.gz
-*.log
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
index 2ebedbd3e478..f570cc86d6fe 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,53 +1,55 @@
-# Maintainer: Frantic1048 <archer@frantic1048.com>
-pkgdesc='CUDA backend for Torch7 Neural Network Package'
-pkgname='torch7-cunn-git'
+# Maintainer: éclairevoyant
+# Contributor: Frantic1048 <archer at frantic1048 dot com>
+
+_pkgname=torch7-cunn
+pkgname="$_pkgname-git"
pkgver=r819.1ae6aa0
pkgrel=5
-makedepends=('cmake' 'git')
-depends=('torch7-git>=r819' 'cuda' 'torch7-nn-git' 'torch7-cutorch-git')
-conflicts=('torch7-cunn')
-provides=('torch7-cunn')
+pkgdesc='CUDA backend for Torch7 Neural Network Package'
arch=('x86_64' 'i686')
url='https://github.com/torch/cunn'
-license=('BSD')
-source=("${pkgname}::git+${url}")
-sha512sums=('SKIP')
-
-pkgver () {
- cd "${pkgname}"
- (
- set -o pipefail
- git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+license=('custom')
+depends=('cuda' 'torch7-cutorch-git' 'torch7-git>=r819' 'torch7-nn-git')
+makedepends=('cmake' 'git')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("$_pkgname::git+$url")
+b2sums=('SKIP')
+
+pkgver() {
+ cd $_pkgname
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- cd "${pkgname}"
+ cd $_pkgname
# https://stackoverflow.com/questions/46345811/cuda-9-shfl-vs-shfl-sync
- sed -e 's/__shfl(/__shfl_sync(0xFFFFFFFF, /g' -e 's/__any(/__any_sync(0xFFFFFFFF, /g' -i lib/THCUNN/LookupTable.cu
+ sed 's/__shfl(/__shfl_sync(0xFFFFFFFF, /g;s/__any(/__any_sync(0xFFFFFFFF, /g' \
+ -i lib/THCUNN/LookupTable.cu
}
-build () {
+build() {
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CFLAGS/-fno-plt/}"
- cd "${pkgname}"
+ cd $_pkgname
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_BUILD_TYPE=Release
make
}
-package () {
- cd "${pkgname}"
- make DESTDIR="${pkgdir}" install
+package() {
+ cd $_pkgname
+ make DESTDIR="$pkgdir" install
# Move Lua C module
- mkdir -p "${pkgdir}/usr/lib/lua/5.1"
- mv "${pkgdir}/usr/lib/libTHCUNN.so" "${pkgdir}/usr/lib/lua/5.1/"
+ install -dm755 "$pkgdir/usr/lib/lua/5.1/"
+ mv "$pkgdir/usr/lib/libTHCUNN.so" "$pkgdir/usr/lib/lua/5.1/"
# Move pure Lua modules
- mkdir -p "${pkgdir}/usr/share/lua/5.1"
- mv "${pkgdir}/usr/lua/cunn" "${pkgdir}/usr/share/lua/5.1/"
- rm -rf "${pkgdir}/usr/lua"
+ install -dm755 "$pkgdir/usr/share/lua/5.1/"
+ mv "$pkgdir/usr/lua/cunn" "$pkgdir/usr/share/lua/5.1/"
+ rm -rf "$pkgdir/usr/lua"
+
+ install -Dm644 COPYRIGHT.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}