From 42865d4b94f7d29b6109e42d7cbe8da9a5f66785 Mon Sep 17 00:00:00 2001 From: tigro Date: Thu, 4 Apr 2024 12:42:22 +0300 Subject: [PATCH] import forge-srpm-macros-0.3.0-1.el9 --- .forge-srpm-macros.metadata | 1 + .gitignore | 1 + SPECS/forge-srpm-macros.spec | 97 ++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 .forge-srpm-macros.metadata create mode 100644 .gitignore create mode 100644 SPECS/forge-srpm-macros.spec diff --git a/.forge-srpm-macros.metadata b/.forge-srpm-macros.metadata new file mode 100644 index 0000000..aae6811 --- /dev/null +++ b/.forge-srpm-macros.metadata @@ -0,0 +1 @@ +fec2e54ad4aca80b109c69a91dd30942d591bbf6 SOURCES/forge-srpm-macros-0.3.0.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b2b5bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/forge-srpm-macros-0.3.0.tar.gz diff --git a/SPECS/forge-srpm-macros.spec b/SPECS/forge-srpm-macros.spec new file mode 100644 index 0000000..a3e52c9 --- /dev/null +++ b/SPECS/forge-srpm-macros.spec @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 Maxwell G + +%bcond tests 1 + +Name: forge-srpm-macros +Version: 0.3.0 +Release: 1%{?dist} +Summary: Macros to simplify packaging of forge-hosted projects + +License: GPL-1.0-or-later +URL: https://git.sr.ht/~gotmax23/forge-srpm-macros +Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: make +%if %{with tests} +BuildRequires: python3-pytest +BuildRequires: python3-pyyaml +# For %%pytest definition +BuildRequires: python3-rpm-macros +%endif + +# We require macros and lua defined in redhat-rpm-config +# We constrain this to the version released after the code was split out that +# doesn't contain the same files. +%if (0%{?fedora} >= 40 || 0%{?rhel} >= 10) +Requires: redhat-rpm-config >= 266-1 +%elif 0%{?fedora} == 39 +Requires: redhat-rpm-config >= 265-1 +%else +# For testing purposes on older releases, +# we can depend on any version of redhat-rpm-config. +Requires: redhat-rpm-config +%endif + + +%description +%{summary}. + + +%prep +%autosetup -n %{name}-v%{version} + + +%build +%if %{defined el9} +%make_build epel9-build +%endif + + +%install +%make_build \ + DESTDIR=%{buildroot} \ + RPMMACRODIR=%{_rpmmacrodir} RPMLUADIR=%{_rpmluadir} %{?el9:epel9-}install + + +%check +%if %{with tests} +export MACRO_DIR=%{buildroot}%{_rpmmacrodir} +export MACRO_LUA_DIR="%{buildroot}%{_rpmluadir}" +%pytest +%endif + + +%files +%license LICENSES/GPL-1.0-or-later.txt +%doc README.md NEWS.md +%if %{undefined el9} +%{_rpmluadir}/fedora/srpm/forge.lua +%{_rpmmacrodir}/macros.forge +%else +%{_rpmluadir}/fedora/srpm/forge_epel.lua +%{_rpmmacrodir}/macros.zzz-forge_epel +%endif +%{_rpmluadir}/fedora/srpm/_forge_util.lua + + +%changelog +* Thu Apr 04 2024 Arkady L. Shane - 0.3.0-1 +- Rebuilt for MSVSphere 9.3 + +* Sat Mar 2 2024 Maxwell G - 0.3.0-1 +- Update to 0.3.0. + +* Wed Jan 24 2024 Fedora Release Engineering - 0.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 0.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Dec 7 2023 Maxwell G - 0.2.0-1 +- Update to 0.2.0. + +* Mon Sep 4 2023 Maxwell G - 0.1.0-1 +- Initial package. Closes rhbz#2237933.