Fix backslashes in SHIBSP_PREFIX variable by manually creating it during the script...
[shibboleth/sp.git] / configs / Makefile.am
index 27f6c21..d72363b 100644 (file)
@@ -2,30 +2,48 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-logdir=${localstatedir}/log/shibboleth
+pkglibdir = ${libdir}/@PACKAGE@
+pkglogdir = ${localstatedir}/log/@PACKAGE@
+pkgdocdir = ${datadir}/doc/@PACKAGE@
+shirelogdir = ${localstatedir}/log/httpd
+pkgxmldir = $(datadir)/xml/@PACKAGE@
+pkgrundir = $(localstatedir)/run/@PACKAGE@
 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
 pkgsysconf_DATA = \
-       shar.key \
-       shar.crt \
+       shibd-redhat \
+       shibd-debian \
+       shibd-osx.plist \
        apache.config \
        apache2.config \
-       AAP.xml \
-       IQ-sites.xml \
-       IQ-trust.xml \
-       inqueue.pem
+       apache22.config \
+       keygen.sh \
+       upgrade.xsl
 
 # The config files are installed "special".  Unlike the entries in
 # pkgsysconf_DATA, these files are installed as "foo.dist" and only
 # installed as "foo" if "foo" does not already exist.  In other words,
 # the config files will not overwrite existing versions.
+BUILTCONFIGFILES = \
+       native.logger \
+       shibd.logger
+
+# While BUILTCONFIGFILES are processed, these are not; so we should pull
+# them from SRCDIR.
 CONFIGFILES = \
-       shibboleth.xml \
-       shibboleth.logger \
-       shire.logger \
-       shar.logger \
+       shibboleth2.xml \
+       attribute-map.xml \
+       attribute-policy.xml \
+       example-metadata.xml \
+       console.logger \
+       syslog.logger \
        accessError.html \
-       rmError.html \
-       shireError.html
+       sessionError.html \
+       metadataError.html \
+       bindingTemplate.html \
+       discoveryTemplate.html \
+       localLogout.html \
+       globalLogout.html \
+       sslError.html
 
 #
 # Some of these need building
@@ -33,10 +51,14 @@ CONFIGFILES = \
 do-build-file:
        rm -f ${FILE}.tmp
        sed < ${srcdir}/${FILE}.in > ${FILE}.tmp \
-           -e 's:@-PREFIX-@:${prefix}:' \
-           -e 's:@-LIBEXECDIR-@:${libexecdir}:' \
-           -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:' \
-           -e 's:@-LOGDIR-@:${logdir}:'
+        -e 's:@-PREFIX-@:${prefix}:g' \
+        -e 's:@-PKGLIBDIR-@:${pkglibdir}:g' \
+        -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:g' \
+        -e 's:@-PKGDOCDIR-@:${pkgdocdir}:g' \
+        -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' \
+        -e 's:@-PKGLOGDIR-@:${pkglogdir}:g' \
+        -e 's:@-SHIRELOGDIR-@:${shirelogdir}:g' \
+        -e 's:@-PKGRUNDIR-@:${pkgrundir}:g'
        cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE}
        rm -f ${FILE}.tmp
 
@@ -46,48 +68,73 @@ apache.config: ${srcdir}/apache.config.in Makefile ${top_builddir}/config.status
 apache2.config: ${srcdir}/apache2.config.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
-shar.logger: ${srcdir}/shar.logger.in Makefile ${top_builddir}/config.status
+apache22.config: ${srcdir}/apache22.config.in Makefile ${top_builddir}/config.status
+       $(MAKE) do-build-file FILE=$@
+
+shibd-redhat: ${srcdir}/shibd-redhat.in Makefile ${top_builddir}/config.status
+       $(MAKE) do-build-file FILE=$@
+
+shibd-debian: ${srcdir}/shibd-debian.in Makefile ${top_builddir}/config.status
+       $(MAKE) do-build-file FILE=$@
+
+shibd-osx.plist: ${srcdir}/shibd-osx.plist.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
-shire.logger: ${srcdir}/shire.logger.in Makefile ${top_builddir}/config.status
+shibd.logger: ${srcdir}/shibd.logger.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
-shibboleth.xml: ${srcdir}/shibboleth.xml.in Makefile ${top_builddir}/config.status
+native.logger: ${srcdir}/native.logger.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
-all-data-local: $(CONFIGFILES)
+all-data-local: $(BUILTCONFIGFILES)
 
-install-data-local:
-       $(mkinstalldirs) $(DESTDIR)$(logdir)
-       $(mkinstalldirs) $(DESTDIR)$(prefix)/data
+install-data-local:    all-data-local
+       $(mkinstalldirs) $(DESTDIR)$(pkglogdir)
+       $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)
+       $(mkinstalldirs) $(DESTDIR)$(shirelogdir)
+       $(mkinstalldirs) $(DESTDIR)$(pkgrundir)
+       $(mkinstalldirs) $(DESTDIR)$(pkgxmldir)
        $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
-       for f in $(CONFIGFILES); do \
+       for f in $(BUILTCONFIGFILES); do \
                if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
                        $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}; \
                fi; \
                $(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
         done
+       for f in $(CONFIGFILES); do \
+               if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
+                       $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}; \
+               fi; \
+               $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
+        done
+
+install-data-hook:
+       if test -z "$(NOKEYGEN)"; then \
+               cd $(DESTDIR)$(pkgsysconfdir); \
+               sh ./keygen.sh -b ; \
+       fi
 
 CLEANFILES = \
        apache.config \
        apache2.config \
-       shar.logger \
-       shire.logger \
-       shibboleth.xml
-
-EXTRA_DIST = .cvsignore \
-       shibboleth.xml.in \
-       shire.logger.in \
-       shar.logger.in \
+       apache22.config \
+       shibd-redhat \
+       shibd-debian \
+       shibd-osx.plist \
+       shibd.logger \
+       native.logger
+
+EXTRA_DIST = \
+       native.logger.in \
+       shibd.logger.in \
        apache.config.in \
        apache2.config.in \
-       shibboleth.logger \
-       accessError.html \
-       rmError.html \
-       shireError.html \
-       AAP.xml \
-       IQ-sites.xml \
-       IQ-trust.xml \
-       inqueue.pem \
-       shar.key \
-       shar.crt
+       apache22.config.in \
+       shibd-redhat.in \
+       shibd-debian.in \
+       shibd-osx.plist.in \
+       keygen.bat \
+       keygen.sh \
+       upgrade.xsl \
+       xsltproc.js \
+       $(CONFIGFILES)