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