From 933f55dfc7c62d4bd4f9d1ee8e249ef8bdd552ef Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 2 Jul 2019 16:01:06 +0200 Subject: [PATCH] Disable python2 with f31+ --- libkate.spec | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/libkate.spec b/libkate.spec index 4f71e64..54bbf7c 100644 --- a/libkate.spec +++ b/libkate.spec @@ -1,6 +1,10 @@ +%if 0%{?fedora} || 0%{?rhel} >= 8 +%global _without_python2 1 +%endif + Name: libkate Version: 0.4.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Libraries to handle the Kate bitstream format License: BSD @@ -8,7 +12,9 @@ URL: http://git.xiph.org/?p=users/oggk/kate.git;a=summary Source0: http://libkate.googlecode.com/files/libkate-%{version}.tar.gz BuildRequires: gcc +%if 0%{!?_without_python2} BuildRequires: python2-devel +%endif BuildRequires: libogg-devel BuildRequires: liboggz BuildRequires: libpng-devel @@ -66,7 +72,9 @@ rm tools/kate_lexer.c %build +%if 0%{!?_without_python2} export PYTHON=python2 +%endif %configure --disable-static # Remove rpath @@ -77,13 +85,19 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %install +%if 0%{!?_without_python2} export PYTHON=python2 +%endif %make_install -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +find %{buildroot} -name '*.la' -exec rm -f {} ';' # Fix for header timestramps -touch -r $RPM_BUILD_ROOT%{_includedir}/kate/kate_config.h \ - $RPM_BUILD_ROOT%{_includedir}/kate/kate.h +touch -r %{buildroot}%{_includedir}/kate/kate_config.h \ + %{buildroot}%{_includedir}/kate/kate.h + +%if 0%{!?_without_python2} +rm -rf %{buildroot}%{_mandir}/man1/KateDJ.1* +%endif %check @@ -105,12 +119,14 @@ make check %{_libdir}/pkgconfig/*.pc %files utils +%if 0%{!?_without_python2} %{python2_sitelib}/kdj/ %{_bindir}/KateDJ +%{_mandir}/man1/KateDJ.* +%endif %{_bindir}/katalyzer %{_bindir}/katedec %{_bindir}/kateenc -%{_mandir}/man1/KateDJ.* %{_mandir}/man1/katalyzer.* %{_mandir}/man1/katedec.* %{_mandir}/man1/kateenc.* @@ -120,6 +136,9 @@ make check %changelog +* Tue Jul 02 2019 Nicolas Chauvet - 0.4.1-17 +- Disable python2 for f31+ + * Fri Feb 01 2019 Fedora Release Engineering - 0.4.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild