[caffe-contrib] 160/362: d/rules: update to see if custom target works

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue May 3 09:24:26 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-contrib.

commit a4a57aa12c35e0983d425c3977cf5a1c2b5c1c8d
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Tue Sep 1 15:22:42 2015 +0000

    d/rules: update to see if custom target works
---
 debian/rules | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/debian/rules b/debian/rules
index 082e55f..1cb2e96 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,10 +27,11 @@ CONFFLAG_CPU = \
 	-DBUILD_python=ON \
 	-Dpython_version="2" \
 	-DBUILD_matlab=OFF \
-	-DBUILD_docs=ON \
+	-DBUILD_docs=OFF \
 	-DBUILD_python_layer=ON \
 	-DCMAKE_VERBOSE_MAKEFILE=ON \
-	-DCMAKE_INSTALL_PREFIX="/caffe_cpu"
+	-DCMAKE_INSTALL_PREFIX="/caffe_cpu" \
+	-DCMAKE_INSTALL_CONFIG_NAME="Release"
 CONFFLAG_CUDA = \
 	-DBLAS="Open" \
 	-DCMAKE_SKIP_RPATH=TRUE \
@@ -40,13 +41,14 @@ CONFFLAG_CUDA = \
 	-DBUILD_python=ON \
 	-Dpython_version="2" \
 	-DBUILD_matlab=OFF \
-	-DBUILD_docs=ON \
+	-DBUILD_docs=OFF \
 	-DBUILD_python_layer=ON \
 	-DCMAKE_VERBOSE_MAKEFILE=ON \
 	-DCUDA_ARCH_NAME="All" \
 	-DCMAKE_CXX_COMPILER=g++-4.9 \
 	-DCMAKE_C_COMPILER=gcc-4.9 \
-	-DCMAKE_INSTALL_PREFIX="/caffe_cuda"
+	-DCMAKE_INSTALL_PREFIX="/caffe_cuda" \
+	-DCMAKE_INSTALL_CONFIG_NAME="Release"
 
 %:
 	dh $@ \
@@ -107,16 +109,28 @@ get-orig-source:
 # allowing users to build their locally performance-optimized packages.
 # TODO: Test if following custom works
 CUSTOM_CONFIG := ""
+CUSTOM_JOBS   := "-j4"
 .PHONY: custom-cpu custom-cuda
 custom-cpu:
 	dch --local='+custom' "Custom build of caffe-cpu on `uname -a`"
+	dpkg-source --after-build ./
+	dpkg-source --before-build ./
 	dh_auto_clean --builddirectory=${CAFFE_CPU_BUILDDIR}
-	dh_auto_configure \
-         --builddirectory=${CAFFE_CPU_BUILDDIR} \
-         -- $(CONFFLAG_CPU) $(CUSTOM_CONFIG)
-	dh_auto_build --builddirectory=${CAFFE_CPU_BUILDDIR}    
+	mkdir ${CAFFE_CPU_BUILDDIR}
+	#	dh_auto_configure \
+	#	     --builddirectory=${CAFFE_CPU_BUILDDIR} \
+	#	     -- $(CONFFLAG_CPU) $(CUSTOM_CONFIG)
+	cd ${CAFFE_CPU_BUILDDIR}; cmake $(CONFFLAG_CPU) $(CUSTOM_CONFIG) \
+			-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cpu" ..
+	#cd ${CAFFE_CPU_BUILDDIR}; make $(CUSTOM_JOBS) all caffe pycaffe test.testbin
+	dh_auto_build --builddirectory=${CAFFE_CPU_BUILDDIR} -- $(CUSTOM_JOBS) \
+			all caffe pycaffe test.testbin
 	dh_auto_test --builddirectory=${CAFFE_CPU_BUILDDIR} \
 		-- runtest LD_LIBRARY_PATH=${CAFFE_CPU_BUILDDIR}/lib/ 
+	#cd ${CAFFE_CPU_BUILDDIR}; make $(CUSTOM_JOBS) runtest \
+	#		LD_LIBRARY_PATH=${CAFFE_CPU_BUILDDIR}/lib/
+	dh_auto_install --builddirectory=${CAFFE_CUDA_BUILDDIR} -- install
+	cd ${CAFFE_CPU_BUILDDIR}; make $(CUSTOM_JOBS) install
 	fakeroot dh binary \
 		--package=caffe-cpu \
 		--package=libcaffe-cpu0 \

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



More information about the debian-science-commits mailing list