Makefile.am 1.33 KB
Newer Older
1
2
3
4
pkglibexecdir = $(libexecdir)/@PACKAGE@

pkglibexec_SCRIPTS = b10-cmdctl

5
b10_cmdctldir = $(DESTDIR)$(pkgdatadir)
6
7
8
9
10

# NOTE: this will overwrite on install
# So these generic copies are placed in share/bind10 instead of to etc
# Admin or packageer will need to put into place manually.

Jeremy C. Reed's avatar
Jeremy C. Reed committed
11
12
13
14
CMDCTL_CONFIGURATIONS = cmdctl-accounts.csv
CMDCTL_CONFIGURATIONS += cmdctl-keyfile.pem cmdctl-certfile.pem

b10_cmdctl_DATA = $(CMDCTL_CONFIGURATIONS)
15
16
17
18
b10_cmdctl_DATA += cmdctl.spec
 
EXTRA_DIST = cmdctl-accounts.csv cmdctl-keyfile.pem cmdctl-certfile.pem
EXTRA_DIST += cmdctl.spec
19

Jeremy C. Reed's avatar
Jeremy C. Reed committed
20
CLEANFILES=	b10-cmdctl
21

22
23
24
man_MANS = b10-cmdctl.8
EXTRA_DIST += $(man_MANS) b10-cmdctl.xml

25
26
if ENABLE_MAN

27
28
29
b10-cmdctl.8: b10-cmdctl.xml
	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl.xml

30
31
endif

32
33
# TODO: does this need $$(DESTDIR) also?
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
34
35
b10-cmdctl: cmdctl.py
	$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" cmdctl.py >$@
36
	chmod a+x $@
37

Jeremy C. Reed's avatar
Jeremy C. Reed committed
38
# TODO: permissions handled later
39
40
install-data-local:
	$(mkinstalldirs) $(DESTDIR)/@sysconfdir@/@PACKAGE@   
Jeremy C. Reed's avatar
Jeremy C. Reed committed
41
42
43
44
45
	for f in $(CMDCTL_CONFIGURATIONS) ; do	\
	  if test ! -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f; then	\
	    $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(sysconfdir)/@PACKAGE@/ ;	\
	  fi ;	\
	done
46