From 382dccb8ae3b0f68fcec8aa655a15c37086acf19 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 1 Apr 2024 16:52:51 -0700 Subject: [PATCH] spec: Switch to using the source from the github tag This switches to using the forge macros for building Lorax on Fedora. The nodist macro is needed because the github tag includes the release but not the dist. --- lorax.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lorax.spec b/lorax.spec index 0f6f888f2..7e9492297 100644 --- a/lorax.spec +++ b/lorax.spec @@ -1,19 +1,20 @@ # NOTE: This specfile is generated from upstream at https://github.com/rhinstaller/lorax # NOTE: Please submit changes as a pull request %define debug_package %{nil} +%global forgeurl https://github.com/weldr/lorax Name: lorax Version: 41.0 Release: 1%{?dist} Summary: Tool for creating the anaconda install images - License: GPL-2.0-or-later -URL: https://github.com/weldr/lorax -# To generate Source0 do: -# git clone https://github.com/weldr/lorax -# git checkout -b archive-branch lorax-%%{version}-%%{release} -# tito build --tgz -Source0: %{name}-%{version}.tar.gz + +# Get the release without the dist +%define nodist %{lua:r = string.gsub(rpm.expand("%{release}"), rpm.expand("%{?dist}"), ""); print(r)} +%global tag %{name}-%{version}-%{nodist} +%forgemeta +Url: %{forgeurl} +Source0: %{forgesource} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -129,7 +130,7 @@ Lorax templates for creating the boot.iso and live isos are placed in /usr/share/lorax/templates.d/99-generic %prep -%autosetup -p1 -n %{name}-%{version} +%forgeautosetup %build