Makefile.am 1.08 KB
Newer Older
1 2 3 4 5
edit = sed \
	-e 's|@version[@]|$(PACKAGE_VERSION)|g' \
	-e 's|@package[@]|$(PACKAGE_NAME)|g' \
	-e 's|@localstatedir[@]|$(localstatedir)|g' \
	-e 's|@prefix[@]|$(prefix)|g' \
6
	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
7 8 9
	-e 's|@config_dir[@]|$(config_dir)|g' \
	-e 's|@storage_dir[@]|$(storage_dir)|g' \
	-e 's|@run_dir[@]|$(run_dir)|g'
10

11
knot.sample.conf: knot.sample.conf.in
12 13 14 15 16 17
	rm -f $@ $@.tmp
	srcdir=''; \
	  test -f ./$@.in || srcdir=$(srcdir)/; \
	  $(edit) $${srcdir}$@.in >$@.tmp
	mv $@.tmp $@

18
EXTRA_DIST = knot.sample.conf.in knot.full.conf knot.keys.conf example.com.zone
19

Lubos Slovak's avatar
Lubos Slovak committed
20
install-data-local: knot.sample.conf
21 22 23 24
	[ -d $(DESTDIR)/$(config_dir) ] || \
	  $(INSTALL) -d $(DESTDIR)/$(config_dir)
	[ -f $(DESTDIR)/$(config_dir)/knot.sample.conf ] || \
	  $(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir)
25

26
uninstall-local:
27 28 29 30
	[ -f $(DESTDIR)/$(config_dir)/knot.sample.conf ] && \
	  rm -f $(DESTDIR)/$(config_dir)/knot.sample.conf
	[ -f $(DESTDIR)/$(config_dir)/example.com.zone ] && \
	  rm -f $(DESTDIR)/$(config_dir)/example.com.zone
31

32
clean-local:
Lubos Slovak's avatar
Lubos Slovak committed
33
	rm -f knot.sample.conf