make: templatize Debian build target a la e63dfbbdbd07 stable
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 23 Jun 2017 13:08:46 +0800
branchstable
changeset 32150 5c1283713293
parent 32149 9b690032fe07
child 32151 231690dba9b4
make: templatize Debian build target a la e63dfbbdbd07
.hgignore
Makefile
contrib/docker/debian-jessie
contrib/docker/debian.template
--- a/.hgignore	Fri Jun 23 12:04:12 2017 +0800
+++ b/.hgignore	Fri Jun 23 13:08:46 2017 +0800
@@ -30,6 +30,7 @@
 contrib/chg/chg
 contrib/hgsh/hgsh
 contrib/vagrant/.vagrant
+contrib/docker/debian-*
 contrib/docker/ubuntu-*
 dist
 packages
--- a/Makefile	Fri Jun 23 12:04:12 2017 +0800
+++ b/Makefile	Fri Jun 23 13:08:46 2017 +0800
@@ -196,7 +196,10 @@
 ppa:
 	contrib/builddeb --source-only
 
-docker-debian-jessie:
+contrib/docker/debian-%: contrib/docker/debian.template
+	sed "s/__CODENAME__/$*/" $< > $@
+
+docker-debian-jessie: contrib/docker/debian-jessie
 	mkdir -p packages/debian-jessie
 	contrib/dockerdeb debian jessie
 
--- a/contrib/docker/debian-jessie	Fri Jun 23 12:04:12 2017 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-FROM debian:jessie
-RUN apt-get update && apt-get install -y \
-  build-essential \
-  debhelper \
-  dh-python \
-  devscripts \
-  less \
-  python \
-  python-all-dev \
-  python-docutils \
-  zip \
-  unzip
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/docker/debian.template	Fri Jun 23 13:08:46 2017 +0800
@@ -0,0 +1,12 @@
+FROM debian:__CODENAME__
+RUN apt-get update && apt-get install -y \
+  build-essential \
+  debhelper \
+  dh-python \
+  devscripts \
+  less \
+  python \
+  python-all-dev \
+  python-docutils \
+  zip \
+  unzip