From b5ed8296fc40cd0ffa0b9b32bef3920ce8bcbd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Thu, 9 Feb 2023 12:21:28 +0100 Subject: [PATCH] Fix source file definition and handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use archive name expected by GitLab, then the archive does not contain whole commit reference. - Use standard %forgemeta macros, although some detail neede to be fill in – GitLab handling is not detected from URL. - Fix upstream URL. Thanks Andreas for PR#4, from which half of this fixes originate! Closes: #4 --- .gitignore | 1 + lmdb.spec | 23 +++++++++++++---------- sources | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a5b5163..c59d851 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /LMDB_0.9.27.tar.gz /LMDB_0.9.28.tar.gz /LMDB_0.9.29.tar.gz +/openldap-LMDB_0.9.29.tar.gz diff --git a/lmdb.spec b/lmdb.spec index 13318ae..b2229b3 100644 --- a/lmdb.spec +++ b/lmdb.spec @@ -3,21 +3,21 @@ Version: 0.9.29 Release: %autorelease Summary: Memory-mapped key-value database License: OpenLDAP -URL: http://symas.com/mdb +URL: https://www.symas.com/lmdb # Main source is retrieved from OpenLDAP GitLab %global forgeurl https://git.openldap.org/openldap/openldap %global tag LMDB_%{version} -# Tag checkout includes commit in archive name -%global commit 8ad7be2510414b9506ec9f9e24f24d04d9b04a1a -# The files themselves are in several subdirectories and need to be prefixed wit this. -%global archive_path libraries/lib%{name} +%global archivename openldap-%{tag} +%global archiveext tar.gz +%global archiveurl %{forgeurl}/-/archive/%{tag}/%{archivename}.%{archiveext} +%forgemeta -Source0: %{forgeurl}/-/archive/%{tag}.tar.gz -Source1: lmdb.pc.in +Source: %{forgesource} +Source: lmdb.pc.in # Patch description in the corresponding file -Patch0: lmdb-make.patch -Patch1: lmdb-s390-check.patch +Patch: lmdb-make.patch +Patch: lmdb-s390-check.patch BuildRequires: make BuildRequires: gcc @@ -54,8 +54,11 @@ The %{name}-doc package contains automatically generated documentation for %{nam %prep -%autosetup -p1 -n openldap-%{tag}-%{commit} +# forgeautosetup does not pass the -n argument +%autosetup -n %{archivename} -p1 +# The files themselves are in several subdirectories and need to be prefixed wit this. +%global archive_path libraries/lib%{name} %build pushd %{archive_path} diff --git a/sources b/sources index 2a29eac..1b2547f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (LMDB_0.9.29.tar.gz) = f75d5751ed97c1b7f982379988719f566efbf8df2d4c8894764f49c2eb926e3918844bc1e7d88e8b278e1c949ad75940f2404816ce345e74cf94d36645143b05 +SHA512 (openldap-LMDB_0.9.29.tar.gz) = b41ba5b139375d23617a79f4d322399df55745c5a4a63159ddbe0f1ded4707f0eb7f71acf3d1a4928f8fcab30a7b5db17e3e165441a61ec1dbd29f8d9efa65d1