This commit is contained in:
Tom Callaway 2015-07-10 11:46:52 -04:00
parent f9bbf59a9c
commit 4852c95d63
3 changed files with 44 additions and 12 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/rpmlint-1.4.tar.xz /rpmlint-1.4.tar.xz
/rpmlint-1.5.tar.xz /rpmlint-1.5.tar.xz
/rpmlint-1.6.tar.xz /rpmlint-1.6.tar.xz
/rpmlint-1.7.tar.xz

View File

@ -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 Name: rpmlint
Version: 1.6 Version: 1.7
Release: 4%{?dist} Release: 1%{?dist}
Summary: Tool for checking common errors in RPM packages Summary: Tool for checking common errors in RPM packages
Group: Development/Tools Group: Development/Tools
License: GPLv2 License: GPLv2
@ -15,24 +29,37 @@ Source4: %{name}.config.el4
Source5: %{name}.config.el5 Source5: %{name}.config.el5
BuildArch: noarch BuildArch: noarch
BuildRequires: python >= 2.4 %if %{with python3}
BuildRequires: rpm-python >= 4.4 BuildRequires: python3-devel
BuildRequires: sed >= 3.95 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 BuildRequires: pytest
Requires: python >= 2.6
Requires: rpm-python >= 4.4.2.2
%endif
BuildRequires: sed >= 3.95
%if ! 0%{?rhel} %if ! 0%{?rhel}
# no bash-completion for RHEL # no bash-completion for RHEL
BuildRequires: bash-completion BuildRequires: bash-completion
%endif %endif
Requires: rpm-python >= 4.4.2.2
Requires: python >= 2.4
Requires: perl Requires: perl
%if ! 0%{?rhel} %if ! 0%{?rhel}
# python-magic and python-enchant are actually optional dependencies, but # python-magic and python-enchant are actually optional dependencies, but
# they bring quite desirable features. They're not available in RHEL/EPEL 5 # they bring quite desirable features. They're not available in RHEL/EPEL 5
# as of 2010-06-23 though. # as of 2010-06-23 though.
%if %{with python3}
Requires: python3-magic
Requires: python3-enchant
%else
Requires: python-magic Requires: python-magic
Requires: python-enchant Requires: python-enchant
%endif %endif
%endif
Requires: cpio Requires: cpio
Requires: binutils Requires: binutils
Requires: desktop-file-utils Requires: desktop-file-utils
@ -56,13 +83,13 @@ install -pm 644 %{SOURCE3} config
%build %build
make COMPILE_PYC=1 make COMPILE_PYC=1 PYTHON=%{python}
%install %install
touch rpmlint.pyc rpmlint.pyo # just for the %%exclude to work everywhere touch rpmlint.pyc rpmlint.pyo # just for the %%exclude to work everywhere
make install DESTDIR=$RPM_BUILD_ROOT ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} \ 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 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config
install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config.el4 install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config.el4
@ -77,13 +104,13 @@ rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/
%check %check
make check make check PYTHON=%{python} PYTEST=%{pytest}
%files %files
%doc COPYING ChangeLog CHANGES.package.old README config.example %doc COPYING ChangeLog CHANGES.package.old README config.example
%config(noreplace) %{_sysconfdir}/rpmlint/ %config(noreplace) %{_sysconfdir}/rpmlint/
%if 0%{?fedora} >= 17 %if 0%{?fedora}
%{_datadir}/bash-completion/ %{_datadir}/bash-completion/
%else %else
%if ! 0%{?rhel} %if ! 0%{?rhel}
@ -99,6 +126,10 @@ make check
%{_mandir}/man1/rpmlint.1* %{_mandir}/man1/rpmlint.1*
%changelog %changelog
* Fri Jul 10 2015 Tom Callaway <spot@fedoraproject.org> - 1.7-1
- 1.7
- add python conditionals
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
ad09ff960c7f3561af59f7886f3619ef rpmlint-1.6.tar.xz 0b78c2fa4a98c6f660003a679ad6ea90 rpmlint-1.7.tar.xz