From fcff660f77b81954622d5fcae36295e06c729978 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Wed, 27 Jun 2018 10:55:02 -0400 Subject: [PATCH] - fix language bindings package names to comply with guidelines, instead of %{name}-lang use lang-%{name} - fix conditional logic used to build on rhel --- lasso.spec | 57 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/lasso.spec b/lasso.spec index 4fdab3b..20baadb 100644 --- a/lasso.spec +++ b/lasso.spec @@ -2,7 +2,10 @@ %global with_php 0 %global with_perl 1 %global with_python 1 +%global with_python2 0 +%global with_python3 0 %global with_wsf 0 +%global obsolete_old_lang_subpackages 0 %if %{with_php} %if "%{php_version}" < "5.6" @@ -12,12 +15,16 @@ %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 0%{?fedora} < 32 || 0%{?rhel} + %if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7) %global with_python2 1 %endif - %if 0%{?fedora} && ! 0%{?rhel} + %if 0%{?fedora} || 0%{?rhel} >= 8 %global with_python3 1 %endif %endif @@ -51,7 +58,7 @@ Summary: Liberty Alliance Single Sign On Name: lasso Version: 2.6.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Libraries 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. %if %{with_perl} -%package perl +%package -n perl-%{name} Summary: Liberty Alliance Single Sign On (lasso) Perl bindings Group: Development/Libraries BuildRequires: perl-devel @@ -102,12 +109,12 @@ BuildRequires: perl(Error) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: %{name}%{?_isa} = %{version}-%{release} -%description perl +%description -n perl-%{name} Perl language bindings for the lasso (Liberty Alliance Single Sign On) library. %endif %if %{with_java} -%package java +%package -n java-%{name} Summary: Liberty Alliance Single Sign On (lasso) Java bindings Group: Development/Libraries BuildRequires: java-devel @@ -115,13 +122,18 @@ BuildRequires: jpackage-utils Requires: java-headless Requires: jpackage-utils 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. %endif %if %{with_php} -%package php +%package -n php-%{name} Summary: Liberty Alliance Single Sign On (lasso) PHP bindings Group: Development/Libraries BuildRequires: php-devel, expat-devel @@ -129,26 +141,26 @@ BuildRequires: python2 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: php(zend-abi) = %{php_zend_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. + %endif %if %{with_python2} %package -n 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 Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python2-lxml Requires: python2 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} Python language bindings for the lasso (Liberty Alliance Single Sign On) @@ -158,10 +170,6 @@ library. %if %{with_python3} %package -n 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 Group: Development/Libraries BuildRequires: python3-devel @@ -268,19 +276,19 @@ rm -fr %{buildroot}%{_defaultdocdir}/%{name} %{_includedir}/%{name} %if %{with_perl} -%files perl -f %{name}-perl-filelist +%files -n perl-%{name} -f %{name}-perl-filelist %defattr(-,root,root) %endif %if %{with_java} -%files java +%files -n java-%{name} %defattr(-,root,root) %{_libdir}/java/libjnilasso.so %{_javadir}/lasso.jar %endif %if %{with_php} -%files php +%files -n php-%{name} %defattr(-,root,root) %attr(755,root,root) %{php_extdir}/lasso.so %config(noreplace) %attr(644,root,root) %{php_inidir}/%{ini_name} @@ -304,6 +312,11 @@ rm -fr %{buildroot}%{_defaultdocdir}/%{name} %endif %changelog +* Wed Jun 27 2018 - 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 - 2.6.0-1 - Upgrade to latest upstream - Build using Python3, add python3 subpackage