[caffe] 117/249: d/rules: add custom target, add get-orig-source target

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue Mar 8 14:51:29 UTC 2016


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

cdluminate-guest pushed a commit to branch debian/experimental
in repository caffe.

commit 655fcbe40c8ea632b808d4db3c0ea37204e30689
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Tue Sep 1 06:23:52 2015 +0000

    d/rules: add custom target, add get-orig-source target
---
 debian/rules | 41 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index c92d166..ca0fa85 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 RULES         := debian/rules
 TOP           := $(shell pwd)
+ORIG_SOURCE   := "https://github.com/BVLC/caffe/archive/master.tar.gz"
 
 export CAFFE_CPU_BUILDDIR="caffe_cpu_build"
 export CAFFE_CUDA_BUILDDIR="caffe_cuda_build"
@@ -98,11 +99,41 @@ ifeq (y, $(flag_build_caffe_cuda))
 		-- install
 endif
 
+get-orig-source:
+	wget -c $(ORIG_SOURCE) -O caffe-git$(shell date +%y%m%d).tar.gz
+
 # Since the Distributed Binary Caffe can not play the best performance
 # of user's machines, it's good to provide a custom build target,
 # allowing users to build their locally performance-optimized packages.
-# TODO: fix this custom target with CMake
-#.PHONY: custom
-#custom:
-#	dch --local='+custom' "Custom build on `uname -a`"
-#	LANG=C $(RULES) TARGET=build binary
+# TODO: Test if following custom works
+.PHONY: custom-cpu custom-cuda
+custom-cpu:
+	dch --local='+custom' "Custom build of caffe-cpu on `uname -a`"
+	#LANG=C $(RULES) TARGET=build binary
+	$(RULES) clean
+	dh_auto_configure \
+         --builddirectory=${CAFFE_CPU_BUILDDIR} \
+         -- $(CONFFLAG_CPU) $@
+	dh_auto_build --builddirectory=${CAFFE_CPU_BUILDDIR}    
+	dh_auto_test --builddirectory=${CAFFE_CPU_BUILDDIR} \
+		-- runtest LD_LIBRARY_PATH=${CAFFE_CPU_BUILDDIR}/lib/ 
+	fakeroot dh binary \
+		--package=caffe-cpu \
+		--package=libcaffe-cpu0 \
+		--package=libcaffe-cpu-dev \
+		--package=python-caffe-cpu
+custom-cuda:
+	dch --local='+custom' "Custom build of caffe-cuda on `uname -a`"
+	$(RULES) clean
+	dh_auto_configure \
+		--builddirectory=${CAFFE_CUDA_BUILDDIR} \
+		-- $(CONFFLAG_CUDA) $@
+	dh_auto_build --builddirectory=${CAFFE_CUDA_BUILDDIR}
+	-dh_auto_test --builddirectory=${CAFFE_CUDA_BUILDDIR} \
+		-- runtest LD_LIBRARY_PATH=${CAFFE_CUDA_BUILDDIR}/lib/
+	dh_auto_install --builddirectory=${CAFFE_CUDA_BUILDDIR} -- install
+	fakeroot dh binary \
+		--package=caffe-cuda \
+		--package=libcaffe-cuda0 \
+		--package=libcaffe-cuda-dev \
+		--package=python-caffe-cuda

-- 
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