]> git.pld-linux.org Git - packages/nexus.git/blob - nexus.spec
- up to 1.5.0
[packages/nexus.git] / nexus.spec
1
2 %include        /usr/lib/rpm/macros.java
3 Summary:        Maven Repository Manager
4 Name:           nexus
5 Version:        1.5.0
6 Release:        1
7 License:        GPL v3
8 Group:          Networking/Daemons/Java
9 Source0:        http://nexus.sonatype.org/downloads/%{name}-webapp-%{version}.war
10 # Source0-md5:  bcf59d3a8ab3bd598293473798a89352
11 Source1:        %{name}-context.xml
12 Source2:        %{name}-plexus.properties
13 URL:            http://nexus.sonatype.org/
14 BuildRequires:  jpackage-utils
15 BuildRequires:  rpm-javaprov
16 BuildRequires:  rpmbuild(macros) >= 1.300
17 Requires:       group(servlet)
18 Requires:       jpackage-utils
19 Requires:       rc-scripts
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
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.
33
34 %prep
35 %setup -q -c
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39
40 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,/var/log/nexus,%{_sharedstatedir}/{nexus/conf,tomcat/conf/Catalina/localhost}}
41 install %{SOURCE1} $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/nexus.xml
42 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/plexus.properties
43
44 cp -a . $RPM_BUILD_ROOT%{_datadir}/nexus
45
46 mv $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml
47 ln -sf %{_sysconfdir}/nexus/web.xml $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml
48 ln -sf %{_sysconfdir}/nexus/plexus.properties $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/plexus.properties
49
50 # These files are configs, but they should be created by nexus. So lets
51 # install them as %%ghost %%config, and link to /etc/nexus
52 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/log4j.properties
53 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/nexus.xml
54 touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security.xml
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
58 ln -sf %{_sharedstatedir}/nexus/conf/security.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security.xml
59 ln -sf %{_sharedstatedir}/nexus/conf/lvo-plugin.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/lvo-plugin.xml
60
61 # log directory
62 ln -s /var/log/nexus $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/logs
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %files
68 %defattr(644,root,root,755)
69
70 %attr(770,root,servlet) %{_datadir}/nexus
71 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus
72 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/logs
73 %dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/conf
74 %attr(770,root,servlet) /var/log/nexus
75
76 %dir %{_sysconfdir}/nexus
77 %attr(644,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/plexus.properties
78 %attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/web.xml
79 %attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/tomcat/conf/Catalina/localhost/nexus.xml
80
81 # These files are created by nexus, but they are config files.
82 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/log4j.properties
83 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/nexus.xml
84 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security.xml
85 %ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/lvo-plugin.xml
86 %{_sysconfdir}/nexus/log4j.properties
87 %{_sysconfdir}/nexus/nexus.xml
88 %{_sysconfdir}/nexus/security.xml
89 %{_sysconfdir}/nexus/lvo-plugin.xml
This page took 0.100803 seconds and 3 git commands to generate.