[caffe] 02/02: rules: remove caffe-cuda build, which is moved to caffe-contrib

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue May 3 09:48:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

cdluminate-guest pushed a commit to branch master
in repository caffe.

commit fa3ed31caad2dd94e1d95eb630ab6653f48d9dda
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Tue May 3 09:48:12 2016 +0000

    rules: remove caffe-cuda build, which is moved to caffe-contrib
---
 debian/rules | 74 +++++++++++++++---------------------------------------------
 1 file changed, 18 insertions(+), 56 deletions(-)

diff --git a/debian/rules b/debian/rules
index d6499d8..791a7c3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,25 +13,18 @@ RULES         := debian/rules
 ORIG_SOURCE   := "https://github.com/BVLC/caffe/archive/rc3.tar.gz"
 CAFFE_SOVER   := "1.0.0-rc3"
 
-CAFFE_CPU_BUILDDIR  := "caffe_cpu_build"
-CAFFE_CUDA_BUILDDIR := "caffe_cuda_build"
-SUITE_CPU    := caffe-cpu  libcaffe-cpu1  libcaffe-cpu-dev  python-caffe-cpu
-SUITE_CUDA   := caffe-cuda libcaffe-cuda1 libcaffe-cuda-dev python-caffe-cuda
-SUITE_CPU_P  := $(foreach PKG, $(SUITE_CPU),  --package=$(PKG))
-SUITE_CUDA_P := $(foreach PKG, $(SUITE_CUDA), --package=$(PKG))
-
-# CUDA 7.5 is available for AMD64 and PPC64EL
-ifeq (installed, $(shell dpkg -s nvidia-cuda-toolkit | grep -o installed))
-	flag_build_caffe_cuda := y
-endif
+BUILDDIR      := "build"
+SUITE         := caffe-cpu libcaffe-cpu1 libcaffe-cpu-dev python-caffe-cpu
+SUITE_P       := $(foreach PKG, $(SUITE), --package=$(PKG))
 
 ## CMake Configuration Template.
 ## Include template and override the blank options in later configs.
 ### NOTE
-## * specifying compiler version to GCC-5 because of NVCC campatibility.
-## * we build docs indeed, but we don't build ALL docs, so BUILD_docs is disabled.
+## * CUDA version should require GCC-5 because of NVCC campatibility.
+## * we don't build ALL docs, so BUILD_docs is disabled. TODO: build docs.
 ## * python3 dependency not satisfied yet, can't build python3-caffe*.
-## * lock compiler on GCC-5 to prevent NVCC failure.
+### MAINTAINER
+## * PLEASE sync this common template with caffe-contrib source.
 CMAKE_CONFIGURE_TEMPLATE = \
 	-DALLOW_LMDB_NOLOCK=OFF \
 	-DBLAS="Open" \
@@ -60,10 +53,6 @@ CONFFLAG_CPU = \
 	$(CMAKE_CONFIGURE_TEMPLATE) \
 	-DCMAKE_INSTALL_PREFIX="/caffe_cpu" \
 	-DCPU_ONLY=ON
-CONFFLAG_CUDA = \
-	$(CMAKE_CONFIGURE_TEMPLATE) \
-	-DCMAKE_INSTALL_PREFIX="/caffe_cuda" \
-	-DCPU_ONLY=OFF
 
 %:
 	dh $@ \
@@ -75,66 +64,35 @@ autogen:
 	python3 debian/template_autogen.py $(CAFFE_SOVER)
 
 override_dh_auto_configure: autogen
-	dh_auto_configure \
-		--builddirectory=$(CAFFE_CPU_BUILDDIR) -- $(CONFFLAG_CPU)
-ifeq (y, $(flag_build_caffe_cuda))
-	dh_auto_configure \
-		--builddirectory=$(CAFFE_CUDA_BUILDDIR) -- $(CONFFLAG_CUDA)
-endif	
+	dh_auto_configure --builddirectory=$(BUILDDIR) \
+		-- $(CONFFLAG_CPU)
 
 override_dh_auto_clean:
