spec-cleaner/spec-cleaner.spec
Kristyna Streitova 530adc25bd Accepting request 1120592 from home:kstreitova:branches:openSUSE:Tools
- Clean up the SPEC file

- Update to 1.2.2 bsc#1099674:
  * Expand python sitelib glob usage in files
  * Add new head category for PSP macros
  * Make flake8 happy and fix C416
  * avoid adding curly braces to apparmor_reload
  * Bump CodeQL Actions version
  * Do not put curly brackets around python_libalternatives_reset_alternative
  * Try to fix coveralls in github actions
  * Update to actions/checkout@v3 and setup-python@v4
  * Try to increase timeout for urlopen
  * Make flake8 and mypy happy
  * Set headers for urlopen to avoid 403 code
  * ubuntu-latest doesn't support 3.6 anymore
  * Replace calls to w3m with calls to curl
  * move logic that tries to change the URL field to https into _make_secure_url
  * Fix pep8 errors to pass flake8 tests (#296)
  * Extend support for patterns (boo#1195092)
  * update coveralls config
  * Ignore error N818 from pep8-naming for now
  * Fix URL expectations on tests
  * Do not put brackets on %obsolete_legacy_pattern
  * Fix #287: Incorrect curlification for more systemd-macros
  * Add new script for rpmlint.
  * Use github token directly
- Remove spec-cleaner-psp-macros.patch that is already included in
  1.2.2 release
- Install new *.toml files with licenses

OBS-URL: https://build.opensuse.org/request/show/1120592
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/spec-cleaner?expand=0&rev=162
2023-10-26 13:37:30 +00:00

90 lines
2.7 KiB
RPMSpec

#
# spec file for package spec-cleaner
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2012 Vincent Untz <vuntz@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: spec-cleaner
Version: 1.2.2
Release: 0
Summary: .spec file cleaner
License: BSD-3-Clause
URL: https://github.com/rpm-software-management/spec-cleaner
Source0: https://github.com/rpm-software-management/spec-cleaner/archive/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: https://github.com/rpm-software-management/spec-cleaner/commit/fd0f64930a399dfcf4ff5d3e22a8ec9afa37043a
Patch0: fix_tests_needing_web_connection.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-pip
BuildRequires: python3-pytest
BuildRequires: python3-wheel
# For the pkg_resources used in the binary loader
BuildArch: noarch
%description
This script cleans spec file according to some arbitrary style guide. The
results it produces should always be checked by someone since it is not and
will never be perfect.
%package format_spec_file
Summary: Binding replacing OBS service format_spec_file
Requires: %{name} = %{version}
Conflicts: obs-service-format_spec_file
%description format_spec_file
Alternative provider of format_spec_file functionality in order to allow
user to use spec-cleaner rather than to stick to perl based format_spec_file.
%prep
%autosetup -p1 -n %{name}-%{name}-%{version}
rm pytest.ini
%build
%if 0%{?mageia}
%py3_build
%else
%python3_pyproject_wheel
%endif
%check
export LANG=en_US.UTF-8
python3 -m pytest -k "not webtest" tests/*-tests.py
%install
%if 0%{?mageia}
%py3_install
%else
%python3_pyproject_install
%endif
%fdupes %{buildroot}%{python3_sitelib}
%files
%license COPYING
%{_bindir}/%{name}
%dir %{_prefix}/lib/obs/
%dir %{_prefix}/lib/obs/service/
%{_prefix}/lib/obs/service/clean_spec_file
%{_prefix}/lib/obs/service/clean_spec_file.service
%{python3_sitelib}/spec_cleaner
%{python3_sitelib}/spec_cleaner-%{version}*-info
%{_datadir}/%{name}
%files format_spec_file
%{_prefix}/lib/obs/service/format_spec_file
%{_prefix}/lib/obs/service/format_spec_file.service
%changelog