]>
Commit | Line | Data |
---|---|---|
2b3456a3 | 1 | # TODO: |
2 | # - ask atlassian for permission to redistribute it. | |
3 | %include /usr/lib/rpm/macros.java | |
4 | Summary: Confluence - Enterprise wiki | |
5 | Name: confluence | |
6 | Version: 2.10.3 | |
7 | Release: 0.1 | |
8 | License: Proprietary, not distributable | |
9 | Group: Networking/Daemons/Java/Servlets | |
10 | # You can download it from: | |
11 | # http://www.atlassian.com/software/confluence/downloads/binary/confluence-2.10.3.tar.gz | |
12 | Source0: %{name}-%{version}.tar.gz | |
13 | # NoSource0-md5: 40e613c4be7cbc91613ef143275564d8 | |
14 | NoSource: 0 | |
15 | Source1: %{name}-context.xml | |
16 | Source2: %{name}-init.properties | |
17 | Source3: %{name}-README.PLD | |
18 | URL: http://www.atlassian.com/software/confluence/ | |
19 | BuildRequires: jpackage-utils | |
20 | BuildRequires: rpm-javaprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.300 | |
22 | Requires: jpackage-utils | |
23 | Requires: tomcat | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | Confluence is a simple, powerful wiki that lets you create and share pages, | |
29 | documents and rich content with your team. | |
30 | ||
31 | If you're looking for a better way to collaborate or a replacement for an | |
32 | open-source wiki, Confluence has the essential enterprise features for your | |
33 | organisation. | |
34 | ||
35 | %prep | |
36 | %setup -q | |
37 | ||
38 | cp %{SOURCE3} README.PLD | |
39 | ||
40 | %build | |
41 | CLASSPATH=$(build-classpath-directory lib/endorsed) | |
42 | %ant | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT{%{_datadir},/var/log/%{name}} | |
47 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/%{name} | |
48 | cp -a tmp/build/war $RPM_BUILD_ROOT%{_datadir}/%{name} | |
49 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{name}/WEB-INF/classes/confluence-init.properties | |
50 | ||
51 | # configuration | |
52 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/confluence,%{_sharedstatedir}/tomcat/conf/Catalina/localhost} | |
53 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/confluence.xml | |
54 | ||
55 | ln -s %{_sharedstatedir}/tomcat/conf/Catalina/localhost/confluence.xml $RPM_BUILD_ROOT%{_sysconfdir}/confluence/tomcat-context.xml | |
56 | ||
57 | mv $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/confluence/log4j.properties | |
58 | ln -s %{_sysconfdir}/confluence/log4j.properties $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/log4j.properties | |
59 | ||
60 | mv $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/confluence-init.properties $RPM_BUILD_ROOT%{_sysconfdir}/confluence/confluence-init.properties | |
61 | ln -s %{_sysconfdir}/confluence/confluence-init.properties $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/confluence-init.properties | |
62 | ||
63 | mv $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/atlassian-user.xml $RPM_BUILD_ROOT%{_sysconfdir}/confluence/atlassian-user.xml | |
64 | ln -s %{_sysconfdir}/confluence/atlassian-user.xml $RPM_BUILD_ROOT%{_datadir}/confluence/WEB-INF/classes/atlassian-user.xml | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | # do not make this file writeable by tomcat. We do not want to allow user to | |
72 | # undeploy this app via tomcat manager. | |
73 | %{_datadir}/confluence | |
74 | %dir %{_sysconfdir}/confluence | |
75 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/confluence/log4j.properties | |
76 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/confluence/confluence-init.properties | |
77 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/confluence/atlassian-user.xml | |
78 | %{_sysconfdir}/confluence/tomcat-context.xml | |
79 | %config(noreplace) %verify(not md5 mtime size) %attr(2775,root,tomcat) %{_sharedstatedir}/tomcat/conf/Catalina/localhost/confluence.xml | |
80 | %attr(2775,root,servlet) %dir %{_sharedstatedir}/confluence | |
81 | %attr(2775,root,servlet) %dir /var/log/confluence | |
82 | %doc README.PLD |