summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Anderson2018-10-17 10:43:48 +0100
committerAndrew Anderson2018-10-17 10:43:48 +0100
commit852aaa2bbd7a76ddb9b2d51f7c67c29509d8fe54 (patch)
treeb7ef1e9dc73d9baf9dd2cec93b98057761f36b52
downloadaur-852aaa2bbd7a76ddb9b2d51f7c67c29509d8fe54.tar.gz
Init
-rw-r--r--.SRCINFO51
-rw-r--r--PKGBUILD91
-rw-r--r--dependencies.patch23
3 files changed, 165 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0452560bb2b6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,51 @@
+pkgbase = caffe-slim-git
+ pkgdesc = A slimmed-down build of Caffe based on caffe-opencl-git
+ pkgver = 1.0
+ pkgrel = 1
+ url = http://caffe.berkeleyvision.org/
+ arch = x86_64
+ license = BSD
+ makedepends = cmake
+ depends = boost-libs
+ depends = protobuf
+ depends = google-glog
+ depends = gflags
+ depends = python
+ depends = boost
+ depends = cython
+ depends = python-numpy
+ depends = python-scipy
+ depends = python-matplotlib
+ depends = ipython
+ 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
+ provides = caffe
+ conflicts = caffe
+ conflicts = caffe-git
+ conflicts = caffe-cpu-git
+ conflicts = caffe-dr-git
+ conflicts = caffe-mnc-dr-git
+ conflicts = caffe-cpu
+ conflicts = caffe2
+ conflicts = caffe2-git
+ conflicts = caffe2-cpu
+ conflicts = caffe2-cpu-git
+ conflicts = caffe-opencl-git
+ conflicts = caffe-opencl-slim-git
+ conflicts = caffe-cuda-slim-git
+ conflicts = caffe-intel-slim-git
+ source = caffe::git+https://github.com/andrew-wja/caffe
+ source = dependencies.patch
+ sha256sums = SKIP
+ sha256sums = 7ddb59109d7df3889641eaa4769e6b9e82f96f623b200ecfd8ade7ecfe04f95f
+
+pkgname = caffe-slim-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7ff623c69ae1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,91 @@
+# Maintainer: Andrew Anderson <aanderso at t c d dot ie>
+pkgname=caffe-slim-git
+_srcname=caffe
+pkgver=1.0
+pkgrel=1
+pkgdesc="A slimmed-down build of Caffe based on caffe-opencl-git"
+arch=('x86_64')
+url="http://caffe.berkeleyvision.org/"
+license=('BSD')
+depends=(
+ 'boost-libs' 'protobuf' 'google-glog' 'gflags'
+ 'python' 'boost' 'cython' 'python-numpy' 'python-scipy'
+ 'python-matplotlib' 'ipython' 'python-networkx' 'python-nose'
+ 'python-pandas' 'python-dateutil' 'python-protobuf' 'python-gflags'
+ 'python-yaml' 'python-pillow' 'python-six'
+ 'openblas-lapack'
+)
+makedepends=('cmake')
+provides=('caffe')
+conflicts=('caffe' 'caffe-git' 'caffe-cpu-git' 'caffe-dr-git' 'caffe-mnc-dr-git' 'caffe-cpu'
+ 'caffe2' 'caffe2-git' 'caffe2-cpu' 'caffe2-cpu-git' 'caffe-opencl-git'
+ 'caffe-opencl-slim-git' 'caffe-cuda-slim-git' 'caffe-intel-slim-git')
+source=("${_srcname}"::"git+https://github.com/andrew-wja/${_srcname}"
+ 'dependencies.patch')
+sha256sums=('SKIP'
+ '7ddb59109d7df3889641eaa4769e6b9e82f96f623b200ecfd8ade7ecfe04f95f')
+
+prepare() {
+ cd "${_srcname}"
+
+ git checkout intel
+
+ # This patch makes cmake find libboost_python3 (it normally only looks for libboost_python_py3 etc.)
+ patch cmake/Dependencies.cmake < ../dependencies.patch
+
+ mkdir -p build
+ cd build
+ CMAKE_PARALLEL_LEVEL=`grep processor /proc/cpuinfo | wc -l` cmake \
+ -DUSE_INDEX_64=OFF \
+ -DUSE_HALF=OFF \
+ -DUSE_SINGLE=ON \
+ -DUSE_DOUBLE=OFF \
+ -DUSE_INT_QUANT_8=OFF \
+ -DUSE_INT_QUANT_16=OFF \
+ -DUSE_INT_QUANT_32=OFF \
+ -DUSE_INT_QUANT_64=OFF \
+ -DUSE_CUDA=OFF \
+ -DUSE_OPENCL=OFF \
+ -DUSE_HSA=OFF \
+ -DUSE_HIP=OFF \
+ -DFORCE_COMPILE_CU_AS_CPP=OFF \
+ -DDISABLE_DEVICE_HOST_UNIFIED_MEMORY=OFF \
+ -DUSE_LIBDNN=OFF \
+ -DUSE_CLBLAS=OFF \
+ -DUSE_CLBLAST=OFF \
+ -DUSE_ISAAC=OFF \
+ -DUSE_CUDNN=OFF \
+ -DUSE_NCCL=OFF \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DBUILD_python=OFF \
+ -DBUILD_matlab=OFF \
+ -DBUILD_docs=OFF \
+ -DBUILD_python_layer=OFF \
+ -DUSE_OPENCV=ON \
+ -DUSE_LEVELDB=OFF \
+ -DUSE_LMDB=OFF \
+ -DUSE_HDF5=ON \
+ -DALLOW_LMDB_NOLOCK=OFF \
+ -DUSE_OPENMP=OFF \
+ -DUSE_FFT=OFF \
+ -DUSE_SQLITE=OFF \
+ -DUSE_GEMMLOWP=OFF \
+ -DUSE_NATIVE_MARCH=ON \
+ -DUSE_ARM_CROSS_COMPILE=OFF \
+ -DBLAS=Open \
+ -D python_version=3 \
+ -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ ..
+}
+
+build() {
+ cd "${_srcname}/build"
+ make -j`grep processor /proc/cpuinfo | wc -l` clean all
+}
+
+package() {
+ cd "${_srcname}/build"
+ make install
+ install -m644 ../LICENSE ${pkgdir}/usr/share/Caffe
+}
diff --git a/dependencies.patch b/dependencies.patch
new file mode 100644
index 000000000000..b37affd0ac62
--- /dev/null
+++ b/dependencies.patch
@@ -0,0 +1,23 @@
+--- Dependencies.cmake 2018-08-11 16:43:41.986780859 +0200
++++ Dependencies.cmake.new 2018-08-11 16:48:27.581959509 +0200
+@@ -345,7 +345,7 @@
+ # Find the matching boost python implementation
+ set(version ${PYTHONLIBS_VERSION_STRING})
+
+- STRING( REGEX REPLACE "[^0-9]" "" boost_py_version ${version} )
++ STRING( REGEX MATCH "[0-9]" boost_py_version ${version} )
+ find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
+ set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
+
+@@ -356,6 +356,11 @@
+ find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
+ set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
+
++ if(NOT Boost_PYTHON_FOUND)
++ find_package(Boost 1.46 COMPONENTS "python${boost_py_version}")
++ set(Boost_PYTHON_FOUND ${Boost_PYTHON${boost_py_version}_FOUND})
++ endif()
++
+ STRING( REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version ${version} )
+ if("${has_more_version}" STREQUAL "")
+ break()