[Pkg-golang-commits] [golang] 02/05: make ${file} from ${file}.in in a loop in gencontrol

Michael Hudson-Doyle mwhudson-guest at moszumanska.debian.org
Tue Jul 19 22:46:50 UTC 2016


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

mwhudson-guest pushed a commit to branch golang-1.7
in repository golang.

commit b34377e98faf43db4e219aa4028027ad8bf34f2b
Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
Date:   Wed Jul 20 10:11:03 2016 +1200

    make ${file} from ${file}.in in a loop in gencontrol
---
 debian/gbp.conf |  2 ++
 debian/rules    | 26 +++++++++-----------------
 debian/watch    |  2 ++
 3 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/debian/gbp.conf b/debian/gbp.conf
index a0512d1..a4a4323 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,4 +1,6 @@
+#
 # WARNING: "debian/gbp.conf" is generated via "debian/rules gencontrol" (sourced from "debian/gbp.conf.in")
+#
 
 [DEFAULT]
 debian-branch = golang-1.7
diff --git a/debian/rules b/debian/rules
index 85cf397..b523e0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,23 +20,15 @@ endif
 	+dh --parallel $(opt_no_act) $@
 
 gencontrol:
-	{ \
-		echo '#'; \
-		echo '# WARNING: "debian/control" is generated via "debian/rules gencontrol" (sourced from "debian/control.in")'; \
-		echo '#'; \
-		echo; \
-		sed -e 's/golang-X.Y/golang-$(GOVER)/g' debian/control.in; \
-	} > debian/control
-	{ \
-		echo '# WARNING: "debian/gbp.conf" is generated via "debian/rules gencontrol" (sourced from "debian/gbp.conf.in")'; \
-		echo; \
-		sed -e 's/X\.Y/$(GOVER)/g' debian/gbp.conf.in; \
-	} > debian/gbp.conf
-	{ \
-		echo '# WARNING: "debian/watch" is generated via "debian/rules gencontrol" (sourced from "debian/watch.in")'; \
-		echo; \
-		sed -e 's/X\.Y/$(GOVER)/g' debian/watch.in; \
-	} > debian/watch
+	for file in control gbp.conf watch; do \
+		{ \
+			echo '#'; \
+			echo '# WARNING: "debian/'$$file'" is generated via "debian/rules gencontrol" (sourced from "debian/'$$file'.in")'; \
+			echo '#'; \
+			echo; \
+			sed -e 's/X.Y/$(GOVER)/g' debian/$$file.in; \
+		} > debian/$$file; \
+	done
 
 override_dh_auto_clean: gencontrol
 	# remove autogenerated files
diff --git a/debian/watch b/debian/watch
index f14e1cf..3f5a893 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,6 @@
+#
 # WARNING: "debian/watch" is generated via "debian/rules gencontrol" (sourced from "debian/watch.in")
+#
 
 version=3
 opts=\

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list