diff --git a/_multibuild b/_multibuild
index e366d06..0e34089 100644
--- a/_multibuild
+++ b/_multibuild
@@ -1,3 +1,4 @@
strict
+ test
diff --git a/rpmlint.changes b/rpmlint.changes
index 8528df9..da97dcb 100644
--- a/rpmlint.changes
+++ b/rpmlint.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Aug 26 12:15:55 UTC 2021 - Martin Liška
+
+- Add test multibuild target and reduce BuildRequirements for rpmlint
+ package itself.
+
Wed Aug 25 15:04:29 UTC 2021 - Martin Liška
- Bump to opensuse tip.
diff --git a/rpmlint.spec b/rpmlint.spec
index 32b26ab..944984e 100644
--- a/rpmlint.spec
+++ b/rpmlint.spec
@@ -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