summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-11-08 23:15:19 +0000
committerDaniel Bermond2018-11-08 23:15:19 +0000
commit208d1692347d414e61d4e83a06b13bf008f08f62 (patch)
tree96645e79b10ae80a27ad7425597dc4f7b620b14a
parentb0c8e0088d76d659ddc25fd0529ba6b579cb9147 (diff)
downloadaur-208d1692347d414e61d4e83a06b13bf008f08f62.tar.gz
Configure versions inside makefile. Enable tests. Use https on url.
-rw-r--r--.SRCINFO6
-rw-r--r--Makefile.config12
-rw-r--r--PKGBUILD48
3 files changed, 20 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 93ec1e5c1e70..e9f3b2c30293 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = caffe-git
pkgdesc = A deep learning framework made with expression, speed, and modularity in mind (cpu only, git version)
pkgver = 1.0.r132.g99bd99795
- pkgrel = 4
- url = http://caffe.berkeleyvision.org/
+ pkgrel = 5
+ url = https://caffe.berkeleyvision.org/
arch = i686
arch = x86_64
license = BSD
@@ -47,7 +47,7 @@ pkgbase = caffe-git
source = caffe-git::git+https://github.com/BVLC/caffe.git
source = Makefile.config
sha256sums = SKIP
- sha256sums = 9cbe8ea31d70904ec02a4ca3978aa072c99f10aff0629e7616c51bf4a6ca92f5
+ sha256sums = dfa45f0d358b75c28049602d68d6468478c39d45518d584290af76d4ef74738e
pkgname = caffe-git
diff --git a/Makefile.config b/Makefile.config
index a9a8f31bac7b..3b8fd75b2012 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -1,14 +1,18 @@
+_PYVER := $(shell python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')
+_PYMAJ := $(shell python -c 'import sys; print("%s" %sys.version_info[0])')
+_OCVMAJ := $(shell opencv_version | awk -F'.' '{ print $1 }')
+
CPU_ONLY := 1
USE_OPENCV := 1
USE_LEVELDB := 1
USE_LMDB := 1
-OPENCV_VERSION := 3
+OPENCV_VERSION := $(_OCVMAJ)
BLAS := open
BLAS_INCLUDE := /usr/include
BLAS_LIB := /usr/lib
-PYTHON_LIBRARIES := boost_python3 python3.7m
-PYTHON_INCLUDE := /usr/include/python3.7m \
- /usr/lib/python3.7/site-packages/numpy/core/include
+PYTHON_LIBRARIES := boost_python$(_PYMAJ) python$(_PYVER)m
+PYTHON_INCLUDE := /usr/include/python$(_PYVER)m \
+ /usr/lib/python$(_PYVER)/site-packages/numpy/core/include
PYTHON_LIB := /usr/lib
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS := $(PYTHON_INCLUDE)
diff --git a/PKGBUILD b/PKGBUILD
index b1dbd5015340..b28a16f8975a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,10 +4,10 @@
pkgname=caffe-git
pkgver=1.0.r132.g99bd99795
-pkgrel=4
+pkgrel=5
pkgdesc='A deep learning framework made with expression, speed, and modularity in mind (cpu only, git version)'
arch=('i686' 'x86_64')
-url='http://caffe.berkeleyvision.org/'
+url='https://caffe.berkeleyvision.org/'
license=('BSD')
depends=(
# official repositories:
@@ -30,38 +30,10 @@ replaces=('caffe-cpu-git')
source=("$pkgname"::'git+https://github.com/BVLC/caffe.git'
'Makefile.config')
sha256sums=('SKIP'
- '9cbe8ea31d70904ec02a4ca3978aa072c99f10aff0629e7616c51bf4a6ca92f5')
+ 'dfa45f0d358b75c28049602d68d6468478c39d45518d584290af76d4ef74738e')
prepare() {
- cd "$pkgname"
-
- local _pythonver
- local _pythonmaj
- local _opencvmaj
-
- _pythonver="$(python --version | awk '{ print $2 }' | grep -o '^[0-9]*\.[0-9]*')"
- _pythonmaj="$(python --version | awk '{ print $2 }' | awk -F'.' '{ print $1 }')"
- _opencvmaj="$(opencv_version | awk -F'.' '{ print $1 }')"
-
- # copy configuration options
- cp -af "${srcdir}/Makefile.config" .
-
- # make sure to use the correct versions of python and opencv
-
- if ! grep -q "python${_pythonver}" Makefile.config
- then
- sed -i "s/python[0-9]*\.[0-9]*/python${_pythonver}/" Makefile.config
- fi
-
- if ! grep -q "boost_python${_pythonmaj}" Makefile.config
- then
- sed -i "/boost_python[0-9]/s/[0-9]/${_pythonmaj}/" Makefile.config
- fi
-
- if ! grep -q "OPENCV_VERSION[[:space:]]:=[[:space:]]${_opencvmaj}" Makefile.config
- then
- sed -i "/OPENCV_VERSION/s/[0-9]*$/${_opencvmaj}/" Makefile.config
- fi
+ cp -af "${srcdir}/Makefile.config" "${srcdir}/${pkgname}"
}
pkgver() {
@@ -79,18 +51,16 @@ build() {
make docs distribute
}
-# uncomment this block if you want to run the checks/tests
-#check() {
-# cd "$pkgname"
-# make test
-# make runtest
-#}
+check() {
+ cd "$pkgname"
+ make test runtest
+}
package() {
cd "${pkgname}/distribute"
local _pythonver
- _pythonver="$(python --version | awk '{ print $2 }' | grep -o '^[0-9]*\.[0-9]*')"
+ _pythonver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
mkdir -p "$pkgdir"/usr/{bin,include,lib/python"$_pythonver"/site-packages,share/doc}