diff --git a/.packit.yaml b/.packit.yaml index 1a4f6a8..ca96cdb 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,6 +4,10 @@ packit_instances: ["prod", "stg"] upstream_project_url: https://github.com/packit/specfile issue_repository: https://github.com/packit/specfile +# PEP440 +#prerelease_suffix_pattern: "([.-_]?)(a(lpha)?|b(eta)?|(r)?c|pre(view)?)([.-_]?\\d+)?" +#prerelease_suffix_macro: prerelease + copy_upstream_release_description: true packages: diff --git a/epel8/python-specfile.spec b/epel8/python-specfile.spec index fea366a..65ec6ed 100644 --- a/epel8/python-specfile.spec +++ b/epel8/python-specfile.spec @@ -4,15 +4,22 @@ Main focus is on modifying existing spec files, any change should result in a minimal diff.} +%global base_version 0.24.0 +#global prerelease %%{nil} + +%global package_version %{base_version}%{?prerelease:~%{prerelease}} +%global pypi_version %{base_version}%{?prerelease:-%{prerelease}} + + Name: python-specfile -Version: 0.24.0 +Version: %{package_version} Release: 1%{?dist} Summary: A library for parsing and manipulating RPM spec files License: MIT URL: https://github.com/packit/specfile -Source0: %{pypi_source specfile} +Source0: %{pypi_source specfile %{pypi_version}} BuildArch: noarch @@ -36,7 +43,7 @@ Summary: %{summary} %prep -%autosetup -p1 -n specfile-%{version} +%autosetup -p1 -n specfile-%{pypi_version} # Remove bundled egg-info rm -rf specfile.egg-info diff --git a/fedora/python-specfile.spec b/fedora/python-specfile.spec index 5ffbc14..02fd8c7 100644 --- a/fedora/python-specfile.spec +++ b/fedora/python-specfile.spec @@ -7,15 +7,22 @@ Main focus is on modifying existing spec files, any change should result in a minimal diff.} +%global base_version 0.24.0 +#global prerelease %%{nil} + +%global package_version %{base_version}%{?prerelease:~%{prerelease}} +%global pypi_version %{base_version}%{?prerelease:-%{prerelease}} + + Name: python-specfile -Version: 0.24.0 +Version: %{package_version} Release: 1%{?dist} Summary: A library for parsing and manipulating RPM spec files License: MIT URL: https://github.com/packit/specfile -Source0: %{pypi_source specfile} +Source0: %{pypi_source specfile %{pypi_version}} BuildArch: noarch @@ -39,7 +46,7 @@ Summary: %{summary} %prep -%autosetup -p1 -n specfile-%{version} +%autosetup -p1 -n specfile-%{pypi_version} # since we are building from PyPI source, we don't need git-archive # support in setuptools_scm