From 1fa0ed954bb45b6e3858c1c54470b1d16ab204d9 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Nov 15 2016 16:00:32 +0000 Subject: Build: move web UI file installation from SPEC to Makefile.am This is next step towards fully functional make install. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Christian Heimes --- diff --git a/freeipa.spec.in b/freeipa.spec.in index 68fc2bc..45d2896 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -763,28 +763,12 @@ rm %{buildroot}/%{plugin_dir}/libtopology.la rm %{buildroot}/%{_libdir}/krb5/plugins/kdb/ipadb.la rm %{buildroot}/%{_libdir}/samba/pdb/ipasam.la -# Some user-modifiable HTML files are provided. Move these to /etc -# and link back. -mkdir -p %{buildroot}/%{_sysconfdir}/ipa/html -mkdir %{buildroot}%{_usr}/share/ipa/html/ -ln -s ../../../..%{_sysconfdir}/ipa/html/ffconfig.js \ - %{buildroot}%{_usr}/share/ipa/html/ffconfig.js -ln -s ../../../..%{_sysconfdir}/ipa/html/ffconfig_page.js \ - %{buildroot}%{_usr}/share/ipa/html/ffconfig_page.js -ln -s ../../../..%{_sysconfdir}/ipa/html/ssbrowser.html \ - %{buildroot}%{_usr}/share/ipa/html/ssbrowser.html -ln -s ../../../..%{_sysconfdir}/ipa/html/unauthorized.html \ - %{buildroot}%{_usr}/share/ipa/html/unauthorized.html -ln -s ../../../..%{_sysconfdir}/ipa/html/browserconfig.html \ - %{buildroot}%{_usr}/share/ipa/html/browserconfig.html - # So we can own our Apache configuration mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/ /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa.conf /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-kdc-proxy.conf /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf -mkdir -p %{buildroot}%{_usr}/share/ipa/html/ /bin/touch %{buildroot}%{_usr}/share/ipa/html/ca.crt /bin/touch %{buildroot}%{_usr}/share/ipa/html/kerberosauth.xpi /bin/touch %{buildroot}%{_usr}/share/ipa/html/krb.con @@ -792,9 +776,6 @@ mkdir -p %{buildroot}%{_usr}/share/ipa/html/ /bin/touch %{buildroot}%{_usr}/share/ipa/html/krb5.ini /bin/touch %{buildroot}%{_usr}/share/ipa/html/krbrealm.con -# Web UI plugin dir -mkdir -p %{buildroot}%{_usr}/share/ipa/ui/js/plugins - mkdir -p %{buildroot}%{_libdir}/krb5/plugins/libkrb5 touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so diff --git a/install/html/Makefile.am b/install/html/Makefile.am index c487f9f..c65ec26 100644 --- a/install/html/Makefile.am +++ b/install/html/Makefile.am @@ -16,3 +16,17 @@ EXTRA_DIST = \ MAINTAINERCLEANFILES = \ *~ \ Makefile.in + +# Default user-modifiable HTML files are installed into /etc. +# /usr points to these modifiable files in /etc +# This is ugly but we do not have time to change it right now. +# Relative paths must be used to ensure that symlinks created in buildroot +# work after installation. +htmldatadir = $(datarootdir)/ipa/html +install-data-hook: + $(INSTALL) -d -m 755 $(DESTDIR)$(htmldatadir) + for FILE in $(app_DATA); do \ + $(LN_S) --force --relative \ + $(DESTDIR)$(appdir)/$${FILE} \ + $(DESTDIR)$(htmldatadir)/$${FILE}; \ + done diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am index 18fb9b4..c81eceb 100644 --- a/install/ui/Makefile.am +++ b/install/ui/Makefile.am @@ -34,3 +34,6 @@ MAINTAINERCLEANFILES = \ *~ \ Makefile.in $(NULL) + +install-data-hook: + $(INSTALL) -d -m 755 $(DESTDIR)$(appdir)/js/plugins