new package: hut

This commit is contained in:
Tee KOBAYASHI 2022-03-31 08:45:45 +09:00 committed by xtkoba
parent 02dd1a4391
commit 47649e558b
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,28 @@
--- a/Makefile
+++ b/Makefile
@@ -18,16 +18,19 @@
hut:
$(GO) build $(GOFLAGS)
+hut-build:
+ CC=gcc CFLAGS= LDFLAGS= GOOS= GOARCH= $(GO) build $(GOFLAGS) -o $@
+
completions: hut.bash hut.zsh hut.fish
-hut.bash: hut
- ./hut completion bash >hut.bash
+hut.bash: hut-build
+ ./hut-build completion bash >hut.bash
-hut.zsh: hut
- ./hut completion zsh >hut.zsh
+hut.zsh: hut-build
+ ./hut-build completion zsh >hut.zsh
-hut.fish: hut
- ./hut completion fish >hut.fish
+hut.fish: hut-build
+ ./hut-build completion fish >hut.fish
doc/hut.1: doc/hut.1.scd
$(SCDOC) <doc/hut.1.scd >doc/hut.1

16
packages/hut/build.sh Normal file
View File

@ -0,0 +1,16 @@
TERMUX_PKG_HOMEPAGE=https://git.sr.ht/~emersion/hut
TERMUX_PKG_DESCRIPTION="A CLI tool for sr.ht"
TERMUX_PKG_LICENSE="AGPL-V3"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.1.0
TERMUX_PKG_SRCURL=https://git.sr.ht/~emersion/hut/refs/download/v${TERMUX_PKG_VERSION}/hut-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=0b1ec695fa670f5df9594e4fdfc51b2e62f16797c5ef9ab27283310badd6f065
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX"
termux_step_pre_configure() {
termux_setup_golang
go mod init || :
go mod tidy
}