mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-22 17:32:43 +00:00
- Fixes https://github.com/termux/termux-packages/issues/28526 - These were erroneously dropped in #27576 - `dnote-server` was also missing a `TERMUX_PKG_AUTO_UPDATE=true` - `dnote` uses the repository tags starting with `cli-v` - `dnote-server` uses the repository tags starting with `server-v` - both should not auto update to release candidate versions - `dnote-server` version 3.0.0 has the Apache 2.0 license instead of the AGPLV3 license, so update the `build.sh` licensing code to prepare for the successful auto update to version 3.0.0 %ci:no-build
31 lines
1.1 KiB
Bash
31 lines
1.1 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://www.getdnote.com/
|
|
TERMUX_PKG_DESCRIPTION="A simple command line notebook for programmers"
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
|
TERMUX_PKG_MAINTAINER="Ravener <ravener.anime@gmail.com>"
|
|
TERMUX_PKG_VERSION="1:0.16.0"
|
|
TERMUX_PKG_SRCURL="https://github.com/dnote/dnote/archive/refs/tags/cli-v${TERMUX_PKG_VERSION:2}.tar.gz"
|
|
TERMUX_PKG_SHA256=fb63c6099ca441a2027a9e8ae2a3c38376e5c0950bef9e8028b96ca2b8b6427f
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_UPDATE_VERSION_REGEXP="cli-v\d+\.\d+\.\d+(?!-)"
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
TERMUX_PKG_BREAKS=dnote-client
|
|
TERMUX_PKG_REPLACES=dnote-client
|
|
|
|
termux_step_pre_configure() {
|
|
termux_setup_golang
|
|
go mod download
|
|
}
|
|
|
|
termux_step_make() {
|
|
cd "$TERMUX_PKG_SRCDIR"
|
|
go build -o dnote -ldflags "-X main.versionTag=${TERMUX_PKG_VERSION:2}" -tags fts5 pkg/cli/main.go
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
install -Dm700 $TERMUX_PKG_SRCDIR/dnote $TERMUX_PREFIX/bin/dnote
|
|
install -Dm600 "$TERMUX_PKG_SRCDIR"/pkg/cli/dnote-completion.bash \
|
|
"$TERMUX_PREFIX"/share/bash-completion/completions/dnote
|
|
install -Dm600 "$TERMUX_PKG_SRCDIR"/pkg/cli/dnote-completion.zsh \
|
|
"$TERMUX_PREFIX"/share/zsh/site-functions/_dnote
|
|
}
|