From 4852c95d63a9fc55b24c6885ac5e0871f7c4f223 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 10 Jul 2015 11:46:52 -0400 Subject: [PATCH] 1.7 --- .gitignore | 1 + rpmlint.spec | 53 +++++++++++++++++++++++++++++++++++++++++----------- sources | 2 +- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 61479dc..ab56267 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /rpmlint-1.4.tar.xz /rpmlint-1.5.tar.xz /rpmlint-1.6.tar.xz +/rpmlint-1.7.tar.xz diff --git a/rpmlint.spec b/rpmlint.spec index e23234f..5bc84c9 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,6 +1,20 @@ +%if 0%{?fedora} > 22 +%bcond_without python3 +%else +%bcond_with python3 +%endif + +%if %{with python3} +%global python %{__python3} +%global pytest %(ls -1 %{_bindir}/py.test-3* | tail -n 1) +%else +%global python %{__python} +%global pytest py.test +%endif + Name: rpmlint -Version: 1.6 -Release: 4%{?dist} +Version: 1.7 +Release: 1%{?dist} Summary: Tool for checking common errors in RPM packages Group: Development/Tools License: GPLv2 @@ -15,24 +29,37 @@ Source4: %{name}.config.el4 Source5: %{name}.config.el5 BuildArch: noarch -BuildRequires: python >= 2.4 -BuildRequires: rpm-python >= 4.4 -BuildRequires: sed >= 3.95 +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: rpm-python3 >= 4.4.2.2 +BuildRequires: python3-pytest +Requires: python3 +Requires: rpm-python3 >= 4.4.2.2 +%else +BuildRequires: python >= 2.6 +BuildRequires: rpm-python >= 4.4.2.2 BuildRequires: pytest +Requires: python >= 2.6 +Requires: rpm-python >= 4.4.2.2 +%endif +BuildRequires: sed >= 3.95 %if ! 0%{?rhel} # no bash-completion for RHEL BuildRequires: bash-completion %endif -Requires: rpm-python >= 4.4.2.2 -Requires: python >= 2.4 Requires: perl %if ! 0%{?rhel} # python-magic and python-enchant are actually optional dependencies, but # they bring quite desirable features. They're not available in RHEL/EPEL 5 # as of 2010-06-23 though. +%if %{with python3} +Requires: python3-magic +Requires: python3-enchant +%else Requires: python-magic Requires: python-enchant %endif +%endif Requires: cpio Requires: binutils Requires: desktop-file-utils @@ -56,13 +83,13 @@ install -pm 644 %{SOURCE3} config %build -make COMPILE_PYC=1 +make COMPILE_PYC=1 PYTHON=%{python} %install touch rpmlint.pyc rpmlint.pyo # just for the %%exclude to work everywhere make install DESTDIR=$RPM_BUILD_ROOT ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} \ - LIBDIR=%{_datadir}/rpmlint BINDIR=%{_bindir} + LIBDIR=%{_datadir}/rpmlint BINDIR=%{_bindir} PYTHON=%{python} install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config.el4 @@ -77,13 +104,13 @@ rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/ %check -make check +make check PYTHON=%{python} PYTEST=%{pytest} %files %doc COPYING ChangeLog CHANGES.package.old README config.example %config(noreplace) %{_sysconfdir}/rpmlint/ -%if 0%{?fedora} >= 17 +%if 0%{?fedora} %{_datadir}/bash-completion/ %else %if ! 0%{?rhel} @@ -99,6 +126,10 @@ make check %{_mandir}/man1/rpmlint.1* %changelog +* Fri Jul 10 2015 Tom Callaway - 1.7-1 +- 1.7 +- add python conditionals + * Thu Jun 18 2015 Fedora Release Engineering - 1.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 32a8a9d..3015d6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad09ff960c7f3561af59f7886f3619ef rpmlint-1.6.tar.xz +0b78c2fa4a98c6f660003a679ad6ea90 rpmlint-1.7.tar.xz