Convert packaging to Debhelper 7 / config-package-dev 5 format.
[invirt/packages/invirt-kerberos-config.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..4c927f2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+# A normal kerberos-config package would just create and package an
+# /etc/krb5.conf.invirt file (using config-packag-dev's 'transform').
+# However, we want to generate that file dynamically, based on the realm
+# setting in /etc/master/invirt.yaml. So, instead of packaging
+# krb5.conf.invirt, we build a mako template and install it as
+# /etc/krb5.conf.invirt.mako, and our initscript renders it to
+# /etc/krb5.conf.invirt. In order to get the mako template right, we
+# generate it by running a filter on the base krb5.conf to add mako
+# template tags specifying the default realm.
+
+all: krb5.conf.invirt.mako
+
+krb5.conf.invirt.mako: 
+       ./templatize-krb5-conf < /usr/share/kerberos-configs/krb5.conf.template > $@
+
+clean::
+       rm -f krb5.conf.invirt.mako
+
+.PHONY: clean