summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 18 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 76e21cca7618..3b0363a2345b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,26 +4,35 @@
pkgname='mycorrhiza'
pkgver=1.14.0
-pkgrel=1
+pkgrel=2
pkgdesc='Filesystem and git-based wiki engine written in Go using mycomarkup'
-arch=('x86_64' 'armv7h')
+arch=('aarch64' 'armv7h' 'x86_64')
url="https://codeberg.org/bouncepaw/$pkgname"
license=('AGPL3')
depends=('git' 'glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-provides=('mycorrhiza')
-conflicts=('mycorrhiza')
+options=('lto')
-build() {
- cd "$pkgname" || exit 1
+prepare() {
+ cd "$pkgname"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
+ mkdir -p build
go mod tidy
+}
+
+build() {
+ cd "$pkgname"
+
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
go build \
-buildmode=pie \
@@ -31,13 +40,14 @@ build() {
-ldflags="-linkmode=external -X main.version=$pkgver" \
-mod=readonly \
-modcacherw \
+ -o build \
.
}
package() {
- cd "$pkgname" || exit 1
+ cd "$pkgname"
- install -Dm0755 "mycorrhiza" "$pkgdir/usr/bin/mycorrhiza"
+ install -Dm0755 "build/mycorrhiza" "$pkgdir/usr/bin/mycorrhiza"
install -Dm0644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm0644 "help/mycorrhiza.1" "$pkgdir/usr/share/man/man1/mycorrhiza.1"
}
@@ -45,9 +55,6 @@ package() {
sha256sums=(
'bab2b7c18c00053404edadea0aed24f5ef383ccd876ee472810d9530b8854573'
)
-sha512sums=(
- '9e52821db79ac15f309a376b7abe2001e7f214e9ce8e4cbabd1e80db4c37e7fdfd55b416ce9f90c673ac40b5c0fbc6d0777e253f8d92acccb0926e8d2d698818'
-)
b2sums=(
'3c2b78d28130b5b23bc2c456a771ddfd9202ea80d7ce68bcb98b7721d787bfc0357052fcb189bc936e50e8c152124f6ddd4ec62efa52315f85e08434cc39ab7e'
)