mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-26 21:38:27 +00:00
add: anda subatomic (#374)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "rust-anda.spec"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
# Generated by rust2rpm 22
|
||||
%bcond_without check
|
||||
%define debug_package %{nil}
|
||||
|
||||
%global crate anda
|
||||
|
||||
Name: rust-anda
|
||||
Version: 0.1.16
|
||||
Release: 1%{?dist}
|
||||
Summary: Andaman Build toolchain
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/anda
|
||||
Source: https://github.com/FyraLabs/anda/archive/refs/tags/%{version}.tar.gz
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: rust-packaging >= 21
|
||||
BuildRequires: anda-srpm-macros
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: git-core
|
||||
|
||||
Requires: mock
|
||||
Requires: rpm-build
|
||||
Requires: createrepo_c
|
||||
Requires: git-core
|
||||
%global _description %{expand:
|
||||
Andaman Build toolchain.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
%{_bindir}/anda
|
||||
%{_mandir}/man1/anda*.1*
|
||||
%{_sysconfdir}/bash_completion.d/anda.bash
|
||||
%{_datadir}/zsh/site-functions/_anda
|
||||
%{_datadir}/fish/completions/anda.fish
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%cargo_prep_online
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
cargo run --release -p xtask -- manpage
|
||||
cargo run --release -p xtask -- completion
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
mkdir -p %{buildroot}%{_mandir}/man1/
|
||||
|
||||
# Install shell completions
|
||||
|
||||
COMPDIR="target/assets/completion"
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||
cp -v $COMPDIR/bash/anda.bash %{buildroot}%{_sysconfdir}/bash_completion.d/anda.bash
|
||||
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions/
|
||||
cp -v $COMPDIR/zsh/_anda %{buildroot}%{_datadir}/zsh/site-functions/_anda
|
||||
mkdir -p %{buildroot}%{_datadir}/fish/completions/
|
||||
cp -v $COMPDIR/fish/anda.fish %{buildroot}%{_datadir}/fish/completions/anda.fish
|
||||
|
||||
# install man pages
|
||||
cp -v target/assets/man_pages/* %{buildroot}%{_mandir}/man1/
|
||||
|
||||
|
||||
rm -rf %{buildroot}%{cargo_registry}
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1 @@
|
||||
rpm.version(gh("FyraLabs/anda"));
|
||||
@@ -0,0 +1,5 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "subatomic.spec"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
%define debug_package %{nil}
|
||||
%define _build_id_links none
|
||||
%global commit 200283ccd3cf7c90b6a9be565ce6ff52bdec977e
|
||||
|
||||
Name: subatomic
|
||||
Version: 0.1.0.%{commit}
|
||||
Release: 1%{?dist}
|
||||
Summary: A modern package delivery system
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/FyraLabs/subatomic
|
||||
Source0: https://github.com/FyraLabs/subatomic/archive/%{commit}.zip
|
||||
|
||||
BuildRequires: go-rpm-macros
|
||||
BuildRequires: git-core
|
||||
BuildRequires: ostree-devel
|
||||
Requires: ostree
|
||||
Requires: createrepo_c
|
||||
|
||||
%description
|
||||
Subatomic is a package delivery system which supports multiple package formats.
|
||||
It manages a repository of packages, handling updating, signing, and other tasks.
|
||||
|
||||
%package cli
|
||||
Summary: Client for Subatomic repo manager
|
||||
|
||||
%description cli
|
||||
Client for Subatomic repo manager
|
||||
|
||||
%files cli
|
||||
%{_bindir}/subatomic-cli
|
||||
|
||||
%prep
|
||||
%autosetup -n subatomic-%{commit}
|
||||
|
||||
|
||||
%build
|
||||
|
||||
mkdir -p build/bin
|
||||
go build -v -o build/bin/subatomic-cli ./subatomic-cli
|
||||
go build -v -o build/bin/subatomic ./server
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}/
|
||||
install -pm 755 build/bin/subatomic-cli %{buildroot}%{_bindir}/
|
||||
install -pm 755 build/bin/subatomic %{buildroot}%{_bindir}/
|
||||
|
||||
|
||||
%files
|
||||
%{_bindir}/subatomic
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 30 2022 Cappy Ishihara <cappy@cappuchino.xyz>
|
||||
- Intial release
|
||||
@@ -0,0 +1,2 @@
|
||||
let sha = get("https://api.github.com/repos/FyraLabs/subatomic/commits").json_arr()[0].sha;
|
||||
rpm.global("commit", sha);
|
||||
Reference in New Issue
Block a user