mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
refactor(pokeget-rs): Bundled provides and use %git_clone (#3772)
* Drop global date Signed-off-by: Gilver <rockgrub@disroot.org> * Bundled packages are versioned differently, my bad Signed-off-by: Gilver <rockgrub@disroot.org> * Since I know how `%git_clone` works now maybe... Signed-off-by: Gilver <rockgrub@disroot.org> * Update pokeget-rs.spec Signed-off-by: Gilver <rockgrub@disroot.org> * Oops Signed-off-by: Gilver <rockgrub@disroot.org> * Actually... Signed-off-by: Gilver <rockgrub@disroot.org> * Right...RPMBuild Signed-off-by: Gilver <rockgrub@disroot.org> * Cleanup unused macros? Signed-off-by: Gilver <rockgrub@disroot.org> * Macro everything Signed-off-by: Gilver <rockgrub@disroot.org> --------- Signed-off-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
@@ -1,34 +1,26 @@
|
||||
%global pname pokesprite
|
||||
%global pcommit c5aaa610ff2acdf7fd8e2dccd181bca8be9fcb3e
|
||||
%global pshortcommit %(c=%{pcommit}; echo ${c:0:7})
|
||||
%global pcommit_date 20220622
|
||||
%global shortname pokeget
|
||||
|
||||
Name: %{shortname}-rs
|
||||
Version: 1.6.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
SourceLicense: MIT
|
||||
License: MIT AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
|
||||
Summary: A better Rust version of pokeget.
|
||||
URL: https://github.com/talwat/%{name}
|
||||
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
|
||||
Source1: https://github.com/msikma/%{pname}/archive/%{pcommit}/%{pname}-%{pcommit}.tar.gz#/%{pname}-%{pshortcommit}.tar.gz
|
||||
BuildRequires: anda-srpm-macros
|
||||
BuildRequires: cargo-rpm-macros
|
||||
BuildRequires: mold
|
||||
Provides: pokeget = %{version}-%{release}
|
||||
Provides: bundled(%{pname}) = 2.7.0^%{pcommit_date}.%{pshortcommit}
|
||||
Provides: bundled(%{pname}) = %{pcommit}
|
||||
Packager: Gilver E. <rockgrub@disroot.org>
|
||||
|
||||
%description
|
||||
Successor to pokeget, written in Rust.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
mkdir -p data/%{pname}
|
||||
pushd data/%{pname}
|
||||
/usr/bin/gzip -dc '%{SOURCE1}' | /usr/bin/tar -xof - --strip-components=1
|
||||
popd
|
||||
%git_clone %{url} %{version}
|
||||
%cargo_prep_online
|
||||
|
||||
%build
|
||||
|
||||
@@ -5,5 +5,4 @@ if rpm.changed () {
|
||||
let json = get(url).json();
|
||||
let c = json.2.sha;
|
||||
rpm.global("pcommit", c);
|
||||
rpm.global("pcommit_date", date()); // could potentially result in the wrong date, fix if it becomes a problem
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user