Makefile.am 987 Bytes
Newer Older
1 2 3 4 5 6 7
edit = sed \
	-e 's|@version[@]|$(PACKAGE_VERSION)|g' \
	-e 's|@package[@]|$(PACKAGE_NAME)|g' \
	-e 's|@localstatedir[@]|$(localstatedir)|g' \
	-e 's|@prefix[@]|$(prefix)|g' \
	-e 's|@sysconfdir[@]|$(sysconfdir)|g'

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

15
EXTRA_DIST = knot.sample.conf.in knot.full.conf knot.keys.conf example.com.zone
16

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

23 24 25 26 27 28
uninstall-local:
	[ -f $(DESTDIR)/$(sysconfdir)/knot.sample.conf ] && \
	  rm -f $(DESTDIR)/$(sysconfdir)/knot.sample.conf
	[ -f $(DESTDIR)/$(sysconfdir)/example.com.zone ] && \
	  rm -f $(DESTDIR)/$(sysconfdir)/example.com.zone

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