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 <cheimes@redhat.com>
This commit is contained in:
Petr Spacek 2016-11-10 14:39:59 +01:00 committed by Martin Basti
parent 20918579ac
commit 1fa0ed954b
3 changed files with 17 additions and 19 deletions

View File

@ -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

View File

@ -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

View File

@ -34,3 +34,6 @@ MAINTAINERCLEANFILES = \
*~ \
Makefile.in
$(NULL)
install-data-hook:
$(INSTALL) -d -m 755 $(DESTDIR)$(appdir)/js/plugins