summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2022-03-01 11:02:21 -0300
committerDaniel Bermond2022-03-01 11:02:21 -0300
commit3ddd0adce035afbba0f6d5d7312f4cb2f456decf (patch)
tree1f10a1be9c97a78a8b5bb6110040bd8ca8b45a0e
parent504c3616ef2b9819a15ac2775300c696a86fe064 (diff)
downloadaur-3ddd0adce035afbba0f6d5d7312f4cb2f456decf.tar.gz
Fix build with protobuf 3.19.4. Fix cuda warnings. Split package.
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD94
2 files changed, 95 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5ad7fe649f3f..5d6c41a9bf24 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,42 @@
pkgbase = caffe-cuda
pkgdesc = A deep learning framework made with expression, speed, and modularity in mind (with cuda support)
pkgver = 1.0
- pkgrel = 10
+ pkgrel = 11
url = https://caffe.berkeleyvision.org/
arch = x86_64
license = BSD
+ makedepends = openblas
+ makedepends = lapack
+ makedepends = boost-libs
+ makedepends = protobuf
+ makedepends = google-glog
+ makedepends = gflags
+ makedepends = hdf5
+ makedepends = opencv
+ makedepends = leveldb
+ makedepends = lmdb
+ makedepends = python
+ makedepends = python-numpy
+ makedepends = python-pandas
+ makedepends = cuda
+ makedepends = nccl
makedepends = boost
makedepends = doxygen
makedepends = texlive-core
makedepends = texlive-latexextra
makedepends = ghostscript
+ source = https://github.com/BVLC/caffe/archive/1.0/caffe-1.0.tar.gz
+ source = Makefile.config
+ source = 010-caffe-opencv4-fix.patch::https://github.com/BVLC/caffe/commit/7f503bd9a19758a173064e299ab9d4cac65ed60f.patch
+ source = 020-caffe-protobuf3.19.4-fix.patch::https://github.com/BVLC/caffe/commit/1b317bab3f6413a1b5d87c9d3a300d785a4173f9.patch
+ source = 030-caffe-cuda10-fix.patch::https://github.com/BVLC/caffe/commit/7ae5c5b9d07895e77a6ed0cafbe790aa5504b6a7.patch
+ sha256sums = 71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f
+ sha256sums = fa15c69970a6006512319944dc171e92b42b3eb0ea8d0e9e1fb9cf0e4833b04c
+ sha256sums = 2072c8ca1393b53ef280a15c43af940cc9bf1419ae32b3d8a6541b10b8cb50e9
+ sha256sums = 65be5a646ab32e9b277b4352b702a57ac6c79af5258e12e33b9751f07d1031aa
+ sha256sums = a46aa391d4f7df7dd038c753ecbc0459722cd4df19dbac166a3b3f39a659d39a
+
+pkgname = caffe-cuda
depends = openblas
depends = lapack
depends = boost-libs
@@ -43,12 +70,9 @@ pkgbase = caffe-cuda
optdepends = python-pydotplus
provides = caffe
conflicts = caffe
- source = caffe-1.0.tar.gz::https://github.com/BVLC/caffe/archive/1.0.tar.gz
- source = Makefile.config
- source = caffe-opencv4-fix.patch::https://github.com/BVLC/caffe/pull/6625/commits/7f503bd9a19758a173064e299ab9d4cac65ed60f.patch
- sha256sums = 71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f
- sha256sums = fa15c69970a6006512319944dc171e92b42b3eb0ea8d0e9e1fb9cf0e4833b04c
- sha256sums = 2072c8ca1393b53ef280a15c43af940cc9bf1419ae32b3d8a6541b10b8cb50e9
-
-pkgname = caffe-cuda
+pkgname = caffe-cuda-doc
+ pkgdesc = A deep learning framework made with expression, speed, and modularity in mind (with cuda support, documentation)
+ arch = any
+ provides = caffe-doc
+ conflicts = caffe-doc
diff --git a/PKGBUILD b/PKGBUILD
index 5a0934609cc3..c89bfc63e8ec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,39 @@
# Maintainer : Daniel Bermond <dbermond@archlinux.org>
-pkgname=caffe-cuda
+pkgbase=caffe-cuda
+pkgname=('caffe-cuda' 'caffe-cuda-doc')
pkgver=1.0
-pkgrel=10
+pkgrel=11
pkgdesc='A deep learning framework made with expression, speed, and modularity in mind (with cuda support)'
arch=('x86_64')
url='https://caffe.berkeleyvision.org/'
license=('BSD')
-depends=('openblas' 'lapack' 'boost-libs' 'protobuf' 'google-glog' 'gflags'
- 'hdf5' 'opencv' 'leveldb' 'lmdb' 'python' 'python-numpy' 'python-pandas'
- 'cuda' 'nccl')
-optdepends=(
- # official repositories:
- 'cython' 'python-scipy' 'python-matplotlib' 'ipython' 'python-h5py'
- 'python-networkx' 'python-nose' 'python-dateutil' 'python-protobuf'
- 'python-gflags' 'python-yaml' 'python-pillow' 'python-six'
- # AUR:
- '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/1.0/python/caffe/draw.py#L7-L22
-)
-makedepends=('boost' 'doxygen' 'texlive-core' 'texlive-latexextra' 'ghostscript')
-provides=('caffe')
-conflicts=('caffe')
-source=("caffe-${pkgver}.tar.gz"::"https://github.com/BVLC/caffe/archive/${pkgver}.tar.gz"
+makedepends=('openblas' 'lapack' 'boost-libs' 'protobuf' 'google-glog' 'gflags'
+ 'hdf5' 'opencv' 'leveldb' 'lmdb' 'python' 'python-numpy' 'python-pandas'
+ 'cuda' 'nccl'
+ 'boost' 'doxygen' 'texlive-core' 'texlive-latexextra' 'ghostscript')
+source=("https://github.com/BVLC/caffe/archive/${pkgver}/caffe-${pkgver}.tar.gz"
'Makefile.config'
- 'caffe-opencv4-fix.patch'::'https://github.com/BVLC/caffe/pull/6625/commits/7f503bd9a19758a173064e299ab9d4cac65ed60f.patch')
+ '010-caffe-opencv4-fix.patch'::'https://github.com/BVLC/caffe/commit/7f503bd9a19758a173064e299ab9d4cac65ed60f.patch'
+ '020-caffe-protobuf3.19.4-fix.patch'::'https://github.com/BVLC/caffe/commit/1b317bab3f6413a1b5d87c9d3a300d785a4173f9.patch'
+ '030-caffe-cuda10-fix.patch'::'https://github.com/BVLC/caffe/commit/7ae5c5b9d07895e77a6ed0cafbe790aa5504b6a7.patch')
sha256sums=('71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f'
'fa15c69970a6006512319944dc171e92b42b3eb0ea8d0e9e1fb9cf0e4833b04c'
- '2072c8ca1393b53ef280a15c43af940cc9bf1419ae32b3d8a6541b10b8cb50e9')
+ '2072c8ca1393b53ef280a15c43af940cc9bf1419ae32b3d8a6541b10b8cb50e9'
+ '65be5a646ab32e9b277b4352b702a57ac6c79af5258e12e33b9751f07d1031aa'
+ 'a46aa391d4f7df7dd038c753ecbc0459722cd4df19dbac166a3b3f39a659d39a')
prepare() {
cp -af Makefile.config "caffe-${pkgver}"
- patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/caffe-opencv4-fix.patch"
+
+ # https://github.com/BVLC/caffe/pull/6625
+ patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/010-caffe-opencv4-fix.patch"
+
+ # https://github.com/BVLC/caffe/pull/7044
+ patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/020-caffe-protobuf3.19.4-fix.patch"
+
+ # https://github.com/BVLC/caffe/pull/6681
+ patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/030-caffe-cuda10-fix.patch"
}
build() {
@@ -46,32 +46,62 @@ check() {
make -C "caffe-${pkgver}" runtest
}
-package() {
+package_caffe-cuda() {
+ depends=('openblas' 'lapack' 'boost-libs' 'protobuf' 'google-glog' 'gflags'
+ 'hdf5' 'opencv' 'leveldb' 'lmdb' 'python' 'python-numpy' 'python-pandas'
+ 'cuda' 'nccl')
+ optdepends=(
+ # official repositories:
+ 'cython' 'python-scipy' 'python-matplotlib' 'ipython' 'python-h5py'
+ 'python-networkx' 'python-nose' 'python-dateutil' 'python-protobuf'
+ 'python-gflags' 'python-yaml' 'python-pillow' 'python-six'
+ # AUR:
+ '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/1.0/python/caffe/draw.py#L7-L22
+ )
+ provides=('caffe')
+ conflicts=('caffe')
+
local _pyver
_pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
- mkdir -p "$pkgdir"/usr/{bin,include,lib/python"$_pyver"/site-packages,share/doc}
+ install -d -m755 "${pkgdir}/usr"/{bin,include,lib/python"$_pyver"/site-packages}
# binaries
install -m755 "caffe-${pkgver}/distribute/bin"/* "${pkgdir}/usr/bin"
# library
- cp -a "caffe-${pkgver}/distribute/lib"/libcaffe.so* "${pkgdir}/usr/lib"
+ local _sover
+ local _sover_full
+ _sover="$(find "caffe-${pkgver}/distribute/lib" -type f -name "libcaffe.so.*.*.*" | sed 's|.*\.so\.||;s|\..*||')"
+ _sover_full="$(find "caffe-${pkgver}/distribute/lib" -type f -name "libcaffe.so.*.*.*" | sed 's|.*\.so\.||')"
+ cp -dr --no-preserve='ownership' "caffe-${pkgver}/distribute/lib"/libcaffe.so* "${pkgdir}/usr/lib"
+ ln -s "libcaffe.so.${_sover_full}" "${pkgdir}/usr/lib/libcaffe.so.${_sover}"
chmod 755 "${pkgdir}/usr/lib"/libcaffe.so.*.*.*
# headers
- cp -a "caffe-${pkgver}/distribute/include" "${pkgdir}/usr"
+ cp -dr --no-preserve='ownership' "caffe-${pkgver}/distribute/include" "${pkgdir}/usr"
# python
- install -m755 "caffe-${pkgver}/distribute/python"/*.py "${pkgdir}/usr/bin"
- cp -a "caffe-${pkgver}/distribute/python/caffe" "${pkgdir}/usr/lib/python${_pyver}/site-packages"
+ install -D -m755 "caffe-${pkgver}/distribute/python"/*.py "${pkgdir}/usr/bin"
+ cp -dr --no-preserve='ownership' "caffe-${pkgver}/distribute/python/caffe" "${pkgdir}/usr/lib/python${_pyver}/site-packages"
# proto
install -D -m644 "caffe-${pkgver}/distribute/proto/caffe.proto" -t "${pkgdir}/usr/share/caffe"
- # docs
- cp -a "caffe-${pkgver}/doxygen/html" "${pkgdir}/usr/share/doc/${pkgname}"
-
# license
install -D -m644 "caffe-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
+
+package_caffe-cuda-doc() {
+ pkgdesc="$(sed 's/)/, documentation)/' <<< "$pkgdesc")"
+ arch=('any')
+ provides=('caffe-doc')
+ conflicts=('caffe-doc')
+
+ install -d -m755 "${pkgdir}/usr/share/doc"
+ cp -dr --no-preserve='ownership' "caffe-${pkgver}/doxygen/html" "${pkgdir}/usr/share/doc/caffe"
+ install -D -m644 "caffe-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}