initial spec file and gear rules
This commit is contained in:
parent
5adbb6128e
commit
a8f8b2988b
2 changed files with 55 additions and 0 deletions
1
.gear/rules
Normal file
1
.gear/rules
Normal file
|
|
@ -0,0 +1 @@
|
|||
tar: @name@
|
||||
54
lk-jwt-service.spec
Normal file
54
lk-jwt-service.spec
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
Name: lk-jwt-service
|
||||
Version: 0.4.1
|
||||
Release: alt1%{?dist}
|
||||
Summary: Minimal service to issue LiveKit JWTs for MatrixRTC
|
||||
|
||||
License: AGPL-3.0-only
|
||||
URL: https://github.com/element-hq/lk-jwt-service
|
||||
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
|
||||
|
||||
# Vendored Go modules (directory "vendor/"), generated once with:
|
||||
# tar -xzf v%{version}.tar.gz
|
||||
# cd %{name}-%{version}
|
||||
# GOTOOLCHAIN=local go mod vendor
|
||||
# cd ..
|
||||
# tar -cJf %{name}-%{version}-vendor.tar.xz %{name}-%{version}/vendor
|
||||
Source1: %{name}-%{version}-vendor.tar.xz
|
||||
|
||||
BuildRequires: golang >= 1.23
|
||||
Requires: ca-certificates
|
||||
|
||||
%description
|
||||
MatrixRTC Authorization Service: issues LiveKit JWTs for MatrixRTC clients.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
# unpack vendored modules to avoid network during build
|
||||
tar -xf %{SOURCE1}
|
||||
|
||||
%build
|
||||
# go.mod contains a "toolchain ..." directive; force using local Go toolchain (no auto-download)
|
||||
export GOTOOLCHAIN=local
|
||||
export GOPATH=%{_builddir}/%{name}-%{version}/_gopath
|
||||
export GOCACHE=%{_builddir}/%{name}-%{version}/_gocache
|
||||
|
||||
go build -trimpath -buildmode=pie -mod=vendor -o %{name} .
|
||||
|
||||
%check
|
||||
export GOTOOLCHAIN=local
|
||||
export GOPATH=%{_builddir}/%{name}-%{version}/_gopath
|
||||
export GOCACHE=%{_builddir}/%{name}-%{version}/_gocache
|
||||
|
||||
go test -mod=vendor ./...
|
||||
|
||||
%install
|
||||
install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
%files
|
||||
%license LICENSE LICENSE-COMMERCIAL
|
||||
%doc README.md
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 23 2026 Your Name <romenskiy2012@altlinux.ru> - 0.4.1-alt1
|
||||
- Initial package
|
||||
Loading…
Add table
Add a link
Reference in a new issue