summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stergianis2017-11-22 10:06:24 -0500
committerMichael Stergianis2017-11-22 10:06:24 -0500
commita8246f0fc100d67ba0e641e9d390184ffcc1c9cc (patch)
treee86cf5f289ae79e6de0e273af141f9d25a7ca97d
downloadaur-a8246f0fc100d67ba0e641e9d390184ffcc1c9cc.tar.gz
Initial commit
-rw-r--r--.SRCINFO58
-rw-r--r--PKGBUILD94
2 files changed, 152 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d77c95b05eff
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,58 @@
+pkgbase = caffe-cmake-git
+ pkgdesc = A deep learning framework made with expression, speed, and modularity in mind. Uses cmake to build giving great flexibility.
+ pkgver = 1.0.r50.gc430690aa
+ pkgrel = 1
+ url = http://caffe.berkeleyvision.org/
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = gcc6
+ makedepends = doxygen
+ makedepends = texlive-core
+ makedepends = cmake
+ depends = boost-libs
+ depends = protobuf
+ depends = google-glog
+ depends = gflags
+ depends = hdf5
+ depends = opencv
+ depends = leveldb
+ depends = lmdb
+ depends = cuda
+ depends = cudnn
+ depends = python
+ depends = boost
+ depends = cython
+ depends = python-numpy
+ depends = python-scipy
+ depends = python-matplotlib
+ depends = ipython
+ depends = python-h5py
+ depends = python-networkx
+ depends = python-nose
+ depends = python-pandas
+ depends = python-dateutil
+ depends = python-protobuf
+ depends = python-gflags
+ depends = python-yaml
+ depends = python-pillow
+ depends = python-six
+ depends = openblas-lapack
+ depends = python-leveldb
+ depends = python-scikit-image
+ depends = python-pydotplus
+ provides = caffe
+ conflicts = caffe
+ conflicts = caffe-cpu
+ conflicts = caffe-cpu-git
+ conflicts = caffe-dr-git
+ conflicts = caffe-mnc-dr-git
+ conflicts = caffe2
+ conflicts = caffe2-git
+ conflicts = caffe2-cpu
+ conflicts = caffe2-cpu-git
+ source = caffe-cmake-git::git+https://github.com/BVLC/caffe.git
+ md5sums = SKIP
+
+pkgname = caffe-cmake-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7be3d0232ebb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,94 @@
+# Maintainer: Michael Stergianis <michaelstergianis at gmail dot com>
+#
+# A thanks to Daniel Bermond for some inspiration (code) in the PKGBUILD
+pkgname=caffe-cmake-git
+pkgver=1.0.r50.gc430690aa
+pkgrel=1
+epoch=
+pkgdesc="A deep learning framework made with expression, speed, and modularity in mind. Uses cmake to build giving great flexibility."
+arch=('x86_64')
+url="http://caffe.berkeleyvision.org/"
+license=('BSD')
+depends=(
+ # official repositories:
+ 'boost-libs' 'protobuf' 'google-glog' 'gflags' 'hdf5' 'opencv' 'leveldb'
+ 'lmdb' 'cuda' 'cudnn' 'python' 'boost' 'cython' 'python-numpy' 'python-scipy'
+ 'python-matplotlib' 'ipython' 'python-h5py' 'python-networkx' 'python-nose'
+ 'python-pandas' 'python-dateutil' 'python-protobuf' 'python-gflags'
+ 'python-yaml' 'python-pillow' 'python-six'
+ # AUR:
+ # required:
+ 'openblas-lapack'
+ # not required:
+ # 'nccl'
+ #python:
+ 'python-leveldb' 'python-scikit-image' 'python-pydotplus'
+ # NOTE:
+ # python-pydotplus (or python-pydot) is required by python executable draw_net.py
+ # https://github.com/BVLC/caffe/blob/691febcb83d6a3147be8e9583c77aefaac9945f8/python/caffe/draw.py#L7-L22
+)
+makedepends=('git' 'gcc6' 'doxygen' 'texlive-core' 'cmake')
+provides=('caffe')
+conflicts=('caffe' 'caffe-cpu' 'caffe-cpu-git' 'caffe-dr-git' 'caffe-mnc-dr-git'
+ 'caffe2' 'caffe2-git' 'caffe2-cpu' 'caffe2-cpu-git')
+source=("${pkgname}"::"git+https://github.com/BVLC/caffe.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ # git, tags available
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # give the user options as to how they will install
+ # COMMENT if you do not wish to edit the configuration
+ $EDITOR CMakeLists.txt
+}
+
+build() {
+ cd "${srcdir}/$pkgname"
+ mkdir "build"
+ cd build
+ cmake -DBLAS=open ..
+ make -j4 all
+}
+
+# uncomment this block if you want to run the checks/tests
+#check() {
+# cd "$pkgname"
+# msg2 "Building target 'test'..."
+# make test
+# msg2 "Making target 'runtest'..."
+# make runtest
+#}
+
+package() {
+ cd "${srcdir}/$pkgname/build"
+ make install
+
+ # move python files over
+ cd "${srcdir}/$pkgname/build/install"
+ mkdir -p usr
+ mkdir -p "${pkgdir}/usr/lib/python3.6/site-packages/"
+ cd "${srcdir}/$pkgname/build/install/python"
+ mv caffe/ "${pkgdir}/usr/lib/python3.6/site-packages/"
+ mkdir -p "${pkgdir}/usr/share/Caffe/python/examples/"
+ mv *.py "${pkgdir}/usr/share/Caffe/python/examples/"
+
+ # remove python folder
+ cd "${srcdir}/$pkgname/build/install"
+ /usr/bin/rm -rf python
+
+ # move everything else over
+ cd "${srcdir}/$pkgname/build/install"
+ mv share/ usr/
+ mv bin/ usr/
+ mv lib64 usr/lib
+ cp * -r "${pkgdir}"
+}
+
+# vim:set ts=2 sw=2 et: