]>
Commit | Line | Data |
---|---|---|
1c4941b7 | 1 | %include /usr/lib/rpm/macros.java |
20a9f565 | 2 | Summary: Maven Repository Manager |
1c4941b7 | 3 | Name: nexus |
11162498 | 4 | Version: 1.7.0 |
03866dc3 | 5 | Release: 3 |
1c4941b7 | 6 | License: GPL v3 |
7 | Group: Networking/Daemons/Java | |
88500888 | 8 | Source0: http://nexus.sonatype.org/downloads/%{name}-webapp-%{version}.war |
11162498 | 9 | # Source0-md5: 1297a834a9a6a58b62a22b5e008d1f4b |
88500888 | 10 | Source1: %{name}-context.xml |
1c4941b7 | 11 | Source2: %{name}-plexus.properties |
40727394 | 12 | Source3: %{name}-security-configuration.xml |
13 | Source4: %{name}-security.xml | |
1c4941b7 | 14 | URL: http://nexus.sonatype.org/ |
1c4941b7 | 15 | BuildRequires: rpm-javaprov |
16 | BuildRequires: rpmbuild(macros) >= 1.300 | |
1c4941b7 | 17 | Requires: jpackage-utils |
20a9f565 | 18 | Requires: rc-scripts |
40727394 | 19 | Requires: tomcat |
1c4941b7 | 20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
20a9f565 | 24 | Nexus is a powerful and robust Maven repository manager, created to |
25 | provide reliable access to artifacts required for development and | |
26 | provisioning. Maven's central repository has always served as a great | |
27 | convenience for users of Maven, but it has always been recommended to | |
28 | maintain your own repositories to ensure stability within your | |
29 | organization. Nexus greatly simplifies the maintenance of your own | |
30 | internal repositories and access to external repositories. With Nexus | |
31 | you can completely control access to, and deployment of, every | |
32 | artifact in your organization from a single location. | |
1c4941b7 | 33 | |
34 | %prep | |
35 | %setup -q -c | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
1c4941b7 | 39 | |
03866dc3 | 40 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,%{_tomcatconfdir},/var/log/nexus,%{_sharedstatedir}/{nexus/conf,tomcat/conf/Catalina/localhost}} |
37337335 | 41 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml |
42 | ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml | |
88500888 | 43 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/plexus.properties |
1c4941b7 | 44 | |
88500888 | 45 | cp -a . $RPM_BUILD_ROOT%{_datadir}/nexus |
1c4941b7 | 46 | |
88500888 | 47 | mv $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml |
5f3f0553 | 48 | ln -sf %{_sysconfdir}/nexus/web.xml $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml |
49 | ln -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 | |
53 | touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/log4j.properties | |
54 | touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/nexus.xml | |
b246ee67 | 55 | touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/lvo-plugin.xml |
56 | ln -sf %{_sharedstatedir}/nexus/conf/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/nexus/log4j.properties | |
57 | ln -sf %{_sharedstatedir}/nexus/conf/nexus.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/nexus.xml | |
b246ee67 | 58 | ln -sf %{_sharedstatedir}/nexus/conf/lvo-plugin.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/lvo-plugin.xml |
59 | ||
40727394 | 60 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security-configuration.xml |
61 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security.xml | |
62 | ln -sf %{_sharedstatedir}/nexus/conf/security-configuration.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security-configuration.xml | |
63 | ln -sf %{_sharedstatedir}/nexus/conf/security.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security.xml | |
64 | ||
b246ee67 | 65 | # log directory |
66 | ln -s /var/log/nexus $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/logs | |
1c4941b7 | 67 | |
68 | %clean | |
69 | rm -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 |