minerva.spec.in 1.49 KB
Newer Older
Nils Christian's avatar
Nils Christian committed
1
2
3
4
5
6
7
8
9
Name:           minerva
Version:        __CURRENT_VERSION__
Release:        1%{?dist}
Summary:        Platform for visualization and curation of molecular interaction networks

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}

10
Conflicts:      tomcat < 8.0
Nils Christian's avatar
Nils Christian committed
11
12
13
14
15
16
17
18
19
BuildArch:      noarch

%description
Web application for visualization, exploration and management of
molecular networks encoded in SBGN-compliant format. The resource is
used and managed via a webbrowser.

%preun -p /bin/bash
if [ $1 == 1 ]; then
20
    # remove old unpacked ("exploded") directory of war file
21
    # version 13.2 and below
22
    rm -rf %{_sharedstatedir}/tomcat/webapps/%{name}
23
24
    # version 14.0 and upper
    rm -rf /opt/tomcat/webapps/%{name}
Nils Christian's avatar
Nils Christian committed
25
26
27
28
fi

%install
rm -rf %{buildroot}
29
mkdir -p %{buildroot}/%{_datadir}/%{name}
Nils Christian's avatar
Nils Christian committed
30
31
32
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
33
34
mkdir -p %{buildroot}/opt/tomcat/webapps
ln -s %{_datadir}/%{name}/%{name}.war %{buildroot}/opt/tomcat/webapps/
Nils Christian's avatar
Nils Christian committed
35
36
37
38
39
40

%files
%defattr(-,root,root,-)
%doc README.md CHANGELOG INSTALL.rst
%{_datadir}/%{name}/%{name}.war
%config(noreplace) %{_sysconfdir}/logrotate.d/minerva
41
%attr(-,tomcat,tomcat) /opt/tomcat/webapps/%{name}.war
Nils Christian's avatar
Nils Christian committed
42
43
44
45

%changelog
* __DATE__ - %{version}-%{release}
- Automatically packaged