blob: 67c8508068c48ffde6fc6606daedcd1ff98a0bf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Maintainer: Klaus Alexander Seistrup <klaus@seistrup.dk>
# -*- mode: sh -*-
pkgname=fuzzynote
pkgver=0.25.5
pkgrel=2
_pkgdate=1669972080
pkgdesc='Terminal-based, CRDT-backed, local-first, collaborative note-taking'
arch=('x86_64')
url='https://github.com/Sambigeara/fuzzynote'
# SPDX-License-Identifier: AGPL-3.0-or-later
license=('AGPL-3.0-or-later')
makedepends=('go')
provides=('fuzzynote')
conflicts=('fuzzynote')
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/Sambigeara/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
)
prepare() {
cd "$pkgname-$pkgver"
go mod tidy
}
build() {
cd "$pkgname-$pkgver"
# RFC-0023
# 🔗 https://rfc.archlinux.page/0023-pack-relative-relocs/
#
# ld(1) says: “Supported for i386 and x86-64.”
case "${CARCH:-unknown}" in
'x86_64' | 'i386' )
export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
;;
* ) : pass ;;
esac
# https://wiki.archlinux.org/title/Go_package_guidelines
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
go build \
-buildmode=pie \
-trimpath \
-ldflags="-linkmode=external -X main.version=$pkgver -X main.date=$_pkgdate" \
-mod=readonly \
-modcacherw \
-o bin/fzn ./cmd/term
}
package() {
cd "$pkgname-$pkgver"
install -Dm0755 bin/fzn "$pkgdir/usr/bin/fzn"
install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
sha256sums=(
'342d92973ac0f06a7cda5cdda1049cc7b295478ecfcc7af550ea8c47ecf164c8'
)
b2sums=(
'a34c11c62f7c72ef72e39ae8e8ccbf8ddb5be5f73f9e574c7102aa9002651b6a8da80cd140757775e99bcb20a511f4a300c4d454b2e6645429309900afb46ae7'
)
# eof
|