2023-08-11 03:54:45 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
# Copyright (C) 2023 Maxwell G <maxwell@gtmx.me>
|
|
|
|
|
|
|
|
|
|
%bcond tests 1
|
|
|
|
|
|
|
|
|
|
Name: forge-srpm-macros
|
2024-09-27 16:04:13 -05:00
|
|
|
Version: 0.4.0
|
2023-08-13 18:29:55 -05:00
|
|
|
Release: 1%{?dist}
|
2023-08-11 03:54:45 +00:00
|
|
|
Summary: Macros to simplify packaging of forge-hosted projects
|
|
|
|
|
|
|
|
|
|
License: GPL-1.0-or-later
|
2023-09-07 16:23:52 +00:00
|
|
|
URL: https://git.sr.ht/~gotmax23/forge-srpm-macros
|
2023-08-11 03:54:45 +00:00
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
|
|
2023-09-07 21:02:52 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
2023-08-11 03:54:45 +00:00
|
|
|
BuildRequires: make
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-pytest
|
2023-08-13 18:08:34 +00:00
|
|
|
BuildRequires: python3-pyyaml
|
2023-08-11 03:54:45 +00:00
|
|
|
# For %%pytest definition
|
|
|
|
|
BuildRequires: python3-rpm-macros
|
|
|
|
|
%endif
|
2024-02-03 17:58:47 +00:00
|
|
|
|
2023-08-11 03:54:45 +00:00
|
|
|
# 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.
|
2023-09-07 16:15:33 +00:00
|
|
|
%if (0%{?fedora} >= 40 || 0%{?rhel} >= 10)
|
|
|
|
|
Requires: redhat-rpm-config >= 266-1
|
2024-02-03 17:58:47 +00:00
|
|
|
%elif 0%{?fedora} == 39
|
|
|
|
|
Requires: redhat-rpm-config >= 265-1
|
2023-09-07 16:15:33 +00:00
|
|
|
%else
|
|
|
|
|
# For testing purposes on older releases,
|
|
|
|
|
# we can depend on any version of redhat-rpm-config.
|
2023-08-11 03:54:45 +00:00
|
|
|
Requires: redhat-rpm-config
|
2023-09-07 16:15:33 +00:00
|
|
|
%endif
|
2023-08-11 03:54:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-v%{version}
|
|
|
|
|
|
|
|
|
|
|
2024-03-02 17:53:39 +00:00
|
|
|
%build
|
2024-11-21 14:50:25 -06:00
|
|
|
%if %{defined epel}
|
|
|
|
|
%make_build epel-build
|
2024-03-02 17:53:39 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
2023-08-11 03:54:45 +00:00
|
|
|
%install
|
2024-03-02 17:53:39 +00:00
|
|
|
%make_build \
|
|
|
|
|
DESTDIR=%{buildroot} \
|
2024-11-21 14:50:25 -06:00
|
|
|
RPMMACRODIR=%{_rpmmacrodir} RPMLUADIR=%{_rpmluadir} %{?epel:epel-}install
|
2023-08-11 03:54:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
export MACRO_DIR=%{buildroot}%{_rpmmacrodir}
|
2023-09-07 20:50:35 +00:00
|
|
|
export MACRO_LUA_DIR="%{buildroot}%{_rpmluadir}"
|
2023-08-11 03:54:45 +00:00
|
|
|
%pytest
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSES/GPL-1.0-or-later.txt
|
2023-08-13 21:32:12 +00:00
|
|
|
%doc README.md NEWS.md
|
2024-11-21 14:50:25 -06:00
|
|
|
%if %{undefined epel}
|
2023-08-11 03:54:45 +00:00
|
|
|
%{_rpmluadir}/fedora/srpm/forge.lua
|
2024-11-21 14:50:25 -06:00
|
|
|
%{_rpmluadir}/fedora/srpm/_forge_util.lua
|
2024-03-02 17:53:39 +00:00
|
|
|
%{_rpmmacrodir}/macros.forge
|
|
|
|
|
%else
|
|
|
|
|
%{_rpmluadir}/fedora/srpm/forge_epel.lua
|
2024-11-21 14:50:25 -06:00
|
|
|
%{_rpmluadir}/fedora/srpm/_forge_epel_util.lua
|
2024-03-02 17:53:39 +00:00
|
|
|
%{_rpmmacrodir}/macros.zzz-forge_epel
|
|
|
|
|
%endif
|
2023-08-11 03:54:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-09-27 16:04:13 -05:00
|
|
|
* Fri Sep 27 2024 Maxwell G <maxwell@gtmx.me> - 0.4.0-1
|
|
|
|
|
- Update to 0.4.0.
|
|
|
|
|
|
2024-08-06 20:18:05 -05:00
|
|
|
* Wed Aug 7 2024 Maxwell G <maxwell@gtmx.me> - 0.3.2-1
|
|
|
|
|
- Update to 0.3.2.
|
|
|
|
|
|
2024-04-10 16:24:56 +00:00
|
|
|
* Wed Apr 10 2024 Maxwell G <maxwell@gtmx.me> - 0.3.1-1
|
|
|
|
|
- Update to 0.3.1.
|
|
|
|
|
|
2024-03-02 19:17:50 +00:00
|
|
|
* Sat Mar 2 2024 Maxwell G <maxwell@gtmx.me> - 0.3.0-1
|
|
|
|
|
- Update to 0.3.0.
|
|
|
|
|
|
2023-12-07 05:46:17 +00:00
|
|
|
* Thu Dec 7 2023 Maxwell G <maxwell@gtmx.me> - 0.2.0-1
|
|
|
|
|
- Update to 0.2.0.
|
|
|
|
|
|
2023-09-04 15:12:42 -05:00
|
|
|
* Mon Sep 4 2023 Maxwell G <maxwell@gtmx.me> - 0.1.0-1
|
|
|
|
|
- Update to 0.1.0.
|
|
|
|
|
|
2023-08-13 18:29:55 -05:00
|
|
|
* Sun Aug 13 2023 Maxwell G <maxwell@gtmx.me> - 0.0.1-1
|
|
|
|
|
- Update to 0.0.1.
|