]> git.pld-linux.org Git - packages/nexus.git/blame - nexus.spec
fix _tomcatconfdir packaging
[packages/nexus.git] / nexus.spec
CommitLineData
1c4941b7 1%include /usr/lib/rpm/macros.java
20a9f565 2Summary: Maven Repository Manager
1c4941b7 3Name: nexus
11162498 4Version: 1.7.0
03866dc3 5Release: 3
1c4941b7 6License: GPL v3
7Group: Networking/Daemons/Java
88500888 8Source0: http://nexus.sonatype.org/downloads/%{name}-webapp-%{version}.war
11162498 9# Source0-md5: 1297a834a9a6a58b62a22b5e008d1f4b
88500888 10Source1: %{name}-context.xml
1c4941b7 11Source2: %{name}-plexus.properties
40727394 12Source3: %{name}-security-configuration.xml
13Source4: %{name}-security.xml
1c4941b7 14URL: http://nexus.sonatype.org/
1c4941b7 15BuildRequires: rpm-javaprov
16BuildRequires: rpmbuild(macros) >= 1.300
1c4941b7 17Requires: jpackage-utils
20a9f565 18Requires: rc-scripts
40727394 19Requires: tomcat
1c4941b7 20BuildArch: noarch
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
20a9f565 24Nexus is a powerful and robust Maven repository manager, created to
25provide reliable access to artifacts required for development and
26provisioning. Maven's central repository has always served as a great
27convenience for users of Maven, but it has always been recommended to
28maintain your own repositories to ensure stability within your
29organization. Nexus greatly simplifies the maintenance of your own
30internal repositories and access to external repositories. With Nexus
31you can completely control access to, and deployment of, every
32artifact in your organization from a single location.
1c4941b7 33
34%prep
35%setup -q -c
36
37%install
38rm -rf $RPM_BUILD_ROOT
1c4941b7 39
03866dc3 40install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,%{_tomcatconfdir},/var/log/nexus,%{_sharedstatedir}/{nexus/conf,tomcat/conf/Catalina/localhost}}
37337335 41install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
42ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml
88500888 43install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/plexus.properties
1c4941b7 44
88500888 45cp -a . $RPM_BUILD_ROOT%{_datadir}/nexus
1c4941b7 46
88500888 47mv $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml
5f3f0553 48ln -sf %{_sysconfdir}/nexus/web.xml $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml
49ln -sf %{_sysconfdir}/nexus/plexus.properties $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/plexus.properties
b246ee67 50
51# These files are configs, but they should be created by nexus. So lets
52# install them as %%ghost %%config, and link to /etc/nexus
53touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/log4j.properties
54touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/nexus.xml
b246ee67 55touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/lvo-plugin.xml
56ln -sf %{_sharedstatedir}/nexus/conf/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/nexus/log4j.properties
57ln -sf %{_sharedstatedir}/nexus/conf/nexus.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/nexus.xml
b246ee67 58ln -sf %{_sharedstatedir}/nexus/conf/lvo-plugin.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/lvo-plugin.xml
59
40727394 60install %{SOURCE3} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security-configuration.xml
61install %{SOURCE4} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security.xml
62ln -sf %{_sharedstatedir}/nexus/conf/security-configuration.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security-configuration.xml
63ln -sf %{_sharedstatedir}/nexus/conf/security.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security.xml
64
b246ee67 65# log directory
66ln -s /var/log/nexus $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/logs
1c4941b7 67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
73
88500888 74%attr(770,root,servlet) %{_datadir}/nexus
b246ee67 75%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus
76%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/logs
77%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/conf
5f3f0553 78%attr(770,root,servlet) /var/log/nexus
1c4941b7 79
88500888 80%dir %{_sysconfdir}/nexus
5f3f0553 81%attr(644,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/plexus.properties
88500888 82%attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/web.xml
37337335 83%attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/tomcat-context.xml
03866dc3 84%{_tomcatconfdir}/nexus.xml
b246ee67 85
40727394 86# These file must be writeable, that is why it goes to /var
a95c0dfe 87%attr(640,tomcat,tomcat) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security-configuration.xml
88%attr(640,tomcat,tomcat) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security.xml
40727394 89%{_sysconfdir}/nexus/security-configuration.xml
90%{_sysconfdir}/nexus/security.xml
91
b246ee67 92# These files are created by nexus, but they are config files.
93%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/log4j.properties
94%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/nexus.xml
b246ee67 95%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/lvo-plugin.xml
96%{_sysconfdir}/nexus/log4j.properties
97%{_sysconfdir}/nexus/nexus.xml
b246ee67 98%{_sysconfdir}/nexus/lvo-plugin.xml
This page took 0.059627 seconds and 4 git commands to generate.