[caffe] 01/10: rules: new template generation method
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Tue May 17 15:37:21 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 140173676935d1b18cec3b798d0ff2962fcb0862
Author: Zhou Mo <cdluminate at gmail.com>
Date: Tue May 17 15:25:50 2016 +0000
rules: new template generation method
---
debian/rules | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/debian/rules b/debian/rules
index b4b8d97..3b2cf71 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,9 @@ BUILDDIR := "caffe_cpu_build"
SUITE := caffe-cpu libcaffe-cpu1 libcaffe-cpu-dev python-caffe-cpu
SUITE_P := $(foreach PKG, $(SUITE), --package=$(PKG))
+TEMPLATES := $(wildcard debian/*.in)
+AUTOGEN := $(patsubst %.in,%,$(TEMPLATES))
+
## CMake Configuration Template.
## Include template and override the blank options in later configs.
### NOTE
@@ -54,14 +57,21 @@ CONFFLAG_CPU = \
-DCMAKE_INSTALL_PREFIX="/caffe_cpu" \
-DCPU_ONLY=ON
+%:: %.in
+ perl -p \
+ -e 's{#CAFFE_CONFIGURE#}{caffe_cpu}g;' \
+ -e 's{#CAFFE_SOVER#}{$(CAFFE_SOVER)}g;' \
+ -e 's{#DEB_HOST_MULTIARCH#}{$(DEB_HOST_MULTIARCH)}g;' \
+ < $< > $@
+
%:
dh $@ \
--parallel \
--buildsystem=cmake \
--with python2,bash-completion
-autogen:
- python3 debian/template_autogen.py $(CAFFE_SOVER) $(DEB_HOST_MULTIARCH)
+.PHONY: autogen
+autogen: $(AUTOGEN)
override_dh_auto_configure: autogen
dh_auto_configure --builddirectory=$(BUILDDIR) \
--
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