From 58ec48a66912a00f4a77c05c57ccc7a491e47782 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 29 Oct 2023 18:53:59 +0100 Subject: [PATCH] Use forge macros - Mangle the version (upstream uses lubunibreak_X_Y tags) --- .gitignore | 1 + libunibreak.spec | 14 +++++++++----- sources | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ed3a98c..6894c03 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /GraphemeBreakTest.txt /LineBreakTest.txt /WordBreakTest.txt +/libunibreak-libunibreak_4_0.tar.gz diff --git a/libunibreak.spec b/libunibreak.spec index 691e72d..166ea6e 100644 --- a/libunibreak.spec +++ b/libunibreak.spec @@ -1,14 +1,18 @@ # latest liblinebreak is v2.1, we obsolete anything below 2.2 %global obsEVR 2.2-1 +%global forgeurl https://github.com/adah1972/libunibreak + Name: libunibreak Version: 4.0 -Release: %autorelease +Release: %autorelease -n Summary: A Unicode line-breaking library - +# Upstream uses tags of the form `libunibreak_X_Y` +%global tag %{name}_%{lua: v = string.gsub(rpm.expand('%{version}'), '%.', '_'); print(v) } +%forgemeta License: zlib -URL: https://github.com/adah1972/libunibreak -Source0: %{url}/releases/download/libunibreak_4_0/libunibreak-4.0.tar.gz +URL: %forgeurl +Source0: %forgesource # test files Source1: LineBreakTest.txt Source2: WordBreakTest.txt @@ -46,7 +50,7 @@ developing applications that use %{name}. %prep -%autosetup -p 1 +%forgeautosetup -p1 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} src/ diff --git a/sources b/sources index 5f37dc4..33745bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libunibreak-4.0.tar.gz) = 43da73f66fabd8fdef444c5a06ad1800464a0aeab590938522d6c19973950a242f2ccc0575a93d10d87bdcf82610452117ac081ddb73f47271a8c2a65897e11c +SHA512 (libunibreak-libunibreak_4_0.tar.gz) = f11295133a1c65f365a5287f7377f69ac7998f19b06d44818fb55c8a5ba3edabc36de8d1b7c0d38db9d982f0e443d0a751f6d51841865094122df4cd74c9af3b