[caffe] 220/249: d/rules: reduce lines

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue Mar 8 14:51:44 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 d405375509ce90395ff0b354df80d9754260318e
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Fri Sep 4 06:17:42 2015 +0000

    d/rules: reduce lines
---
 debian/rules | 50 ++++++++++++++------------------------------------
 1 file changed, 14 insertions(+), 36 deletions(-)

diff --git a/debian/rules b/debian/rules
index a154a7a..99d2255 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,11 @@ 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"
 
+SUITE_CPU    := caffe-cpu  libcaffe-cpu0  libcaffe-cpu-dev  python-caffe-cpu
+SUITE_CUDA   := caffe-cuda libcaffe-cuda0 libcaffe-cuda-dev python-caffe-cuda
+SUITE_CPU_P  := $(foreach PKG, $(SUITE_CPU),  --package=$(PKG))
+SUITE_CUDA_P := $(foreach PKG, $(SUITE_CUDA), --package=$(PKG))
+
 ifeq (amd64, $(DEB_HOST_ARCH))
 	flag_build_caffe_cuda := y
 endif
@@ -106,38 +111,19 @@ endif
 
 override_dh_makeshlibs:
 	dh_makeshlibs \
-		--package=caffe-cpu \
-		--package=libcaffe-cpu0 \
-		--package=libcaffe-cpu-dev
-	dh_makeshlibs \
-		--package=python-caffe-cpu \
-		-X/usr/lib/python
+		--package=python-caffe-cpu -X/usr/lib/python
 ifeq (y, $(flag_build_caffe_cuda))
 	dh_makeshlibs \
-		--package=caffe-cuda \
-		--package=libcaffe-cuda0 \
-		--package=libcaffe-cuda-dev
-	dh_makeshlibs \
-		--package=python-caffe-cuda \
-		-X/usr/lib/python
+		--package=python-caffe-cuda -X/usr/lib/python
 endif
+	dh_makeshlibs --remaining-packages
 
 override_dh_shlibdeps:
-	dh_shlibdeps \
-		--package=caffe-cpu \
-		--package=libcaffe-cpu0 \
-		--package=libcaffe-cpu-dev \
-		--package=python-caffe-cpu \
-		-- \
-		-xlibcaffe-cuda0
+	dh_shlibdeps $(SUITE_CPU_P) \
+		-- -xlibcaffe-cuda0
 ifeq (y, $(flag_build_caffe_cuda))
-	dh_shlibdeps \
-		--package=caffe-cuda \
-		--package=libcaffe-cuda0 \
-		--package=libcaffe-cuda-dev \
-		--package=python-caffe-cuda \
-		-- \
-		-xlibcaffe-cpu0
+	dh_shlibdeps $(SUITE_CUDA_P) \
+		-- -xlibcaffe-cpu0
 endif
 
 get-orig-source:
@@ -197,11 +183,7 @@ custom-cpu:
 	cd ${CAFFE_CPU_BUILDDIR}; cmake -DCMAKE_INSTALL_CONFIG_NAME="Release" \
 		-P cmake_install.cmake
 	$(RM) debian/*.symbols
-	fakeroot $(RULES) binary \
-		--package=caffe-cpu \
-		--package=libcaffe-cpu0 \
-		--package=libcaffe-cpu-dev \
-		--package=python-caffe-cpu
+	fakeroot $(RULES) binary $(SUITE_CPU_P)
 custom-cuda:
 	dch --local='+custom' "Custom build of caffe-cuda on `uname -a`"
 	dpkg-source --after-build ./
@@ -219,8 +201,4 @@ custom-cuda:
 	cd ${CAFFE_CUDA_BUILDDIR}; cmake -DCMAKE_INSTALL_CONFIG_NAME="Release" \
 		-P cmake_install.cmake
 	$(RM) debian/*.symbols
-	fakeroot $(RULES) binary \
-		--package=caffe-cuda \
-		--package=libcaffe-cuda0 \
-		--package=libcaffe-cuda-dev \
-		--package=python-caffe-cuda
+	fakeroot $(RULES) binary $(SUITE_CUDA_P)

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