aports/testing/dnote/APKBUILD

50 lines
1.3 KiB
Plaintext

# Contributor: qaqland <qaq@qaq.land>
# Maintainer: qaqland <qaq@qaq.land>
pkgname=dnote
pkgver=0.16.0
pkgrel=0
pkgdesc="A simple command line notebook for programmers (cli)"
url="https://www.getdnote.com/"
arch="all !armhf !armv7 !x86" # no 32 support
license="Apache-2.0"
makedepends="go"
checkdepends="bash"
options="net"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
"
source="$pkgname-$pkgver.tar.gz::https://github.com/dnote/dnote/archive/refs/tags/cli-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-cli-v$pkgver"
# upstream's makefile is made for github release, only need build here
build() {
local ldflags="-X main.apiEndpoint=https://api.getdnote.com \
-X main.versionTag=$pkgver"
go build \
-ldflags "$ldflags" \
-tags "fts5" \
-o build/cli \
./pkg/cli
}
check() {
make test-cli
}
package() {
install -Dm755 build/cli "$pkgdir"/usr/bin/dnote
install -Dm644 README.md LICENSE -t "$pkgdir"/usr/share/doc/dnote/
install -Dm644 pkg/cli/dnote-completion.bash \
"$pkgdir"/usr/share/bash-completion/completions/dnote
install -Dm644 pkg/cli/dnote-completion.zsh \
"$pkgdir"/usr/share/zsh/site-functions/_dnote
}
sha512sums="
4a849de4f613f1014994a06eeacb57716203aafea3246f82d0784708329b3c3c7656a348ba28a6b49d3be47eb86956e99ea36990a5ada1d78bf7b15a36820354 dnote-0.16.0.tar.gz
"