%{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')} %define with_java 1 %define with_php 1 %define with_perl 0 %define with_python 1 %define with_wsf 0 Summary: Liberty Alliance Single Sign On Name: lasso Version: 2.3.6 Release: 0.20131125.1%{?dist} License: GPLv2+ Group: System Environment/Libraries Source: http://dev.entrouvert.org/lasso/lasso-%{version}.tar.gz %if %{with_wsf} BuildRequires: cyrus-sasl-devel %endif BuildRequires: gtk-doc, libtool-ltdl-devel BuildRequires: glib2-devel, swig BuildRequires: libxml2-devel, xmlsec1-devel, openssl-devel, xmlsec1-openssl-devel Requires: xmlsec1, openssl, xmlsec1-openssl Url: http://lasso.entrouvert.org/ Patch00: jumbo-2.3.6-to-master.patch %description Lasso is a library that implements the Liberty Alliance Single Sign On standards, including the SAML and SAML2 specifications. It allows to handle the whole life-cycle of SAML based Federations, and provides bindings for multiple languages. %package doc Summary: Lasso documentation Group: Development/Libraries %description doc This package contains documentation files for the Lasso library %package devel Summary: Lasso development headers and documentation Group: Development/Libraries Requires: lasso = %{version}-%{release} %description devel This package contains the header files, static libraries and development documentation for Lasso. %if %{with_perl} %package perl Summary: Liberty Alliance Single Sign On (lasso) Perl bindings Group: Development/Libraries BuildRequires: perl(ExtUtils::MakeMaker) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: lasso = %{version}-%{release} %description perl Perl language bindings for the lasso (Liberty Alliance Single Sign On) library. %endif %if %{with_java} %package java Summary: Liberty Alliance Single Sign On (lasso) Java bindings Group: Development/Libraries BuildRequires: java-devel BuildRequires: python-lxml Requires: jre-gcj, jpackage-utils Requires: %{name} = %{version}-%{release} %description java Java language bindings for the lasso (Liberty Alliance Single Sign On) library. %endif %if %{with_php} %package php Summary: Liberty Alliance Single Sign On (lasso) PHP bindings Group: Development/Libraries BuildRequires: php-devel, expat-devel BuildRequires: python-lxml Requires: php Requires: %{name} = %{version}-%{release} %description php PHP language bindings for the lasso (Liberty Alliance Single Sign On) library. %endif %if %{with_python} %package python Summary: Liberty Alliance Single Sign On (lasso) Python bindings Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python-lxml Requires: python Requires: %{name} = %{version}-%{release} %description python Python language bindings for the lasso (Liberty Alliance Single Sign On) library. %endif %prep %setup -q -n %{name}-%{version} %patch00 -p1 # Temporary build fix, remove once 2.4.0 is released. echo "2.3.6-g9c0848" > .tarball-version chmod +x tools/git-version-gen %build %configure --prefix=%{_prefix} \ %if !%{with_java} --disable-java \ %endif %if !%{with_python} --disable-python \ %endif %if !%{with_perl} --disable-perl \ %endif %if %{with_php} --enable-php5=yes \ --with-php5-config-dir=%{_sysconfdir}/php.d \ %else --enable-php5=no \ %endif %if %{with_wsf} --enable-wsf \ --with-sasl2=%{_prefix}/sasl2 \ %endif --with-html-dir=%{_datadir}/gtk-doc/html %install install -m 755 -d %{buildroot}%{_datadir}/gtk-doc/html make install exec_prefix=%{_prefix} DESTDIR=%{buildroot} find %{buildroot} -type f -name '*.la' -exec rm -f {} \; find %{buildroot} -type f -name '*.a' -exec rm -f {} \; # Perl subpackage %if %{with_perl} find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; find %{buildroot}/usr/lib/perl5 -type f -print | sed "s@^%{buildroot}@@g" | grep -v perllocal.pod | grep -v "\.packlist" > %{name}-perl-filelist if [ "$(cat %{name}-perl-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi %endif # PHP subpackage %if %{with_php} install -m 755 -d %{buildroot}%{_datadir}/php/%{name} mv %{buildroot}%{_datadir}/php/*.php %{buildroot}%{_datadir}/php/%{name} %endif %post /sbin/ldconfig 2>/dev/null %postun /sbin/ldconfig 2>/dev/null %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_libdir}/*.so.* %files doc %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING NEWS README %doc %{_defaultdocdir}/%{name} %files devel %defattr(-,root,root) %{_libdir}/*.so %{_libdir}/pkgconfig/lasso.pc %{_includedir}/%{name} %if %{with_perl} %files perl -f %{name}-perl-filelist %defattr(-,root,root) %endif %if %{with_java} %files java %defattr(-,root,root) %{_libdir}/java/*.so %{_datadir}/java/*.jar %endif %if %{with_php} %files php %defattr(-,root,root) %attr(755,root,root) %{_libdir}/php/modules/* %config(noreplace) %attr(644,root,root) %{_sysconfdir}/php.d/%{name}.ini %attr(755,root,root) %{_datadir}/php/%{name}/* %endif %if %{with_python} %files python %defattr(-,root,root) %{python_sitearch}/* %endif %changelog * Mon Nov 25 2013 Simo Sorce 2.3.6-0.20131125.1 - Initial packaging - Based on the spec file by Jean-Marc Liger - Code is updated to latest master via a jumbo patch while waiting for official upstream release. - Jumbo patch includes also additional patches sent to upstream list) to build on Fedora 20 - Perl bindings are disabled as they fail to build