blob: a171208e8af4fdfab945b89c8cfd5a9ff998d058 (
plain)
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
|
# opencode 1.19.5 for openEuler 24.03 LTS SP4 (x86_64).
#
# The COPR project this package is built in runs every build with network
# access disabled (enable_net=false), so %prep/%build must not download
# anything: every remote artifact has to be shipped inside the SRPM.
#
# Upstream is a Bun/TypeScript monorepo without a prebuilt dist/ tree, and Bun
# is not part of the openEuler build toolchain, so an in-chroot compilation
# would require vendoring the whole npm dependency tree plus the Bun runtime.
# Per spec-rules-nodejs (TypeScript/monorepo packages must use an upstream
# artifact that already ships the compiled payload), the package is built from
# the upstream-published standalone linux-x64 release tarball, which embeds the
# CLI, the embedded Web UI and the Bun runtime.
%global debug_package %{nil}
%global __strip /bin/true
Name: opencode
Version: 1.19.5
Release: 3%{?dist}
Summary: The open source coding agent
License: MIT
URL: https://github.com/anomalyco/opencode
# Upstream-published standalone linux-x64 archive (contains the "opencode"
# executable built by upstream with bun --compile).
Source0: opencode-linux-x64.tar.gz
Source1: opencode-LICENSE
ExclusiveArch: x86_64
BuildRequires: coreutils
BuildRequires: grep
BuildRequires: gzip
BuildRequires: tar
Requires: glibc
%description
opencode is an AI-powered development tool that runs coding agents in the
terminal. This package ships the upstream-published standalone Linux x86_64
executable, which already embeds the CLI, the embedded Web UI and the Bun
runtime. It requires only glibc at runtime; Node.js and Bun are not needed
after installation.
%prep
# Nothing is downloaded here: the build chroot has no network access.
tar -xzf %{SOURCE0}
%build
# Prebuilt upstream artifact (bun --compile output): nothing to compile.
%install
install -Dpm 0755 opencode %{buildroot}%{_bindir}/opencode
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE
%check
export HOME=%{_builddir}
%{buildroot}%{_bindir}/opencode --version | grep -qx '%{version}'
%files
%license %{_licensedir}/%{name}/LICENSE
%{_bindir}/opencode
%changelog
* Mon Nov 09 2026 user_76c6f026 <user_76c6f026@eur.openeuler.cn> - 1.19.5-3
- Make the build work offline: the COPR project disables network access during
builds (enable_net=false), so the GitHub source proxy, the Huawei Cloud
Node/Bun mirrors and the npm install step in %prep/%build all failed with
"no source mirror was reachable"
- Package the upstream-published standalone linux-x64 release artifact, which
already embeds the CLI, the Web UI and the Bun runtime (spec-rules-nodejs:
TypeScript monorepo without a prebuilt dist/ tree cannot be compiled from
source in the openEuler chroot)
- Ship the upstream LICENSE as Source1 and drop the models.dev snapshot that
was only consumed by the removed in-tree build
* Thu Oct 29 2026 user_76c6f026 <user_76c6f026@eur.openeuler.cn> - 1.19.5-2
- Build opencode 1.19.5 from source for openEuler 24.03 LTS SP4 x86_64
- Fetch upstream source from a GitHub proxy at build time; use Huawei Cloud
Node/Bun/npm mirrors; switch ghostty-web to the published 0.3.0 package
|