]>
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. | |
11 | ||
12 | %if 0 | |
13 | # Download sources manually: | |
14 | wget -c http://downloads.atlassian.com/software/crowd/downloads/atlassian-crowd-2.0.4-war.zip | |
15 | wget -c http://www.atlassian.com/about/licensing/Atlassian_EULA_3.0.pdf | |
5b9822ee | 16 | wget -c http://repository.atlassian.com/org.apache.felix/jars/org.apache.felix.main-2.0.5.jar |
16d5893e | 17 | %endif |
18 | ||
19 | %include /usr/lib/rpm/macros.java | |
20 | ||
21 | Summary: SSO server | |
22 | Name: crowd | |
23 | Version: 2.0.4 | |
24 | Release: 0.1 | |
25 | License: Proprietary, not distributable | |
26 | Group: Networking/Daemons/Java/Servlets | |
27 | Source0: atlassian-%{name}-%{version}-war.zip | |
28 | # NoSource0-md5: be0c6d073297fb040c5c29550463252b | |
29 | NoSource: 0 | |
30 | Source1: Atlassian_EULA_3.0.pdf | |
31 | # NoSource1-md5: 9e87088024e3c5ee2e63a72a3e99a6cb | |
32 | NoSource: 1 | |
33 | Source2: tomcat-context.xml | |
34 | Source3: %{name}-init.properties | |
5b9822ee | 35 | Source4: org.apache.felix.main-2.0.5.jar |
36 | # NoSource4-md5: edfbdb9fd59aeb21022391e2934f75c0 | |
37 | NoSource: 4 | |
16d5893e | 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 | ||
5b9822ee | 61 | # http://confluence.atlassian.com/pages/viewpage.action?pageId=208962752 |
62 | find -name 'org.apache.felix.main*.jar' | xargs rm | |
63 | cp %{SOURCE4} WEB-INF/lib | |
64 | ||
16d5893e | 65 | # TODO set paths for logs |
66 | # sed -i 's,^\(log4j\.appender\.[a-z]*\.File\)=\(.*\)$,\1=/var/log/crowd/\2,' webapp/WEB-INF/classes/log4j.properties | |
67 | ||
68 | %build | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} | |
73 | cp -a console index.jsp META-INF template WEB-INF $RPM_BUILD_ROOT%{_datadir}/%{name} | |
74 | ||
75 | # configuration | |
76 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_sharedstatedir}/tomcat/conf/Catalina/localhost} | |
77 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml | |
78 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/crowd-init.properties | |
79 | ln -s %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml | |
80 | mv $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/crowd/log4j.properties | |
81 | ln -sf %{_sysconfdir}/crowd/log4j.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/log4j.properties | |
82 | ln -sf %{_sysconfdir}/crowd/crowd-init.properties $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/classes/crowd-initlog4j.properties | |
83 | ||
c554403b | 84 | # additional libs |
85 | ln -s %{_datadir}/java/jta.jar $RPM_BUILD_ROOT%{_datadir}/crowd/WEB-INF/lib/jta.jar | |
86 | ||
16d5893e | 87 | install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name},/var/log/%{name}} |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
94 | %doc licenses Atlassian_EULA_3.0.pdf | |
95 | %{_datadir}/%{name} | |
96 | %dir %attr(750,root,tomcat) %{_sysconfdir}/%{name} | |
97 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,tomcat) %{_sysconfdir}/%{name}/* | |
98 | %{_sharedstatedir}/tomcat/conf/Catalina/localhost/%{name}.xml | |
99 | %attr(2775,root,servlet) %dir %{_sharedstatedir}/%{name} | |
100 | %attr(2775,root,servlet) %dir /var/log/%{name} |