Fix source file definition and handling

- 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 <asn@redhat.com> for PR#4,
from which half of this fixes originate!

Closes: #4
This commit is contained in:
Jan Staněk 2023-02-09 12:21:28 +01:00
parent 9dd13b234d
commit b5ed8296fc
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D
3 changed files with 15 additions and 11 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/LMDB_0.9.27.tar.gz /LMDB_0.9.27.tar.gz
/LMDB_0.9.28.tar.gz /LMDB_0.9.28.tar.gz
/LMDB_0.9.29.tar.gz /LMDB_0.9.29.tar.gz
/openldap-LMDB_0.9.29.tar.gz

View File

@ -3,21 +3,21 @@ Version: 0.9.29
Release: %autorelease Release: %autorelease
Summary: Memory-mapped key-value database Summary: Memory-mapped key-value database
License: OpenLDAP License: OpenLDAP
URL: http://symas.com/mdb URL: https://www.symas.com/lmdb
# Main source is retrieved from OpenLDAP GitLab # Main source is retrieved from OpenLDAP GitLab
%global forgeurl https://git.openldap.org/openldap/openldap %global forgeurl https://git.openldap.org/openldap/openldap
%global tag LMDB_%{version} %global tag LMDB_%{version}
# Tag checkout includes commit in archive name %global archivename openldap-%{tag}
%global commit 8ad7be2510414b9506ec9f9e24f24d04d9b04a1a %global archiveext tar.gz
# The files themselves are in several subdirectories and need to be prefixed wit this. %global archiveurl %{forgeurl}/-/archive/%{tag}/%{archivename}.%{archiveext}
%global archive_path libraries/lib%{name} %forgemeta
Source0: %{forgeurl}/-/archive/%{tag}.tar.gz Source: %{forgesource}
Source1: lmdb.pc.in Source: lmdb.pc.in
# Patch description in the corresponding file # Patch description in the corresponding file
Patch0: lmdb-make.patch Patch: lmdb-make.patch
Patch1: lmdb-s390-check.patch Patch: lmdb-s390-check.patch
BuildRequires: make BuildRequires: make
BuildRequires: gcc BuildRequires: gcc
@ -54,8 +54,11 @@ The %{name}-doc package contains automatically generated documentation for %{nam
%prep %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 %build
pushd %{archive_path} pushd %{archive_path}

View File

@ -1 +1 @@
SHA512 (LMDB_0.9.29.tar.gz) = f75d5751ed97c1b7f982379988719f566efbf8df2d4c8894764f49c2eb926e3918844bc1e7d88e8b278e1c949ad75940f2404816ce345e74cf94d36645143b05 SHA512 (openldap-LMDB_0.9.29.tar.gz) = b41ba5b139375d23617a79f4d322399df55745c5a4a63159ddbe0f1ded4707f0eb7f71acf3d1a4928f8fcab30a7b5db17e3e165441a61ec1dbd29f8d9efa65d1