]>
Commit | Line | Data |
---|---|---|
16d5893e | 1 | # NOTE: |
2 | # Do not remove NoSource tags. Make sure DistFiles won't fetch Crowd sources. | |
3 | # | |
4 | # Todd Revolt from Atlassian told that: | |
5 | # * We are free to integrate Atlassian products into PLD. So we can write | |
6 | # installer scripts, create nosrc packages etc. | |
7 | # * We are not permitted to redistribute their products. That mean during | |
8 | # installation each user has to download Crowd from atlassian web page. | |
9 | # | |
10 | # See Atlassian_EULA_3.0.pdf for more details. | |
7c239676 | 11 | # |
12 | # Don't install it on same tomcat with confluence. It will break confluence. | |
13 | # See http://confluence.atlassian.com/pages/viewpage.action?pageId=208962752 | |
14 | # for details. This workaround wn't work, because feilx' version required by | |
15 | # confluence is to recent for crowd. | |
16d5893e | 16 | |
17 | %if 0 | |
18 | # Download sources manually: | |
19 | wget -c http://downloads.atlassian.com/software/crowd/downloads/atlassian-crowd-2.0.4-war.zip | |
20 | wget -c http://www.atlassian.com/about/licensing/Atlassian_EULA_3.0.pdf | |
21 | %endif | |
22 | ||
16d5893e | 23 | |
24 | Summary: SSO server | |
25 | Name: crowd | |
26 | Version: 2.0.4 | |
7c239676 | 27 | Release: 1 |
16d5893e | 28 | License: Proprietary, not distributable |
29 | Group: Networking/Daemons/Java/Servlets | |
30 | Source0: atlassian-%{name}-%{version}-war.zip | |
31 | # NoSource0-md5: be0c6d073297fb040c5c29550463252b | |
32 | NoSource: 0 | |
33 | Source1: Atlassian_EULA_3.0.pdf | |
34 | # NoSource1-md5: 9e87088024e3c5ee2e63a72a3e99a6cb | |
35 | NoSource: 1 | |
36 | Source2: tomcat-context.xml | |
37 | Source3: %{name}-init.properties | |
38 | URL: http://www.atlassian.com/software/crowd/default.jsp | |
39 | BuildRequires: jpackage-utils | |
40 | BuildRequires: rpm-javaprov | |
41 | BuildRequires: rpmbuild(macros) >= 1.300 | |
42 | BuildRequires: unzip | |
c554403b | 43 | Requires: java-jta |
16d5893e | 44 | # According to crowd documentation, jre is not enough. |
45 | Requires: jdk | |
46 | Requires: jpackage-utils | |
47 | Requires: tomcat >= 0:6.0.20-4 | |
48 | BuildArch: noarch | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %description | |
52 | Crowd is a single sign-on (SSO) application for as many users, web | |
53 | applications and directory servers you need — all through a single web | |
54 | interface. | |
55 | ||
56 | %prep | |
57 | %setup -q -c | |
58 | ||
59 | cp %{SOURCE1} . | |
60 | ||
61 | # TODO set paths for logs | |
62 | # sed -i 's,^\(log4j\.appender\.[a-z]*\.File\)=\(.*\)$,\1=/var/log/crowd/\2,' webapp/WEB-INF/classes/log4j.properties | |
63 | ||
64 | %build | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} | |
69 | cp -a console index.jsp META-INF template WEB-INF $RPM_BUILD_ROOT%{_datadir}/%{name} | |
70 | ||
71 | # configuration | |
72 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_sharedstatedir}/tomcat/conf/Catalina/localhost} | |
73 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml | |
74 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/crowd-init.properties | |
75 | ln -s %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml | |
76 | mv $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/crowd/log4j.properties | |
77 | ln -sf %{_sysconfdir}/crowd/log4j.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties | |
89e99548 | 78 | ln -sf %{_sysconfdir}/crowd/crowd-init.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/crowd-init.properties |
16d5893e | 79 | |
c554403b | 80 | # additional libs |
81 | ln -s %{_datadir}/java/jta.jar $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/lib/jta.jar | |
82 | ||
16d5893e | 83 | install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name},/var/log/%{name}} |
84 | ||
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc licenses Atlassian_EULA_3.0.pdf | |
91 | %{_datadir}/%{name} | |
92 | %dir %attr(750,root,tomcat) %{_sysconfdir}/%{name} | |
93 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,tomcat) %{_sysconfdir}/%{name}/* | |
94 | %{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml | |
95 | %attr(2775,root,servlet) %dir %{_sharedstatedir}/%{name} | |
96 | %attr(2775,root,servlet) %dir /var/log/%{name} |