- fix language bindings package names to comply with guidelines,

instead of %{name}-lang use lang-%{name}
- fix conditional logic used to build on rhel
This commit is contained in:
John Dennis 2018-06-27 10:55:02 -04:00
parent 9172769420
commit fcff660f77

View File

@ -2,7 +2,10 @@
%global with_php 0 %global with_php 0
%global with_perl 1 %global with_perl 1
%global with_python 1 %global with_python 1
%global with_python2 0
%global with_python3 0
%global with_wsf 0 %global with_wsf 0
%global obsolete_old_lang_subpackages 0
%if %{with_php} %if %{with_php}
%if "%{php_version}" < "5.6" %if "%{php_version}" < "5.6"
@ -12,12 +15,16 @@
%endif %endif
%endif %endif
%if (0%{?fedora} > 0 && 0%{?fedora} <= 29) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
%global obsolete_old_lang_subpackages 1
%endif
%if %{with_python} %if %{with_python}
%if 0%{?fedora} < 32 || 0%{?rhel} %if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
%global with_python2 1 %global with_python2 1
%endif %endif
%if 0%{?fedora} && ! 0%{?rhel} %if 0%{?fedora} || 0%{?rhel} >= 8
%global with_python3 1 %global with_python3 1
%endif %endif
%endif %endif
@ -51,7 +58,7 @@
Summary: Liberty Alliance Single Sign On Summary: Liberty Alliance Single Sign On
Name: lasso Name: lasso
Version: 2.6.0 Version: 2.6.0
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://dev.entrouvert.org/lasso/lasso-%{version}.tar.gz Source: http://dev.entrouvert.org/lasso/lasso-%{version}.tar.gz
@ -92,7 +99,7 @@ This package contains the header files, static libraries and development
documentation for Lasso. documentation for Lasso.
%if %{with_perl} %if %{with_perl}
%package perl %package -n perl-%{name}
Summary: Liberty Alliance Single Sign On (lasso) Perl bindings Summary: Liberty Alliance Single Sign On (lasso) Perl bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: perl-devel BuildRequires: perl-devel
@ -102,12 +109,12 @@ BuildRequires: perl(Error)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description perl %description -n perl-%{name}
Perl language bindings for the lasso (Liberty Alliance Single Sign On) library. Perl language bindings for the lasso (Liberty Alliance Single Sign On) library.
%endif %endif
%if %{with_java} %if %{with_java}
%package java %package -n java-%{name}
Summary: Liberty Alliance Single Sign On (lasso) Java bindings Summary: Liberty Alliance Single Sign On (lasso) Java bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: java-devel BuildRequires: java-devel
@ -115,13 +122,18 @@ BuildRequires: jpackage-utils
Requires: java-headless Requires: java-headless
Requires: jpackage-utils Requires: jpackage-utils
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{obsolete_old_lang_subpackages}
Provides: %{name}-java = %{version}-%{release}
Provides: %{name}-java%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-java < %{version}-%{release}
%endif
%description java %description -n java-%{name}
Java language bindings for the lasso (Liberty Alliance Single Sign On) library. Java language bindings for the lasso (Liberty Alliance Single Sign On) library.
%endif %endif
%if %{with_php} %if %{with_php}
%package php %package -n php-%{name}
Summary: Liberty Alliance Single Sign On (lasso) PHP bindings Summary: Liberty Alliance Single Sign On (lasso) PHP bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: php-devel, expat-devel BuildRequires: php-devel, expat-devel
@ -129,26 +141,26 @@ BuildRequires: python2
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: php(zend-abi) = %{php_zend_api} Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api} Requires: php(api) = %{php_core_api}
Provides: php-%{name} = %{version}-%{release}
Provides: php-%{name}%{?_isa} = %{version}-%{release}
%description php %description -n php-%{name}
PHP language bindings for the lasso (Liberty Alliance Single Sign On) library. PHP language bindings for the lasso (Liberty Alliance Single Sign On) library.
%endif %endif
%if %{with_python2} %if %{with_python2}
%package -n python2-%{name} %package -n python2-%{name}
%{?python_provide:%python_provide python2-%{name}} %{?python_provide:%python_provide python2-%{name}}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Liberty Alliance Single Sign On (lasso) Python bindings Summary: Liberty Alliance Single Sign On (lasso) Python bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python2-lxml BuildRequires: python2-lxml
Requires: python2 Requires: python2
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{obsolete_old_lang_subpackages}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
%endif
%description -n python2-%{name} %description -n python2-%{name}
Python language bindings for the lasso (Liberty Alliance Single Sign On) Python language bindings for the lasso (Liberty Alliance Single Sign On)
@ -158,10 +170,6 @@ library.
%if %{with_python3} %if %{with_python3}
%package -n python3-%{name} %package -n python3-%{name}
%{?python_provide:%python_provide python3-%{name}} %{?python_provide:%python_provide python3-%{name}}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Liberty Alliance Single Sign On (lasso) Python bindings Summary: Liberty Alliance Single Sign On (lasso) Python bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: python3-devel BuildRequires: python3-devel
@ -268,19 +276,19 @@ rm -fr %{buildroot}%{_defaultdocdir}/%{name}
%{_includedir}/%{name} %{_includedir}/%{name}
%if %{with_perl} %if %{with_perl}
%files perl -f %{name}-perl-filelist %files -n perl-%{name} -f %{name}-perl-filelist
%defattr(-,root,root) %defattr(-,root,root)
%endif %endif
%if %{with_java} %if %{with_java}
%files java %files -n java-%{name}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/java/libjnilasso.so %{_libdir}/java/libjnilasso.so
%{_javadir}/lasso.jar %{_javadir}/lasso.jar
%endif %endif
%if %{with_php} %if %{with_php}
%files php %files -n php-%{name}
%defattr(-,root,root) %defattr(-,root,root)
%attr(755,root,root) %{php_extdir}/lasso.so %attr(755,root,root) %{php_extdir}/lasso.so
%config(noreplace) %attr(644,root,root) %{php_inidir}/%{ini_name} %config(noreplace) %attr(644,root,root) %{php_inidir}/%{ini_name}
@ -304,6 +312,11 @@ rm -fr %{buildroot}%{_defaultdocdir}/%{name}
%endif %endif
%changelog %changelog
* Wed Jun 27 2018 <jdennis@redhat.com> - 2.6.0-2
- fix language bindings package names to comply with guidelines,
instead of %{name}-lang use lang-%{name}
- fix conditional logic used to build on rhel
* Tue Jun 26 2018 <jdennis@redhat.com> - 2.6.0-1 * Tue Jun 26 2018 <jdennis@redhat.com> - 2.6.0-1
- Upgrade to latest upstream - Upgrade to latest upstream
- Build using Python3, add python3 subpackage - Build using Python3, add python3 subpackage