# Enable Python dependency generation %{?python_enable_dependency_generator} # Run tests by default %bcond_without tests Name: spec-cleaner Version: 1.2.1 Release: 0%{?dist}.1 Summary: RPM spec file formatter License: BSD URL: https://github.com/rpm-software-management/spec-cleaner Source0: %{url}/archive/%{name}-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-cov) BuildRequires: python3dist(pytest-isort) BuildRequires: python3dist(pytest-xdist) BuildRequires: glibc-langpack-en %endif BuildArch: noarch %description spec-cleaner is a tool that cleans the given RPM spec file according to a style guide and returns the result. %package -n obs-service-spec_cleaner Summary: An OBS source service: reformats a spec file to the spec-cleaner standard Requires: %{name} = %{version}-%{release} Provides: obs-service-clean_spec_file = %{version}-%{release} Provides: obs-service-format_spec_file = %{version}-%{release} %description -n obs-service-spec_cleaner This is a source service for openSUSE Build Service. This source service is formating the spec file to the spec-cleaner standard. The rationale behind is to make it easier to review spec files from unknown packagers. This should be used in "trylocal" mode, so that osc is adapting the existing spec file instead of creating a new one. %prep %autosetup -n %{name}-%{name}-%{version} -p1 %build %py3_build %install %py3_install %if %{with tests} %check export LANG=en_US.UTF-8 %python3 -m pytest -k "not webtest" %endif %files %license COPYING %doc README.md AUTHORS RELEASE.md TESTSUITE.md %{_bindir}/%{name} %{python3_sitelib}/spec_cleaner/ %{python3_sitelib}/spec_cleaner-%{version}-py%{python3_version}.egg-info/ %{_datadir}/%{name}/ %files -n obs-service-spec_cleaner %dir %{_prefix}/lib/obs %{_prefix}/lib/obs/service %changelog * Tue Oct 06 2020 Neal Gompa - 1.2.1-0.1 - Rebase to 1.2.1 * Tue Dec 17 2019 Neal Gompa - 1.1.7-0.1 - Initial packaging