projects/aports·blob master · refs

49 lines · 1.3 KiB

1# Contributor: qaqland <[email protected]>
2# Maintainer: qaqland <[email protected]>
3pkgname=dnote
4pkgver=0.16.0
5pkgrel=6
6pkgdesc="A simple command line notebook for programmers (cli)"
7url="https://www.getdnote.com/"
8arch="all !armhf !armv7 !x86" # no 32 support
9license="Apache-2.0"
10makedepends="go"
11checkdepends="bash"
12options="net"
13subpackages="
14 $pkgname-doc
15 $pkgname-bash-completion
16 $pkgname-zsh-completion
17 "
18source="$pkgname-$pkgver.tar.gz::https://github.com/dnote/dnote/archive/refs/tags/cli-v$pkgver.tar.gz"
19builddir="$srcdir/$pkgname-cli-v$pkgver"
20
21# upstream's makefile is made for github release, only need build here
22build() {
23 local ldflags="-X main.apiEndpoint=https://api.getdnote.com \
24 -X main.versionTag=$pkgver"
25 go build \
26 -ldflags "$ldflags" \
27 -tags "fts5" \
28 -o build/cli \
29 ./pkg/cli
30}
31
32check() {
33 make test-cli
34}
35
36package() {
37 install -Dm755 build/cli "$pkgdir"/usr/bin/dnote
38
39 install -Dm644 README.md LICENSE -t "$pkgdir"/usr/share/doc/dnote/
40
41 install -Dm644 pkg/cli/dnote-completion.bash \
42 "$pkgdir"/usr/share/bash-completion/completions/dnote
43 install -Dm644 pkg/cli/dnote-completion.zsh \
44 "$pkgdir"/usr/share/zsh/site-functions/_dnote
45}
46
47sha512sums="
484a849de4f613f1014994a06eeacb57716203aafea3246f82d0784708329b3c3c7656a348ba28a6b49d3be47eb86956e99ea36990a5ada1d78bf7b15a36820354 dnote-0.16.0.tar.gz
49"