Package Details: kimchi-server-git r27.770d55444e12-3

Git Clone URL: https://aur.archlinux.org/kimchi-server-git.git (read-only, click to copy)
Package Base: kimchi-server-git
Description: A bare-bones HTTP server
Upstream URL: https://sr.ht/~emersion/kimchi
Licenses: MIT
Submitter: emersion
Maintainer: emersion
Last Packager: emersion
Votes: 1
Popularity: 0.83
First Submitted: 2020-12-23 09:09
Last Updated: 2021-02-19 09:48

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

emersion commented on 2021-02-19 09:48

You're right, I misunderstood. Fixed, thanks!

somini commented on 2021-02-18 17:33

The "git" package is also a makedepends in this case.

somini commented on 2021-02-18 16:58

I don't think so.

The Makefile is overriding the GOFLAGS variable here:

https://git.sr.ht/~emersion/kimchi/tree/master/item/Makefile#L7

Maybe this should be sent as a patch on sourcehut, but this works:

diff --git i/Makefile w/Makefile
index 8cacfe9..e5bd959 100644
--- i/Makefile
+++ w/Makefile
@@ -4,7 +4,7 @@
 GO = go
 RM = rm
 SCDOC = scdoc
-GOFLAGS =
+GOFLAGS := $(GOFLAGS)
 PREFIX = /usr/local
 BINDIR = $(PREFIX)/bin
 MANDIR = $(PREFIX)/share/man

emersion commented on 2021-02-18 16:53

@somini Hm, this doesn't seem to match the wiki:

https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options

Should the wiki page be updated?

somini commented on 2021-02-18 16:51

The Makefile adds its own Go flags, so the PKGBUILD flags from the environment variable are ignored, they should be moved to makefile variables.

This removes the "Package contains reference to $srcdir" warning.

Here's a patch:

diff --git i/PKGBUILD w/PKGBUILD
index 2ef51d3..bf20eb0 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -26,8 +26,8 @@ build() {
   export CGO_CFLAGS="${CFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
   export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
-  make
+
+  make GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
 }

 check() {