From 44fa4d4faaf8e94a5714eb5de7c399eb9ac22243 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Feb 23 2023 17:23:47 +0000 Subject: Add sourcehut Instructions for using commits from git on Sourcehut --- diff --git a/guidelines/modules/ROOT/pages/SourceURL.adoc b/guidelines/modules/ROOT/pages/SourceURL.adoc index ef3dd83..2a87dd4 100644 --- a/guidelines/modules/ROOT/pages/SourceURL.adoc +++ b/guidelines/modules/ROOT/pages/SourceURL.adoc @@ -192,6 +192,7 @@ Once the commit hash and git tag are known, you can define them in your spec fil %global shortcommit %(c=%{commit}; echo ${c:0:7}) [GitHub] %global shortcommit %(c=%{commit}; echo ${c:0:11}) [Bitbucket] %global shortcommit %(c=%{commit}; echo ${c:0:7}) [GitLab] +%global shortcommit %(c=%{commit}; echo ${c:0:8}) [Sourcehut] .... === Commit Revision @@ -202,12 +203,14 @@ For the source tarball, you can use the following syntax: Source: https://github.com/OWNER/PROJECT/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitHub] Source: https://bitbucket.org/OWNER/PROJECT/get/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz [BitBucket] Source: https://gitlab.com/OWNER/PROJECT/-/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitLab] +Source: https://sr.ht/~OWNER/PROJECT/archive/%{shortcommit}.tar.gz [Sourcehut] ... %prep %autosetup -n PROJECT-%{commit} [GitHub] %autosetup -n OWNER-PROJECT-%{shortcommit} [BitBucket] %autosetup -n PROJECT-%{commit} [GitLab] +%autosetup -n PROJECT-%{shortcommit} [Sourcehut] .... If the release corresponds to a git tag with a sane numeric version, @@ -239,12 +242,14 @@ For the source tarball, you can use the following syntax: Source: https://github.com/OWNER/PROJECT/archive/%{gittag}/%{name}-%{version}.tar.gz [GitHub] Source: https://bitbucket.org/OWNER/PROJECT/get/%{gittag}.tar.gz#/%{name}-%{version}.tar.gz [BitBucket] Source: https://gitlab.com/OWNER/PROJECT/-/archive/%{gittag}/%{name}-%{version}.tar.gz [GitLab] +Source: https://sr.ht/~OWNER/PROJECT/archive/%{version}.tar.gz [Sourcehut] ... %prep %autosetup -n PROJECT-%{gittag} [GitHub] %autosetup -n OWNER-PROJECT-%{shortcommit} [BitBucket] %autosetup -n PROJECT-%{version} [GitLab] +%autosetup -n PROJECT-%{version} [Sourcehut] .... == Using %\{version}