Patchwork [3,of,4] make: templatize Debian build target a la e63dfbbdbd07

login
register
mail settings
Submitter Anton Shestakov
Date June 23, 2017, 5:43 a.m.
Message ID <198409fdaca73f5cc176.1498196595@neuro>
Download mbox | patch
Permalink /patch/21627/
State Accepted
Headers show

Comments

Anton Shestakov - June 23, 2017, 5:43 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1498194526 -28800
#      Fri Jun 23 13:08:46 2017 +0800
# Node ID 198409fdaca73f5cc176c3bce6b3992b47e83012
# Parent  31014b392b537d7eb0c756b24f334a97536cde3c
make: templatize Debian build target a la e63dfbbdbd07

Patch

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -30,6 +30,7 @@  build
 contrib/chg/chg
 contrib/hgsh/hgsh
 contrib/vagrant/.vagrant
+contrib/docker/debian-*
 contrib/docker/ubuntu-*
 dist
 packages
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -203,7 +203,10 @@  deb:
 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
 
diff --git a/contrib/docker/debian-jessie b/contrib/docker/debian.template
rename from contrib/docker/debian-jessie
rename to contrib/docker/debian.template
--- a/contrib/docker/debian-jessie
+++ b/contrib/docker/debian.template
@@ -1,4 +1,4 @@ 
-FROM debian:jessie
+FROM debian:__CODENAME__
 RUN apt-get update && apt-get install -y \
   build-essential \
   debhelper \