Commit b055ced1 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

tomcat has to be installed manually, path of tomcat changed

parent b457ba33
......@@ -7,7 +7,7 @@ License: AGPLv3
URL: http://r3lab.uni.lu/web/minerva-website/
Source0: https://git-r3lab.uni.lu/piotr.gawron/minerva/repository/archive.tar.gz?ref=v%{version}
Requires: tomcat, postgresql
Conflicts: tomcat < 8.0
BuildArch: noarch
%description
......@@ -18,7 +18,10 @@ used and managed via a webbrowser.
%preun -p /bin/bash
if [ $1 == 1 ]; then
# remove old unpacked ("exploded") directory of war file
# version 13.2 and below
rm -rf %{_sharedstatedir}/tomcat/webapps/%{name}
# version 14.0 and upper
rm -rf /opt/tomcat/webapps/%{name}
fi
%install
......@@ -27,15 +30,15 @@ mkdir -p %{buildroot}/%{_datadir}/%{name}
install -m 0644 %{name}.war %{buildroot}/%{_datadir}/%{name}/%{name}.war
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d
install -m 0644 logrotate_minerva %{buildroot}/%{_sysconfdir}/logrotate.d/minerva
mkdir -p %{buildroot}/%{_sharedstatedir}/tomcat/webapps
ln -s %{_datadir}/%{name}/%{name}.war %{buildroot}/%{_sharedstatedir}/tomcat/webapps/
mkdir -p %{buildroot}/opt/tomcat/webapps
ln -s %{_datadir}/%{name}/%{name}.war %{buildroot}/opt/tomcat/webapps/
%files
%defattr(-,root,root,-)
%doc README.md CHANGELOG INSTALL.rst
%{_datadir}/%{name}/%{name}.war
%config(noreplace) %{_sysconfdir}/logrotate.d/minerva
%attr(-,tomcat,tomcat) %{_sharedstatedir}/tomcat/webapps/%{name}.war
%attr(-,tomcat,tomcat) /opt/tomcat/webapps/%{name}.war
%changelog
* __DATE__ - %{version}-%{release}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment