]> git.pld-linux.org Git - packages/lasso.git/blob - lasso.spec
9b060ccc42b18eac76085358648ac5da5273b7f2
[packages/lasso.git] / lasso.spec
1 #
2 # TODO
3 # - fix tests (some linkage errors)
4
5 # Conditional build:
6 %bcond_with     wsd             # wsd
7 %bcond_with     tests           # build tests
8 %bcond_without  java            # Java bindings
9 %bcond_without  php             # PHP bindings
10 %bcond_without  perl            # Perl bindings
11 %bcond_without  python          # Python 2.x bindings
12
13 Summary:        Liberty Alliance Single Sign On
14 Name:           lasso
15 Version:        2.4.0
16 Release:        1
17 License:        GPL v2+
18 Group:          Libraries
19 Source0:        http://dev.entrouvert.org/lasso/%{name}-%{version}.tar.gz
20 # Source0-md5:  3d04aaff37c816aa16f2d1bcc2639f27
21 Patch1:         0001-Fix-java-version-detection.patch
22 Patch2:         0001-Fix-generators-for-parsing-of-integer-values.patch
23 Patch3:         0002-xml-xml.c-fix-liberal-use-of-casting-for-the-SNIPPET.patch
24 URL:            http://lasso.entrouvert.org/
25 %{?with_wsf:BuildRequires: cyrus-sasl-devel}
26 BuildRequires:  glib2-devel
27 BuildRequires:  gtk-doc
28 BuildRequires:  libtool
29 BuildRequires:  libxml2-devel
30 BuildRequires:  openssl-devel
31 BuildRequires:  pkgconfig
32 BuildRequires:  rpmbuild(macros) >= 1.315
33 BuildRequires:  xmlsec1-devel
34 BuildRequires:  xmlsec1-openssl-devel
35 %if %{with php}
36 BuildRequires:  expat-devel
37 BuildRequires:  php-devel
38 BuildRequires:  python
39 %endif
40 %if %{with perl}
41 BuildRequires:  perl(ExtUtils::MakeMaker)
42 BuildRequires:  perl(Test::More)
43 %endif
44 %if %{with java}
45 BuildRequires:  jdk
46 BuildRequires:  rpm-javaprov
47 %endif
48 %if %{with python}
49 BuildRequires:  python-devel
50 BuildRequires:  python-lxml
51 BuildRequires:  rpm-pythonprov
52 %endif
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Lasso is a library that implements the Liberty Alliance Single Sign On
57 standards, including the SAML and SAML2 specifications. It allows to
58 handle the whole life-cycle of SAML based Federations, and provides
59 bindings for multiple languages.
60
61 %package devel
62 Summary:        Lasso development headers and documentation
63 Group:          Development/Libraries
64 Requires:       %{name} = %{version}-%{release}
65
66 %description devel
67 This package contains the header files, static libraries and
68 development documentation for Lasso.
69
70 %package -n perl-%{name}
71 Summary:        Liberty Alliance Single Sign On (lasso) Perl bindings
72 Group:          Development/Libraries
73 Requires:       %{name} = %{version}-%{release}
74
75 %description -n perl-%{name}
76 Perl language bindings for the lasso (Liberty Alliance Single Sign On)
77 library.
78
79 %package -n java-%{name}
80 Summary:        Liberty Alliance Single Sign On (lasso) Java bindings
81 Group:          Development/Libraries
82 Requires:       %{name} = %{version}-%{release}
83 Requires:       jpackage-utils
84 Requires:       jre
85
86 %description -n java-%{name}
87 Java language bindings for the lasso (Liberty Alliance Single Sign On)
88 library.
89
90 %package -n php-%{name}
91 Summary:        Liberty Alliance Single Sign On (lasso) PHP bindings
92 Group:          Development/Libraries
93 Requires:       %{name} = %{version}-%{release}
94
95 %description -n php-%{name}
96 PHP language bindings for the lasso (Liberty Alliance Single Sign On)
97 library.
98
99 %package -n python-%{name}
100 Summary:        Liberty Alliance Single Sign On (lasso) Python bindings
101 Group:          Development/Libraries
102 Requires:       %{name} = %{version}-%{release}
103
104 %description -n python-%{name}
105 Python language bindings for the lasso (Liberty Alliance Single Sign
106 On) library.
107
108 %prep
109 %setup -q
110 %patch1 -p1
111 %patch2 -p1
112 %patch3 -p1
113
114 %{__sed} -i -e '
115         s/OPTIMIZE="-g"/CC="%{__cc}" OPTIMIZE="%{rpmcflags}" INSTALLDIRS=vendor/
116 ' bindings/perl/Makefile.am
117
118 %build
119 %{__libtoolize}
120 %{__gtkdocize}
121 %{__aclocal}
122 %{__autoconf}
123 %{__automake}
124 %configure \
125         --disable-static \
126         --disable-silent-rules \
127         %{!?with_tests:--disable-tests} \
128         %{!?with_java:--disable-java} \
129         %{!?with_python:--disable-python} \
130         %{!?with_perl:--disable-perl} \
131 %if %{with php}
132         --enable-php5=yes \
133         --with-php5-config-dir=%{php_sysconfdir}/conf.d \
134 %else
135         --enable-php5=no \
136 %endif
137 %if %{with wsf}
138         --enable-wsf \
139         --with-sasl2=%{_prefix}/sasl2 \
140 %endif
141
142 %{__make}
143
144 %if %{with tests}
145 %{__make} check
146 %endif
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150 %{__make} install \
151         DESTDIR=$RPM_BUILD_ROOT
152
153 find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -v
154
155 # Perl subpackage
156 %if %{with perl}
157 rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
158 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Lasso/.packlist
159 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Lasso/Lasso.bs
160 %endif
161
162 %if %{with python}
163 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
164 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
165 %py_postclean
166 %endif
167
168 # Remove bogus doc files
169 rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %post   -p /sbin/ldconfig
175 %postun -p /sbin/ldconfig
176
177 %files
178 %defattr(644,root,root,755)
179 %doc AUTHORS COPYING NEWS README
180 %attr(755,root,root) %{_libdir}/liblasso.so.*.*.*
181 %ghost %{_libdir}/liblasso.so.3
182
183 %files devel
184 %defattr(644,root,root,755)
185 %{_libdir}/liblasso.so
186 %{_pkgconfigdir}/lasso.pc
187 %{_includedir}/lasso
188
189 %if %{with perl}
190 %files -n perl-%{name}
191 %defattr(644,root,root,755)
192 %{perl_vendorarch}/Lasso.pm
193 %dir %{perl_vendorarch}/auto/Lasso
194 %attr(755,root,root) %{perl_vendorarch}/auto/Lasso/Lasso.so
195 %endif
196
197 %if %{with java}
198 %files -n java-%{name}
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_jnidir}/libjnilasso.so
201 %{_javadir}/lasso.jar
202 %endif
203
204 %if %{with php}
205 %files -n php-%{name}
206 %defattr(644,root,root,755)
207 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/lasso.ini
208 %attr(755,root,root) %{php_extensiondir}/lasso.so
209 %{php_data_dir}/lasso.php
210 %endif
211
212 %if %{with python}
213 %files -n python-%{name}
214 %defattr(644,root,root,755)
215 %{py_sitedir}/lasso.py[co]
216 %attr(755,root,root) %{py_sitedir}/_lasso.so
217 %endif
This page took 0.049282 seconds and 2 git commands to generate.