]> git.pld-linux.org Git - packages/cas.git/blob - cas.spec
e76bf6bddc3dd29d058f7340dd26cc9a173297aa
[packages/cas.git] / cas.spec
1 %include        /usr/lib/rpm/macros.java
2 Summary:        JA-SIG Central Authentication Service
3 Name:           cas
4 Version:        3.4.2
5 Release:        3
6 License:        MIT License
7 Group:          Networking/Daemons/Java/Servlets
8 Source0:        http://www.ja-sig.org/downloads/cas/%{name}-server-%{version}-release.tar.gz
9 # Source0-md5:  3a7dfd70be008053b8619509dcc45be9
10 Source1:        %{name}-context.xml
11 URL:            http://www.ja-sig.org/products/cas/
12 BuildRequires:  rpm-javaprov
13 BuildRequires:  rpmbuild(macros) >= 1.546
14 Requires:       jpackage-utils
15 Requires:       tomcat >= 6
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define webappdir %{_datadir}/%{name}
20 %define libdir    %{_datadir}/%{name}/WEB-INF/lib
21 %define logdir    %{_var}/log/%{name}
22
23 %description
24 CAS is an authentication system originally created by Yale University
25 to provide a trusted way for an application to authenticate a user.
26 CAS became a JA-SIG project in December 2004.
27
28 CAS provides enterprise single sign on service. It features:
29
30 - An open and well-documented protocol
31 - An open-source Java server component
32 - A library of clients for Java, .Net, PHP, Perl, Apache, uPortal and
33   others
34 - Integrates with uPortal, BlueSocket, TikiWiki, Mule, Liferay, Moodle
35   and others
36 - Community documentation and implementation support
37 - An extensive community of adopters
38
39 %package authenticator-spnego
40 Summary:        Spnego authenticator for CAS server
41 Group:          Libraries/Java
42 Requires:       %{name} = %{version}-%{release}
43
44 %description authenticator-spnego
45 Spnego authentication backend for CAS Server.
46
47 %package authenticator-x509
48 Summary:        x509 authenticator for CAS server
49 Group:          Libraries/Java
50 Requires:       %{name} = %{version}-%{release}
51
52 %description authenticator-x509
53 X509 client certificates authentication backend for CAS Server.
54
55 %package authenticator-openid
56 Summary:        OpenID authenticator for CAS server
57 Group:          Libraries/Java
58 Requires:       %{name} = %{version}-%{release}
59
60 %description authenticator-openid
61 OpenID authentication backend for CAS Server.
62
63 %package authenticator-legacy
64 Summary:        Legacy authenticator for CAS server
65 Group:          Libraries/Java
66 Requires:       %{name} = %{version}-%{release}
67
68 %description authenticator-legacy
69 Legacy authentication backend for CAS Server.
70
71 %package authenticator-radius
72 Summary:        Radius authenticator for CAS server
73 Group:          Libraries/Java
74 Requires:       %{name} = %{version}-%{release}
75
76 %description authenticator-radius
77 Radius authentication backend for CAS Server.
78
79 %package authenticator-ldap
80 Summary:        LDAP authenticator for CAS server
81 Group:          Libraries/Java
82 Requires:       %{name} = %{version}-%{release}
83
84 %description authenticator-ldap
85 LDAP authentication backend for CAS Server.
86
87 %package authenticator-generic
88 Summary:        Generic authenticator for CAS server
89 Group:          Libraries/Java
90 Requires:       %{name} = %{version}-%{release}
91
92 %description authenticator-generic
93 Generic authentication backend for CAS Server.
94
95 %package authenticator-trusted
96 Summary:        Trusted authenticator for CAS server
97 Group:          Libraries/Java
98 Requires:       %{name} = %{version}-%{release}
99
100 %description authenticator-trusted
101 Trusted authentication backend for CAS Server.
102
103 %package authenticator-jdbc
104 Summary:        JDBC authenticator for CAS server
105 Group:          Libraries/Java
106 Requires:       %{name} = %{version}-%{release}
107
108 %description authenticator-jdbc
109 JDBC authentication backend for CAS Server.
110
111 %package integration-berkeleydb
112 Summary:        Berkeleydb ticket registry for CAS server
113 Group:          Libraries/Java
114 Requires:       %{name} = %{version}-%{release}
115
116 %description integration-berkeleydb
117 BerkeleyDB integration for CAS Server allows to store ticket registry
118 in berkeleyDB.
119
120 %package integration-jboss
121 Summary:        Jboss ticket registry for CAS server
122 Group:          Libraries/Java
123 Requires:       %{name} = %{version}-%{release}
124
125 %description integration-jboss
126 Jboss integration for CAS Server allows to store ticket registry in
127 Jboss internal authentication system.
128
129 %package integration-memcached
130 Summary:        Memory ticket registry for CAS server
131 Group:          Libraries/Java
132 Requires:       %{name} = %{version}-%{release}
133
134 %description integration-memcached
135 Memcached integration for CAS Server allows to store ticket registry
136 in memory cache.
137
138 %package integration-restlet
139 Summary:        I have no idea WTF is that, but it is for CAS server
140 Group:          Libraries/Java
141 Requires:       %{name} = %{version}-%{release}
142
143 %description integration-restlet
144 I really have no idea WTF is that. It name suggests it is yet another
145 registry storage driver for CAS, but it does not extends
146 AbstractDistributedTicketRegistry class.
147
148 %prep
149 %setup -q -n %{name}-server-%{version}
150 unzip modules/%{name}-server-webapp-%{version}.war -d webapp
151
152 sed -i 's,\(name="File" value="\)\([^"]*"\),\1%{logdir}/\2,' webapp/WEB-INF/classes/log4j.xml
153
154 %build
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_datadir},%{_sharedstatedir}/%{name},%{_tomcatconfdir},%{logdir}}
159
160 cp -a webapp $RPM_BUILD_ROOT%{webappdir}
161
162 MODULES="
163   integration-berkeleydb
164   integration-jboss
165   integration-memcached
166   integration-restlet
167   support-generic
168   support-jdbc
169   support-ldap
170   support-legacy
171   support-openid
172   support-radius
173   support-spnego
174   support-trusted
175   support-x509
176 "
177
178 CONFIGFILES="
179   classes/log4j.xml
180   cas.properties
181   deployerConfigContext.xml
182   login-webflow.xml
183   restlet-servlet.xml
184   cas-servlet.xml
185   web.xml
186 "
187
188 for i in $MODULES; do
189   install modules/%{name}-server-$i-%{version}.jar $RPM_BUILD_ROOT%{libdir}/%{name}-$i-%{version}.jar
190 done
191
192 for i in $CONFIGFILES; do
193   mv $RPM_BUILD_ROOT%{webappdir}/WEB-INF/$i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i)
194   ln -s %{_sysconfdir}/%{name}/$(basename $i) $RPM_BUILD_ROOT%{webappdir}/WEB-INF/$i
195 done
196
197 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
198 ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml
199
200 %postun
201 %tomcat_clear_cache %{name}
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %files
207 %defattr(644,root,root,755)
208 %dir %{_sysconfdir}/%{name}
209 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.xml
210 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.properties
211 %{_tomcatconfdir}/%{name}.xml
212 %{_datadir}/%{name}
213 %exclude %{libdir}/%{name}-support-spnego-%{version}.jar
214 %exclude %{libdir}/%{name}-integration-berkeleydb-%{version}.jar
215 %exclude %{libdir}/%{name}-support-x509-%{version}.jar
216 %exclude %{libdir}/%{name}-integration-jboss-%{version}.jar
217 %exclude %{libdir}/%{name}-support-openid-%{version}.jar
218 %exclude %{libdir}/%{name}-support-legacy-%{version}.jar
219 %exclude %{libdir}/%{name}-support-radius-%{version}.jar
220 %exclude %{libdir}/%{name}-integration-memcached-%{version}.jar
221 %exclude %{libdir}/%{name}-integration-restlet-%{version}.jar
222 %exclude %{libdir}/%{name}-support-ldap-%{version}.jar
223 %exclude %{libdir}/%{name}-support-generic-%{version}.jar
224 %exclude %{libdir}/%{name}-support-trusted-%{version}.jar
225 %exclude %{libdir}/%{name}-support-jdbc-%{version}.jar
226 %attr(2775,root,servlet) %dir %{_sharedstatedir}/%{name}
227 %dir %attr(2770,root,servlet) %{logdir}
228
229 %files authenticator-spnego
230 %defattr(644,root,root,755)
231 %{libdir}/%{name}-support-spnego-%{version}.jar
232
233 %files authenticator-x509
234 %defattr(644,root,root,755)
235 %{libdir}/%{name}-support-x509-%{version}.jar
236
237 %files authenticator-openid
238 %defattr(644,root,root,755)
239 %{libdir}/%{name}-support-openid-%{version}.jar
240
241 %files authenticator-legacy
242 %defattr(644,root,root,755)
243 %{libdir}/%{name}-support-legacy-%{version}.jar
244
245 %files authenticator-radius
246 %defattr(644,root,root,755)
247 %{libdir}/%{name}-support-radius-%{version}.jar
248
249 %files authenticator-ldap
250 %defattr(644,root,root,755)
251 %{libdir}/%{name}-support-ldap-%{version}.jar
252
253 %files authenticator-generic
254 %defattr(644,root,root,755)
255 %{libdir}/%{name}-support-generic-%{version}.jar
256
257 %files authenticator-trusted
258 %defattr(644,root,root,755)
259 %{libdir}/%{name}-support-trusted-%{version}.jar
260
261 %files authenticator-jdbc
262 %defattr(644,root,root,755)
263 %{libdir}/%{name}-support-jdbc-%{version}.jar
264
265 %files integration-berkeleydb
266 %defattr(644,root,root,755)
267 %{libdir}/%{name}-integration-berkeleydb-%{version}.jar
268
269 %files integration-jboss
270 %defattr(644,root,root,755)
271 %{libdir}/%{name}-integration-jboss-%{version}.jar
272
273 %files integration-memcached
274 %defattr(644,root,root,755)
275 %{libdir}/%{name}-integration-memcached-%{version}.jar
276
277 %files integration-restlet
278 %defattr(644,root,root,755)
279 %{libdir}/%{name}-integration-restlet-%{version}.jar
This page took 1.121934 seconds and 2 git commands to generate.