3 DEB_DIVERT_EXTENSION = .invirt
4 DEB_CHECK_FILES_SOURCE_/etc/krb5.conf.invirt = \
5 /usr/share/kerberos-configs/krb5.conf.template
6 DEB_DIVERT_FILES_invirt-kerberos-config += \
9 include /usr/share/cdbs/1/rules/debhelper.mk
10 include /usr/share/cdbs/1/rules/config-package.mk
12 common-build-indep:: debian/krb5.conf.invirt.mako
14 # A normal kerberos-config package would just create an
15 # /etc/krb5.conf.invirt file (probably using the DEB_TRANSFORM_FILES
16 # syntactic sugar, instead of calling the transform script directly).
17 # However, we want to generate that file dynamically, based on the realm
18 # setting in /etc/master/invirt.yaml. So, instead of packaging
19 # krb5.conf.invirt, we build a mako template in
20 # /etc/krb5.conf.invirt.mako, and our initscript renders it to
21 # /etc/krb5.conf.invirt. In order to get the mako template right, we
22 # generate it by transforming the base krb5.conf to add a mako template
23 # tags specifying the default realm.
24 debian/krb5.conf.invirt.mako: $(call debian_check_files,/etc/krb5.conf)
25 debian/transform_krb5.conf.invirt.mako < $< > $@
28 rm -f debian/krb5.conf.invirt.mako