SHA256
1
0
forked from pool/rpmlint

Accepting request 914408 from home:marxin:branches:devel:openSUSE:Factory:rpmlint

- Add test multibuild target and reduce BuildRequirements for rpmlint
  package itself.

OBS-URL: https://build.opensuse.org/request/show/914408
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=802
This commit is contained in:
Martin Liška 2021-08-26 14:18:40 +00:00 committed by Git OBS Bridge
parent 4df04b4fbc
commit a5f2d982db
3 changed files with 27 additions and 20 deletions

View File

@ -1,3 +1,4 @@
<multibuild>
<package>strict</package>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 26 12:15:55 UTC 2021 - Martin Liška <mliska@suse.cz>
- Add test multibuild target and reduce BuildRequirements for rpmlint
package itself.
Wed Aug 25 15:04:29 UTC 2021 - Martin Liška <mliska@suse.cz>
- Bump to opensuse tip.

View File

@ -17,13 +17,11 @@
%define flavor @BUILD_FLAVOR@%{nil}
%if "%flavor" == "strict"
%if "%{flavor}" == "strict"
%define name_suffix -%{flavor}
%else
%define name_suffix %{nil}
%endif
Name: rpmlint%{name_suffix}
Version: 2.1+git20210826.0220428
Release: 0
@ -32,12 +30,15 @@ License: GPL-2.0-or-later
URL: https://github.com/rpm-software-management/rpmlint
Source0: rpmlint-%{version}.tar.xz
Patch0: disable-flake.patch
BuildRequires: fdupes
BuildRequires: python3-setuptools
BuildArch: noarch
%if "%{flavor}" == "test"
BuildRequires: appstream-glib
BuildRequires: binutils
BuildRequires: checkbashisms
BuildRequires: dash
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: myspell-cs_CZ
BuildRequires: myspell-en_US
BuildRequires: python-rpm-macros
@ -56,7 +57,8 @@ BuildRequires: xz
%ifarch x86_64
BuildRequires: glibc-32bit
%endif
%if "%flavor" != "strict"
%endif
%if "%{flavor}" == ""
Requires: appstream-glib
Requires: bash
Requires: binutils
@ -72,15 +74,12 @@ Requires: python3-pybeam
Requires: python3-pyenchant
Requires: python3-pyxdg
Requires: python3-rpm
Requires: python3-setuptools
Requires: python3-toml
Requires: python3-xml
Requires: python3-zstd
Requires: rpm-build
%endif
BuildArch: noarch
%description
rpmlint is a tool to check common errors on RPM packages. Binary and
source packages can be checked.
@ -89,31 +88,30 @@ source packages can be checked.
%autosetup -p1 -n rpmlint-%{version}
%build
%if "%flavor" != "strict"
%if "%{flavor}" != "strict"
%python3_build
%endif
%install
%if "%{flavor}" != "test"
mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint
%if "%flavor" != "strict"
%python3_install
fdupes %{buildroot}%{python3_sitelib}
install -m644 configs/openSUSE/* %{buildroot}%{_sysconfdir}/xdg/rpmlint
%if "%flavor" != "strict"
rm %{buildroot}%{_sysconfdir}/xdg/rpmlint/scoring-strict.override.toml
%endif
%else
install -m644 configs/openSUSE/scoring-strict.override.toml %{buildroot}%{_sysconfdir}/xdg/rpmlint
%endif
%if "%flavor" != "strict"
%if "%{flavor}" == ""
%python3_install
fdupes %{buildroot}%{python3_sitelib}
install -m644 configs/openSUSE/* %{buildroot}%{_sysconfdir}/xdg/rpmlint
rm %{buildroot}%{_sysconfdir}/xdg/rpmlint/scoring-strict.override.toml
%endif
%if "%{flavor}" == "test"
%check
python3 -m pytest
%endif
%files
%if "%flavor" != "strict"
%if "%{flavor}" == ""
%license COPYING
%doc README*
%{_bindir}/rpmlint
@ -123,8 +121,10 @@ python3 -m pytest
%config %{_sysconfdir}/xdg/rpmlint/*
%else
%if "%{flavor}" == "strict"
%dir %{_sysconfdir}/xdg/rpmlint
%config %{_sysconfdir}/xdg/rpmlint/scoring-strict.override.toml
%endif
%endif
%changelog