--- /dev/null
+# 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