Form generator for discovery along with sample form.
[shibboleth/sp.git] / configs / Makefile.am
1 ## $Id$ 
2
3 AUTOMAKE_OPTIONS = foreign
4
5 pkglibdir = ${libdir}/@PACKAGE@
6 pkglogdir = ${localstatedir}/log/@PACKAGE@
7 pkgdocdir = ${datadir}/doc/@PACKAGE@
8 shirelogdir = ${localstatedir}/log/httpd
9 pkgxmldir = $(datadir)/xml/@PACKAGE@
10 pkgrundir = $(localstatedir)/run/@PACKAGE@
11 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
12 pkgsysconf_DATA = \
13         shibd-redhat \
14         shibd-debian \
15         shibd-osx.plist \
16         apache.config \
17         apache2.config \
18         apache22.config \
19         keygen.sh
20
21 # The config files are installed "special".  Unlike the entries in
22 # pkgsysconf_DATA, these files are installed as "foo.dist" and only
23 # installed as "foo" if "foo" does not already exist.  In other words,
24 # the config files will not overwrite existing versions.
25 BUILTCONFIGFILES = \
26         native.logger \
27         shibd.logger
28
29 # While BUILTCONFIGFILES are processed, these are not; so we should pull
30 # them from SRCDIR.
31 CONFIGFILES = \
32         shibboleth2.xml \
33         attribute-map.xml \
34         attribute-policy.xml \
35         example-metadata.xml \
36         console.logger \
37         syslog.logger \
38         accessError.html \
39         sessionError.html \
40         metadataError.html \
41         bindingTemplate.html \
42         discoveryTemplate.html \
43         localLogout.html \
44         globalLogout.html \
45         sslError.html
46
47 #
48 # Some of these need building
49 #
50 do-build-file:
51         rm -f ${FILE}.tmp
52         sed < ${srcdir}/${FILE}.in > ${FILE}.tmp \
53         -e 's:@-PREFIX-@:${prefix}:g' \
54         -e 's:@-PKGLIBDIR-@:${pkglibdir}:g' \
55         -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:g' \
56         -e 's:@-PKGDOCDIR-@:${pkgdocdir}:g' \
57         -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' \
58         -e 's:@-PKGLOGDIR-@:${pkglogdir}:g' \
59         -e 's:@-SHIRELOGDIR-@:${shirelogdir}:g' \
60         -e 's:@-PKGRUNDIR-@:${pkgrundir}:g'
61         cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE}
62         rm -f ${FILE}.tmp
63
64 apache.config: ${srcdir}/apache.config.in Makefile ${top_builddir}/config.status
65         $(MAKE) do-build-file FILE=$@
66
67 apache2.config: ${srcdir}/apache2.config.in Makefile ${top_builddir}/config.status
68         $(MAKE) do-build-file FILE=$@
69
70 apache22.config: ${srcdir}/apache22.config.in Makefile ${top_builddir}/config.status
71         $(MAKE) do-build-file FILE=$@
72
73 shibd-redhat: ${srcdir}/shibd-redhat.in Makefile ${top_builddir}/config.status
74         $(MAKE) do-build-file FILE=$@
75
76 shibd-debian: ${srcdir}/shibd-debian.in Makefile ${top_builddir}/config.status
77         $(MAKE) do-build-file FILE=$@
78
79 shibd-osx.plist: ${srcdir}/shibd-osx.plist.in Makefile ${top_builddir}/config.status
80         $(MAKE) do-build-file FILE=$@
81
82 shibd.logger: ${srcdir}/shibd.logger.in Makefile ${top_builddir}/config.status
83         $(MAKE) do-build-file FILE=$@
84
85 native.logger: ${srcdir}/native.logger.in Makefile ${top_builddir}/config.status
86         $(MAKE) do-build-file FILE=$@
87
88 all-data-local: $(BUILTCONFIGFILES)
89
90 install-data-local:     all-data-local
91         $(mkinstalldirs) $(DESTDIR)$(pkglogdir)
92         $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
93         $(mkinstalldirs) $(DESTDIR)$(shirelogdir)
94         $(mkinstalldirs) $(DESTDIR)$(pkgrundir)
95         $(mkinstalldirs) $(DESTDIR)$(pkgxmldir)
96         $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
97         for f in $(BUILTCONFIGFILES); do \
98                 if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
99                         $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}; \
100                 fi; \
101                 $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
102         done
103         for f in $(CONFIGFILES); do \
104                 if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
105                         $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}; \
106                 fi; \
107                 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
108         done
109
110 install-data-hook:
111         if test -z "$(NOKEYGEN)"; then \
112                 cd $(DESTDIR)$(pkgsysconfdir); \
113                 sh ./keygen.sh -b ; \
114         fi
115
116 CLEANFILES = \
117         apache.config \
118         apache2.config \
119         apache22.config \
120         shibd-redhat \
121         shibd-debian \
122         shibd-osx.plist \
123         shibd.logger \
124         native.logger
125
126 EXTRA_DIST = \
127         native.logger.in \
128         shibd.logger.in \
129         apache.config.in \
130         apache2.config.in \
131         apache22.config.in \
132         shibd-redhat.in \
133         shibd-debian.in \
134         shibd-osx.plist.in \
135         keygen.bat \
136         keygen.sh \
137         $(CONFIGFILES)