]>
Commit | Line | Data |
---|---|---|
5bc7eedd ER |
1 | # |
2 | # TODO | |
3 | # - fix tests (some linkage errors) | |
37a9d0b9 | 4 | # |
5bc7eedd | 5 | # Conditional build: |
37a9d0b9 | 6 | %bcond_with wsf # experimental ID-WSF support |
5bc7eedd | 7 | %bcond_with tests # build tests |
fa658600 | 8 | %bcond_with java # Java bindings |
e465547e | 9 | %bcond_with php # PHP 5 bindings (not ready for PHP 7) |
5bc7eedd | 10 | %bcond_without perl # Perl bindings |
fa658600 | 11 | %bcond_without python # Python 3.x bindings |
37a9d0b9 | 12 | %bcond_without static_libs # static library |
5bc7eedd | 13 | |
826fd2f0 ER |
14 | %if "%{?php_suffix}" == "" |
15 | %define php_suffix 55 | |
16 | %endif | |
17 | %define php_name php%{?php_suffix} | |
5bc7eedd | 18 | Summary: Liberty Alliance Single Sign On |
b5de55ad | 19 | Summary(pl.UTF-8): Implementacja Liberty Alliance Single Sign On |
5bc7eedd | 20 | Name: lasso |
fa658600 | 21 | Version: 2.7.0 |
f3bb22dd | 22 | Release: 3 |
5bc7eedd ER |
23 | License: GPL v2+ |
24 | Group: Libraries | |
f774a5f6 | 25 | Source0: https://dev.entrouvert.org/lasso/%{name}-%{version}.tar.gz |
fa658600 | 26 | # Source0-md5: 8262e05f7844aea6b32239bff6ddd6b9 |
5bc7eedd | 27 | URL: http://lasso.entrouvert.org/ |
37a9d0b9 JB |
28 | BuildRequires: autoconf >= 2.53 |
29 | BuildRequires: automake >= 1:1.11 | |
30 | %{?with_tests:BuildRequires: check-devel} | |
f774a5f6 | 31 | %{?with_wsf:BuildRequires: cyrus-sasl-devel >= 2} |
37a9d0b9 JB |
32 | BuildRequires: glib2-devel >= 1:2.17.0 |
33 | BuildRequires: gtk-doc >= 1.9 | |
5bc7eedd | 34 | BuildRequires: libtool |
37a9d0b9 JB |
35 | BuildRequires: libxml2-devel >= 2.0 |
36 | BuildRequires: libxslt-devel | |
5bc7eedd | 37 | BuildRequires: openssl-devel |
d90bb338 | 38 | BuildRequires: pkgconfig |
5bc7eedd | 39 | BuildRequires: rpmbuild(macros) >= 1.315 |
37a9d0b9 JB |
40 | BuildRequires: xmlsec1-devel >= 1.2.6 |
41 | BuildRequires: xmlsec1-openssl-devel >= 1.2.6 | |
42 | BuildRequires: zlib-devel | |
5bc7eedd ER |
43 | %if %{with php} |
44 | BuildRequires: expat-devel | |
826fd2f0 | 45 | BuildRequires: %{php_name}-devel >= 5 |
fa658600 | 46 | BuildRequires: python3 |
5bc7eedd ER |
47 | %endif |
48 | %if %{with perl} | |
37a9d0b9 JB |
49 | BuildRequires: perl-ExtUtils-MakeMaker |
50 | BuildRequires: perl-Test-Simple | |
5bc7eedd ER |
51 | %endif |
52 | %if %{with java} | |
f774a5f6 | 53 | BuildRequires: jdk >= 1.4 |
d90bb338 | 54 | BuildRequires: rpm-javaprov |
5bc7eedd ER |
55 | %endif |
56 | %if %{with python} | |
fa658600 JR |
57 | BuildRequires: python3-devel |
58 | BuildRequires: python3-lxml | |
d90bb338 | 59 | BuildRequires: rpm-pythonprov |
5bc7eedd | 60 | %endif |
37a9d0b9 JB |
61 | Requires: glib2 >= 1:2.17.0 |
62 | Requires: xmlsec1 >= 1.2.6 | |
63 | Requires: xmlsec1-openssl >= 1.2.6 | |
5bc7eedd ER |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
67 | Lasso is a library that implements the Liberty Alliance Single Sign On | |
68 | standards, including the SAML and SAML2 specifications. It allows to | |
69 | handle the whole life-cycle of SAML based Federations, and provides | |
70 | bindings for multiple languages. | |
71 | ||
b5de55ad JB |
72 | %description -l pl.UTF-8 |
73 | Lasso to biblioteka implementująca standardy Liberty Alliance Single | |
74 | Sign On, w tym specyfikacje SAML i SAML2. Pozwala obsłużyć cały cykl | |
75 | życia "Federacji" opartych na SAML, zapewnia wiązania dla wielu | |
76 | języków. | |
77 | ||
5bc7eedd | 78 | %package devel |
b5de55ad JB |
79 | Summary: Lasso development headers |
80 | Summary(pl.UTF-8): Pliki nagłówkowe Lasso | |
5bc7eedd ER |
81 | Group: Development/Libraries |
82 | Requires: %{name} = %{version}-%{release} | |
37a9d0b9 JB |
83 | Requires: glib2-devel >= 1:2.17.0 |
84 | Requires: libxml2-devel >= 2.0 | |
85 | Requires: libxslt-devel | |
86 | Requires: xmlsec1-devel >= 1.2.6 | |
5bc7eedd ER |
87 | |
88 | %description devel | |
b5de55ad JB |
89 | This package contains the header files for Lasso. |
90 | ||
91 | %description devel -l pl.UTF-8 | |
92 | Ten pakiet zawiera pliki nagłówkowe Lasso. | |
5bc7eedd | 93 | |
37a9d0b9 JB |
94 | %package static |
95 | Summary: Static lasso library | |
96 | Summary(pl.UTF-8): Statyczna biblioteka lasso | |
97 | Group: Development/Libraries | |
98 | Requires: %{name}-devel = %{version}-%{release} | |
99 | ||
100 | %description static | |
101 | Static lasso library. | |
102 | ||
103 | %description static -l pl.UTF-8 | |
104 | Statyczna biblioteka lasso. | |
105 | ||
5bc7eedd ER |
106 | %package -n perl-%{name} |
107 | Summary: Liberty Alliance Single Sign On (lasso) Perl bindings | |
b5de55ad JB |
108 | Summary(pl.UTF-8): Wiązania Perla do Liberty Alliance Single Sign On (lasso) |
109 | Group: Development/Languages/Perl | |
5bc7eedd ER |
110 | Requires: %{name} = %{version}-%{release} |
111 | ||
112 | %description -n perl-%{name} | |
113 | Perl language bindings for the lasso (Liberty Alliance Single Sign On) | |
114 | library. | |
115 | ||
b5de55ad JB |
116 | %description -n perl-%{name} -l pl.UTF-8 |
117 | Wiązania Perla do biblioteki lasso (Liberty Alliance Single Sign On). | |
118 | ||
5bc7eedd ER |
119 | %package -n java-%{name} |
120 | Summary: Liberty Alliance Single Sign On (lasso) Java bindings | |
b5de55ad JB |
121 | Summary(pl.UTF-8): Wiązania Javy do Liberty Alliance Single Sign On (lasso) |
122 | Group: Libraries/Java | |
5bc7eedd ER |
123 | Requires: %{name} = %{version}-%{release} |
124 | Requires: jpackage-utils | |
125 | Requires: jre | |
126 | ||
127 | %description -n java-%{name} | |
128 | Java language bindings for the lasso (Liberty Alliance Single Sign On) | |
129 | library. | |
130 | ||
b5de55ad JB |
131 | %description -n java-%{name} -l pl.UTF-8 |
132 | Wiązania Javy do biblioteki lasso (Liberty Alliance Single Sign On). | |
133 | ||
826fd2f0 | 134 | %package -n %{php_name}-%{name} |
5bc7eedd | 135 | Summary: Liberty Alliance Single Sign On (lasso) PHP bindings |
b5de55ad JB |
136 | Summary(pl.UTF-8): Wiązania PHP do Liberty Alliance Single Sign On (lasso) |
137 | Group: Development/Languages/PHP | |
5bc7eedd | 138 | Requires: %{name} = %{version}-%{release} |
826fd2f0 | 139 | %{?requires_php_extension} |
5bc7eedd | 140 | |
826fd2f0 | 141 | %description -n %{php_name}-%{name} |
5bc7eedd ER |
142 | PHP language bindings for the lasso (Liberty Alliance Single Sign On) |
143 | library. | |
144 | ||
826fd2f0 | 145 | %description -n %{php_name}-%{name} -l pl.UTF-8 |
b5de55ad JB |
146 | Wiązania PHP do biblioteki lasso (Liberty Alliance Single Sign On). |
147 | ||
fa658600 | 148 | %package -n python3-%{name} |
5bc7eedd | 149 | Summary: Liberty Alliance Single Sign On (lasso) Python bindings |
b5de55ad JB |
150 | Summary(pl.UTF-8): Wiązania Pythona do Liberty Alliance Single Sign On (lasso) |
151 | Group: Libraries/Python | |
5bc7eedd ER |
152 | Requires: %{name} = %{version}-%{release} |
153 | ||
fa658600 | 154 | %description -n python3-%{name} |
5bc7eedd ER |
155 | Python language bindings for the lasso (Liberty Alliance Single Sign |
156 | On) library. | |
157 | ||
fa658600 | 158 | %description -n python3-%{name} -l pl.UTF-8 |
b5de55ad JB |
159 | Wiązania Pythona do biblioteki lasso (Liberty Alliance Single Sign |
160 | On). | |
161 | ||
5bc7eedd ER |
162 | %prep |
163 | %setup -q | |
5bc7eedd ER |
164 | |
165 | %{__sed} -i -e ' | |
166 | s/OPTIMIZE="-g"/CC="%{__cc}" OPTIMIZE="%{rpmcflags}" INSTALLDIRS=vendor/ | |
167 | ' bindings/perl/Makefile.am | |
168 | ||
169 | %build | |
170 | %{__libtoolize} | |
171 | %{__gtkdocize} | |
172 | %{__aclocal} | |
173 | %{__autoconf} | |
174 | %{__automake} | |
175 | %configure \ | |
5bc7eedd | 176 | %{!?with_java:--disable-java} \ |
5bc7eedd ER |
177 | %{!?with_perl:--disable-perl} \ |
178 | %if %{with php} | |
37a9d0b9 | 179 | --enable-php5 \ |
5bc7eedd ER |
180 | --with-php5-config-dir=%{php_sysconfdir}/conf.d \ |
181 | %else | |
37a9d0b9 | 182 | --disable-php5 \ |
5bc7eedd | 183 | %endif |
37a9d0b9 JB |
184 | %{!?with_python:--disable-python} \ |
185 | --disable-silent-rules \ | |
186 | %{!?with_static_libs:--disable-static} \ | |
187 | %{!?with_tests:--disable-tests} \ | |
5bc7eedd ER |
188 | %if %{with wsf} |
189 | --enable-wsf \ | |
37a9d0b9 | 190 | --with-sasl2 \ |
5bc7eedd | 191 | %endif |
37a9d0b9 | 192 | --with-html-dir=%{_gtkdocdir} |
5bc7eedd ER |
193 | |
194 | %{__make} | |
195 | ||
196 | %if %{with tests} | |
197 | %{__make} check | |
198 | %endif | |
199 | ||
200 | %install | |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | %{__make} install \ | |
203 | DESTDIR=$RPM_BUILD_ROOT | |
204 | ||
37a9d0b9 JB |
205 | find $RPM_BUILD_ROOT -type f -name '*.la' | xargs %{__rm} -v |
206 | ||
207 | %if %{with static_libs} | |
208 | %{?with_java:%{__rm} $RPM_BUILD_ROOT%{_jnidir}/libjnilasso.a} | |
209 | %{?with_php:%{__rm} $RPM_BUILD_ROOT%{php_extensiondir}/lasso.a} | |
fa658600 | 210 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_lasso.a} |
37a9d0b9 | 211 | %endif |
5bc7eedd ER |
212 | |
213 | # Perl subpackage | |
214 | %if %{with perl} | |
37a9d0b9 JB |
215 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
216 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Lasso/.packlist | |
5bc7eedd ER |
217 | %endif |
218 | ||
219 | %if %{with python} | |
fa658600 | 220 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} |
5bc7eedd ER |
221 | %endif |
222 | ||
223 | # Remove bogus doc files | |
b5de55ad | 224 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
5bc7eedd ER |
225 | |
226 | %clean | |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
229 | %post -p /sbin/ldconfig | |
230 | %postun -p /sbin/ldconfig | |
231 | ||
232 | %files | |
233 | %defattr(644,root,root,755) | |
37a9d0b9 | 234 | %doc AUTHORS ChangeLog NEWS README |
5bc7eedd | 235 | %attr(755,root,root) %{_libdir}/liblasso.so.*.*.* |
b5de55ad | 236 | %attr(755,root,root) %ghost %{_libdir}/liblasso.so.3 |
5bc7eedd ER |
237 | |
238 | %files devel | |
239 | %defattr(644,root,root,755) | |
b5de55ad | 240 | %attr(755,root,root) %{_libdir}/liblasso.so |
5bc7eedd ER |
241 | %{_pkgconfigdir}/lasso.pc |
242 | %{_includedir}/lasso | |
243 | ||
37a9d0b9 JB |
244 | %if %{with static_libs} |
245 | %files static | |
246 | %defattr(644,root,root,755) | |
247 | %{_libdir}/liblasso.a | |
248 | %endif | |
249 | ||
5bc7eedd ER |
250 | %if %{with perl} |
251 | %files -n perl-%{name} | |
252 | %defattr(644,root,root,755) | |
253 | %{perl_vendorarch}/Lasso.pm | |
d90bb338 | 254 | %dir %{perl_vendorarch}/auto/Lasso |
5bc7eedd ER |
255 | %attr(755,root,root) %{perl_vendorarch}/auto/Lasso/Lasso.so |
256 | %endif | |
257 | ||
258 | %if %{with java} | |
259 | %files -n java-%{name} | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_jnidir}/libjnilasso.so | |
262 | %{_javadir}/lasso.jar | |
263 | %endif | |
264 | ||
265 | %if %{with php} | |
826fd2f0 | 266 | %files -n %{php_name}-%{name} |
5bc7eedd ER |
267 | %defattr(644,root,root,755) |
268 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/lasso.ini | |
269 | %attr(755,root,root) %{php_extensiondir}/lasso.so | |
270 | %{php_data_dir}/lasso.php | |
271 | %endif | |
272 | ||
273 | %if %{with python} | |
fa658600 | 274 | %files -n python3-%{name} |
5bc7eedd | 275 | %defattr(644,root,root,755) |
fa658600 JR |
276 | %{py3_sitedir}/__pycache__ |
277 | %{py3_sitedir}/lasso.py | |
278 | %attr(755,root,root) %{py3_sitedir}/_lasso.so | |
5bc7eedd | 279 | %endif |