2010-10-12 15:33:30 +02:00
|
|
|
#
|
2011-05-03 21:47:10 +02:00
|
|
|
# spec file for package spec-cleaner
|
2010-10-12 15:33:30 +02:00
|
|
|
#
|
2024-04-10 13:06:04 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-03-23 08:48:29 +01:00
|
|
|
# Copyright (c) 2012 Vincent Untz <vuntz@opensuse.org>
|
2010-10-12 15:33:30 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-13 12:35:20 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-10-12 15:33:30 +02:00
|
|
|
#
|
|
|
|
|
2012-03-23 08:48:29 +01:00
|
|
|
|
2010-10-12 15:33:30 +02:00
|
|
|
Name: spec-cleaner
|
2024-04-10 13:06:04 +02:00
|
|
|
Version: 1.2.2+5
|
2012-03-23 08:48:29 +01:00
|
|
|
Release: 0
|
2010-10-12 15:33:30 +02:00
|
|
|
Summary: .spec file cleaner
|
2012-03-23 08:48:29 +01:00
|
|
|
License: BSD-3-Clause
|
2020-12-04 15:09:05 +01:00
|
|
|
URL: https://github.com/rpm-software-management/spec-cleaner
|
2024-04-10 13:06:04 +02:00
|
|
|
Source0: %{name}-%{version}.tar.zst
|
2023-10-26 15:37:30 +02:00
|
|
|
BuildRequires: fdupes
|
2020-06-16 12:48:49 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2023-10-26 15:37:30 +02:00
|
|
|
BuildRequires: python3-pip
|
2018-01-23 11:02:49 +01:00
|
|
|
BuildRequires: python3-pytest
|
2023-10-26 15:37:30 +02:00
|
|
|
BuildRequires: python3-wheel
|
2014-09-03 19:40:52 +02:00
|
|
|
# For the pkg_resources used in the binary loader
|
2010-10-12 15:33:30 +02:00
|
|
|
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.
|
|
|
|
|
2015-09-17 14:42:35 +02:00
|
|
|
%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.
|
|
|
|
|
2010-10-12 15:33:30 +02:00
|
|
|
%prep
|
2024-04-10 13:06:04 +02:00
|
|
|
%autosetup -p1
|
2020-12-04 15:09:05 +01:00
|
|
|
rm pytest.ini
|
2010-10-12 15:33:30 +02:00
|
|
|
|
|
|
|
%build
|
2021-06-18 09:58:57 +02:00
|
|
|
%if 0%{?mageia}
|
|
|
|
%py3_build
|
|
|
|
%else
|
2023-10-26 15:37:30 +02:00
|
|
|
%python3_pyproject_wheel
|
2021-06-18 09:58:57 +02:00
|
|
|
%endif
|
2010-10-12 15:33:30 +02:00
|
|
|
|
2013-11-25 11:21:34 +01:00
|
|
|
%check
|
2018-06-29 13:29:10 +02:00
|
|
|
export LANG=en_US.UTF-8
|
2020-12-04 15:09:05 +01:00
|
|
|
python3 -m pytest -k "not webtest" tests/*-tests.py
|
2013-11-25 11:21:34 +01:00
|
|
|
|
2010-10-12 15:33:30 +02:00
|
|
|
%install
|
2021-06-18 09:58:57 +02:00
|
|
|
%if 0%{?mageia}
|
|
|
|
%py3_install
|
|
|
|
%else
|
2023-10-26 15:37:30 +02:00
|
|
|
%python3_pyproject_install
|
2021-06-18 09:58:57 +02:00
|
|
|
%endif
|
2023-10-26 15:37:30 +02:00
|
|
|
%fdupes %{buildroot}%{python3_sitelib}
|
2010-10-12 15:33:30 +02:00
|
|
|
|
|
|
|
%files
|
2018-02-15 10:29:43 +01:00
|
|
|
%license COPYING
|
2013-11-25 11:21:34 +01:00
|
|
|
%{_bindir}/%{name}
|
2020-08-26 13:58:54 +02:00
|
|
|
%dir %{_prefix}/lib/obs/
|
|
|
|
%dir %{_prefix}/lib/obs/service/
|
|
|
|
%{_prefix}/lib/obs/service/clean_spec_file
|
|
|
|
%{_prefix}/lib/obs/service/clean_spec_file.service
|
2023-10-26 15:37:30 +02:00
|
|
|
%{python3_sitelib}/spec_cleaner
|
2024-04-10 13:06:04 +02:00
|
|
|
%{python3_sitelib}/spec_cleaner-*-info
|
2023-10-26 15:37:30 +02:00
|
|
|
%{_datadir}/%{name}
|
2010-10-12 15:33:30 +02:00
|
|
|
|
2015-09-17 14:42:35 +02:00
|
|
|
%files format_spec_file
|
2020-08-26 13:58:54 +02:00
|
|
|
%{_prefix}/lib/obs/service/format_spec_file
|
|
|
|
%{_prefix}/lib/obs/service/format_spec_file.service
|
2015-09-17 14:42:35 +02:00
|
|
|
|
2010-10-12 15:33:30 +02:00
|
|
|
%changelog
|