-	dh_auto_clean --builddirectory=$(CAFFE_CPU_BUILDDIR)
-	dh_auto_clean --builddirectory=$(CAFFE_CUDA_BUILDDIR)
-	#-$(RM) -rf $(CAFFE_CPU_BUILDDIR) $(CAFFE_CUDA_BUILDDIR)
+	dh_auto_clean --builddirectory=$(BUILDDIR)
 	-$(RM) -rf python/caffe/proto/
 	-$(RM) python/caffe/_caffe.so
 
 override_dh_auto_build:
-	dh_auto_build --builddirectory=$(CAFFE_CPU_BUILDDIR) \
+	dh_auto_build --builddirectory=$(BUILDDIR) \
 		-- all caffe pycaffe test.testbin
-ifeq (y, $(flag_build_caffe_cuda))
-	dh_auto_build --builddirectory=$(CAFFE_CUDA_BUILDDIR) \
-		-- all caffe pycaffe test.testbin
-endif
 
 # In the test phase, we need to set LD_LIBRARY_PATH properly
 # for those test ELFs linked with libcaffe.so.X
 override_dh_auto_test: 
-	dh_auto_test --builddirectory=$(CAFFE_CPU_BUILDDIR) \
-		-- runtest LD_LIBRARY_PATH=$(CAFFE_CPU_BUILDDIR)/lib/ 
-ifeq (y, $(flag_build_caffe_cuda))
-	# the i386/amd64 build machine may have no CUDA-capable
-	# video card. Hence heading with a dash.
-	-dh_auto_test --builddirectory=$(CAFFE_CUDA_BUILDDIR) \
-		-- runtest LD_LIBRARY_PATH=$(CAFFE_CUDA_BUILDDIR)/lib/ 
-endif
+	dh_auto_test --builddirectory=$(BUILDDIR) \
+		-- runtest LD_LIBRARY_PATH=$(BUILDDIR)/lib/ 
 
 override_dh_python2:
 	dh_python2 --requires=python/requirements.txt
 	dh_numpy
 
-override_dh_install:
-	dh_install --list-missing
-
 override_dh_auto_install:
-	dh_auto_install --builddirectory=$(CAFFE_CPU_BUILDDIR) -- install
-ifeq (y, $(flag_build_caffe_cuda))
-	dh_auto_install --builddirectory=$(CAFFE_CUDA_BUILDDIR) -- install
-endif
+	dh_auto_install --builddirectory=$(BUILDDIR) -- install
 
 override_dh_makeshlibs:
 	dh_makeshlibs --package=python-caffe-cpu -X/usr/lib/python
-ifeq (y, $(flag_build_caffe_cuda))
-	dh_makeshlibs --package=python-caffe-cuda -X/usr/lib/python
-endif
 	dh_makeshlibs --remaining-packages
 
-override_dh_shlibdeps:
-	dh_shlibdeps $(SUITE_CPU_P) -- -xlibcaffe-cuda1
-ifeq (y, $(flag_build_caffe_cuda))
-	dh_shlibdeps $(SUITE_CUDA_P) -- -xlibcaffe-cpu1
-endif
-
 get-orig-source:
 	wget -c $(ORIG_SOURCE) -O caffe_1.0.0~rc3.orig.tar.gz
 
@@ -177,6 +135,7 @@ custom-cpu:
 	-$(RM) debian/*.symbols
 	fakeroot dh binary $(SUITE_CPU_P)
 custom-cuda:
+ifeq (installed, $(shell dpkg -s nvidia-cuda-toolkit | grep -o installed))
 	dch --local='+custom' "Local custom build of caffe-cuda packages."
 	dch "Host Info: `uname -a`"
 	dpkg-source --after-build ./
@@ -199,4 +158,7 @@ custom-cuda:
 		-P cmake_install.cmake
 	-$(RM) debian/*.symbols
 	fakeroot dh binary $(SUITE_CUDA_P)
+else
+	@echo "PLEASE INSTALL PACKAGE 'nvidia-cuda-toolkit'"
+endif
 #### END: CUSTOM TARGETS ##############################################

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe.git



More information about the debian-science-commits mailing list