Fix RPM field seperator
[cascardo/ipsilon.git] / contrib / fedora / ipsilon.spec
1 # Bundling request for bootstrap/patternfly: https://fedorahosted.org/fpc/ticket/483
2
3 Name:       ipsilon
4 Version:    0.3.0
5 Release:    6%{?dist}
6 Summary:    An Identity Provider Server
7
8 Group:      System Environment/Base
9 License:    GPLv3+
10 URL:        https://fedorahosted.org/ipsilon/
11 Source0:    https://fedorahosted.org/released/ipsilon/ipsilon-%{version}.tar.gz
12 BuildArch:  noarch
13
14
15 BuildRequires:  python2-devel
16 BuildRequires:  python-setuptools
17 BuildRequires:  lasso-python
18 BuildRequires:  python-openid, python-openid-cla, python-openid-teams
19 BuildRequires:  m2crypto
20 Requires:       httpd
21 Requires:       mod_ssl
22 Requires:       ipsilon-tools = %{version}-%{release}
23 Requires:       ipsilon-provider = %{version}-%{release}
24 Requires:       mod_wsgi
25 Requires:       mod_intercept_form_submit
26 Requires:       python-cherrypy
27 Requires:       python-jinja2
28 Requires:       python-lxml
29 Requires:       python-sqlalchemy
30 Requires:       open-sans-fonts
31 Requires(pre):  shadow-utils
32 Requires(post): %_sbindir/semanage, %_sbindir/restorecon
33 Requires(postun): %_sbindir/semanage
34
35 %description
36 Ipsilon is a multi-protocol Identiy Provider service. Its function is to
37 bridge authentication providers and applications to achieve Single Sign On
38 and Federation.
39
40
41 %package tools
42 Summary:        Client tools for the Ipsilon IDP
43 Group:          System Environment/Base
44 License:        GPLv3+
45 Requires:       python-requests
46 Requires:       python-lxml
47 Requires:       lasso-python
48 Requires:       mod_auth_mellon
49 BuildArch:      noarch
50
51 %description tools
52 Convenience client install tools for the Ipsilon identity Provider
53
54
55 %package tools-ipa
56 summary:        IPA helpers
57 Group:          System Environment/Base
58 License:        GPLv3+
59 Requires:       %{name}-tools = %{version}-%{release}
60 %if 0%{?rhel}
61 Requires:       ipa-client
62 Requires:       ipa-admintools
63 %else
64 Requires:       freeipa-client
65 Requires:       freeipa-admintools
66 %endif
67 BuildArch:      noarch
68
69 %description tools-ipa
70 Convenience client install tools for IPA support in the Ipsilon identity Provider
71
72
73 %package saml2
74 Summary:        SAML2 provider plugin
75 Group:          System Environment/Base
76 License:        GPLv3+
77 Provides:       ipsilon-provider = %{version}-%{release}
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       lasso-python
80 BuildArch:      noarch
81
82 %description saml2
83 Provides a SAML2 provider plugin for the Ipsilon identity Provider
84
85
86 %package openid
87 Summary:        Openid provider plugin
88 Group:          System Environment/Base
89 License:        GPLv3+
90 Provides:       ipsilon-provider = %{version}-%{release}
91 Requires:       %{name} = %{version}-%{release}
92 Requires:       python-openid
93 Requires:       python-openid-cla
94 Requires:       python-openid-teams
95 BuildArch:      noarch
96
97 %description openid
98 Provides an OpenId provider plugin for the Ipsilon identity Provider
99
100
101 %package persona
102 Summary:        Persona provider plugin
103 Group:          System Environment/Base
104 License:        GPLv3+
105 Provides:       ipsilon-provider = %{version}-%{release}
106 Requires:       %{name} = %{version}-%{release}
107 Requires:       m2crypto
108 BuildArch:      noarch
109
110 %description persona
111 Provides a Persona provider plugin for the Ipsilon identity Provider
112
113
114 %package authfas
115 Summary:        Fedora Authentication System login plugin
116 Group:          System Environment/Base
117 License:        GPLv3+
118 Requires:       %{name} = %{version}-%{release}
119 Requires:       python-fedora
120 BuildArch:      noarch
121
122 %description authfas
123 Provides a login plugin to authenticate against the Fedora Authentication System
124
125
126 %package authpam
127 Summary:        PAM based login plugin
128 Group:          System Environment/Base
129 License:        GPLv3+
130 Requires:       %{name} = %{version}-%{release}
131 Requires:       python-pam
132 BuildArch:      noarch
133
134 %description authpam
135 Provides a login plugin to authenticate against the local PAM stack
136
137
138 %package authkrb
139 Summary:        mod_auth_kerb based login plugin
140 Group:          System Environment/Base
141 License:        GPLv3+
142 Requires:       %{name} = %{version}-%{release}
143 Requires:       mod_auth_kerb
144 BuildArch:      noarch
145
146 %description authkrb
147 Provides a login plugin to allow authentication via the mod_auth_kerb Apache
148 module.
149
150
151 %package authldap
152 Summary:        mod_auth_kerb based login plugin
153 Group:          System Environment/Base
154 License:        GPLv3+
155 Requires:       %{name} = %{version}-%{release}
156 Requires:       python-ldap
157 BuildArch:      noarch
158
159 %description authldap
160 Provides a login plugin to allow authentication and info retrieval via LDAP.
161
162 %package infosssd
163 Summary:        SSSD & mod_lookup_identity-based identity plugin
164 Group:          System Environment/Base
165 License:        GPLv3+
166 Requires:       %{name} = %{version}-%{release}
167 Requires:       mod_lookup_identity
168 Requires:       libsss_simpleifp
169 Requires:       sssd >= 1.12.4
170 BuildArch:      noarch
171
172 %description infosssd
173 Provides an info plugin to allow retrieval via mod_lookup_identity and
174 SSSD.
175
176 %prep
177 %setup -q
178
179
180 %build
181 CFLAGS="%{optflags}" %{__python} setup.py build
182
183
184 %install
185 %{__python} setup.py install --skip-build --root %{buildroot}
186 mkdir -p %{buildroot}%{_sbindir}
187 mkdir -p %{buildroot}%{_defaultdocdir}
188 # These 0700 permissions are because ipsilon will store private keys here
189 install -d -m 0700 %{buildroot}%{_sharedstatedir}/ipsilon
190 install -d -m 0700 %{buildroot}%{_sysconfdir}/ipsilon
191 mv %{buildroot}/%{_bindir}/ipsilon %{buildroot}/%{_sbindir}
192 mv %{buildroot}/%{_bindir}/ipsilon-server-install %{buildroot}/%{_sbindir}
193 mv %{buildroot}%{_defaultdocdir}/%{name} %{buildroot}%{_defaultdocdir}/%{name}-%{version}
194 rm -fr %{buildroot}%{python2_sitelib}/tests
195 ln -s %{_datadir}/fonts %{buildroot}%{_datadir}/ipsilon/ui/fonts
196
197 #%check
198 # The test suite is not being run because:
199 #  1. The last step of %%install removes the entire test suite
200 #  2. It increases build time a lot
201 #  3. It adds more build dependencies (namely postgresql server and client libraries)
202
203 %pre
204 getent group ipsilon >/dev/null || groupadd -r ipsilon
205 getent passwd ipsilon >/dev/null || \
206     useradd -r -g ipsilon -d %{_sharedstatedir}/ipsilon -s /sbin/nologin \
207     -c "Ipsilon Server" ipsilon
208 exit 0
209
210 %post
211 semanage fcontext -a -t httpd_var_lib_t '%{_sharedstatedir}/ipsilon(/.*)?' || :
212 semanage fcontext -a -t var_lib_t '%{_sharedstatedir}/ipsilon(/.*)/*.conf' || :
213 restorecon -R %{_sharedstatedir}/ipsilon || :
214
215 %postun
216 # Clean up after package removal
217 if [ $1 -eq 0 ]; then
218     semanage fcontext -d -t var_lib_t '%{_sharedstatedir}/ipsilon(/.*)/*.conf' || :
219     semanage fcontext -d -t httpd_var_lib_t '%{_sharedstatedir}/ipsilon(/.*)?' || :
220 fi
221
222
223 %files
224 %{_defaultdocdir}/%{name}-%{version}
225 %{python2_sitelib}/ipsilon-*.egg-info
226 %dir %{python2_sitelib}/ipsilon
227 %{python2_sitelib}/ipsilon/admin
228 %dir %{python2_sitelib}/ipsilon/login
229 %{python2_sitelib}/ipsilon/login/__init__*
230 %{python2_sitelib}/ipsilon/login/common*
231 %{python2_sitelib}/ipsilon/login/authform*
232 %{python2_sitelib}/ipsilon/login/authtest*
233 %dir %{python2_sitelib}/ipsilon/info
234 %{python2_sitelib}/ipsilon/info/__init__*
235 %{python2_sitelib}/ipsilon/info/common*
236 %{python2_sitelib}/ipsilon/info/nss*
237 %dir %{python2_sitelib}/ipsilon/providers
238 %{python2_sitelib}/ipsilon/providers/__init__*
239 %{python2_sitelib}/ipsilon/providers/common*
240 %{python2_sitelib}/ipsilon/root.py*
241 %{python2_sitelib}/ipsilon/util
242 %{_mandir}/man*/ipsilon*
243 %dir %{_datadir}/ipsilon
244 %dir %{_datadir}/ipsilon/templates
245 %{_datadir}/ipsilon/templates/*.html
246 %{_datadir}/ipsilon/templates/admin
247 %dir %{_datadir}/ipsilon/templates/login
248 %{_datadir}/ipsilon/templates/login/index.html
249 %{_datadir}/ipsilon/templates/login/form.html
250 %dir %{_datadir}/ipsilon/templates/install
251 %{_datadir}/ipsilon/templates/install/*.conf
252 %dir %{_datadir}/ipsilon/ui
253 %{_datadir}/ipsilon/ui/css
254 %{_datadir}/ipsilon/ui/img
255 %{_datadir}/ipsilon/ui/js
256 %{_datadir}/ipsilon/ui/fonts
257 %{_sbindir}/ipsilon
258 %{_sbindir}/ipsilon-server-install
259 %dir %attr(0700,ipsilon,ipsilon) %{_sharedstatedir}/ipsilon
260 %dir %attr(0700,ipsilon,ipsilon) %{_sysconfdir}/ipsilon
261
262 %files tools
263 %doc COPYING README
264 %{python2_sitelib}/ipsilon-*.egg-info
265 %{python2_sitelib}/ipsilon/__init__.py*
266 %{python2_sitelib}/ipsilon/tools
267 %dir %{python2_sitelib}/ipsilon/helpers
268 %{python2_sitelib}/ipsilon/helpers/common.py*
269 %{python2_sitelib}/ipsilon/helpers/__init__.py*
270 %{_datadir}/ipsilon/templates/install/saml2
271 %{_datadir}/ipsilon/ui/saml2sp
272 %{_bindir}/ipsilon-client-install
273
274 %files tools-ipa
275 %{python2_sitelib}/ipsilon/helpers/ipa.py*
276
277 %files saml2
278 %{python2_sitelib}/ipsilon/providers/saml2*
279 %{_datadir}/ipsilon/templates/saml2
280
281 %files openid
282 %{python2_sitelib}/ipsilon/providers/openid*
283 %{_datadir}/ipsilon/templates/openid
284
285 %files persona
286 %{python2_sitelib}/ipsilon/providers/persona*
287 %{_datadir}/ipsilon/templates/persona
288
289 %files authfas
290 %{python2_sitelib}/ipsilon/login/authfas*
291
292 %files authpam
293 %{python2_sitelib}/ipsilon/login/authpam*
294
295 %files authkrb
296 %{python2_sitelib}/ipsilon/login/authkrb*
297 %{_datadir}/ipsilon/templates/login/krb.html
298
299 %files authldap
300 %{python2_sitelib}/ipsilon/login/authldap*
301 %{python2_sitelib}/ipsilon/info/infoldap*
302
303 %files infosssd
304 %{python2_sitelib}/ipsilon/info/infosssd.*
305
306 %changelog
307 * Thu Feb 12 2015 Rob Crittenden <rcritten@redhat.com> - 0.3.0-6
308 - Add mod_identity_lookup info plugin package
309
310 * Wed Jan 28 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-5
311 - Split IPA tools
312
313 * Mon Jan 12 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-4
314 - Add symlink to fonts directory
315
316 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-3
317 - Fix typo
318 - Add comments on why the test suite is not in check
319 - The subpackages require the base package
320 - Add link to FPC ticket for bundling exception request
321
322 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-2
323 - Fix shebang removal
324
325 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-1
326 - Initial packaging