-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqn-bin.spec
More file actions
80 lines (70 loc) · 3.26 KB
/
Copy pathqn-bin.spec
File metadata and controls
80 lines (70 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# qn-bin: install the SLSA-attested binary cargo-dist ships, no rebuild.
#
# This spec is built on COPR's mock chroots. The SRPM embeds both Linux
# gnu tarballs (x86_64 + aarch64) cargo-dist published for this release;
# the prep section selects the right one for the chroot's arch and the
# install section lays the binary + docs into the buildroot. No Rust
# toolchain involved on the COPR side — the binary inside the resulting
# RPM is bit-identical to what ships in crates.io, Homebrew, .deb, AUR,
# and the GHCR image.
#
# Comments here intentionally avoid the percent-sign character entirely
# — RPM expands macros inside comments at parse time, which corrupts
# the parser state and causes downstream "Name field must be present"
# errors that look unrelated.
#
# The version is substituted by .github/workflows/publish-copr.yml via
# sed before rpmbuild -bs: every @@QN_VERSION@@ becomes the actual
# release version (0.1.4 etc.). We don't use a spec macro because COPR's
# older chroots (EPEL 9, Fedora 42-44) re-parse the spec during the
# binary-build phase without inheriting our --define from the source
# build, leading to a literal unexpanded macro in error messages.
#
# Built by .github/workflows/publish-copr.yml on each release. That
# workflow pre-downloads both arch tarballs into ~/rpmbuild/SOURCES/
# before invoking rpmbuild -bs, so the resulting SRPM carries the
# sources and COPR's mock can build without network access.
# Skip the auto-generated debuginfo subpackage. Our binary is already
# stripped by cargo-dist upstream, and we don't claim the resulting
# /usr/lib/debug/... file in the files section, so without this Fedora's
# strict "unpackaged files found" check fails the build.
%global debug_package %{nil}
Name: qn
Version: @@QN_VERSION@@
Release: 1%{?dist}
Summary: Command-line interface for the Quicknode SDK
License: MIT
URL: https://github.com/quicknode/cli
# Both arch tarballs ship in the SRPM. The prep section picks one based
# on the chroot's arch.
Source0: https://github.com/quicknode/cli/releases/download/v%{version}/quicknode-cli-x86_64-unknown-linux-gnu.tar.xz
Source1: https://github.com/quicknode/cli/releases/download/v%{version}/quicknode-cli-aarch64-unknown-linux-gnu.tar.xz
ExclusiveArch: x86_64 aarch64
BuildRequires: coreutils
BuildRequires: tar
BuildRequires: xz
%description
qn is a command-line interface for Quicknode, built around noun-verb
commands that read naturally for both humans and agents. Manage endpoints,
streams, webhooks, the KV store, teams, usage, and billing.
This package installs the prebuilt binary cargo-dist publishes upstream —
the same SLSA-attested artifact that ships in crates.io, Homebrew, the
GHCR Docker image, the AUR qn-bin package, and Debian .deb files.
%prep
%ifarch x86_64
%setup -q -T -b 0 -n quicknode-cli-x86_64-unknown-linux-gnu
%endif
%ifarch aarch64
%setup -q -T -b 1 -n quicknode-cli-aarch64-unknown-linux-gnu
%endif
%install
install -Dm755 qn %{buildroot}%{_bindir}/qn
install -Dm644 LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE
install -Dm644 README.md %{buildroot}%{_docdir}/%{name}/README.md
%files
%{_bindir}/qn
%license LICENSE
%doc README.md
%changelog
- Automated build from the GitHub Release upstream.