summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortxtsd2023-02-11 20:45:02 +0530
committertxtsd2023-02-11 20:45:02 +0530
commit343a40b771f5728d57375695b6061950f716e0be (patch)
tree911f87dab6128da6abfb70696b6baf80a8a7be90
parent41daf88a5b05d6c19be287207aefe5efae51f9ec (diff)
downloadaur-343a40b771f5728d57375695b6061950f716e0be.tar.gz
upgpkg: gtkcord4-git r176.e20b928-1
Adhere to Arch Go package guidelines Signed-off-by: txtsd <code@ihavea.quest>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD24
2 files changed, 13 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6f73446e2de1..0d3ca2424c11 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gtkcord4-git
pkgdesc = Discord client written in go and gtk4
- pkgver = r162.70a823b
+ pkgver = r176.e20b928
pkgrel = 1
url = https://github.com/diamondburned/gtkcord4
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 5b9f75decca1..6115eb0d2c1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=gtkcord4-git
_pkgname=gtkcord4
-pkgver=r162.70a823b
+pkgver=r176.e20b928
pkgrel=1
pkgdesc='Discord client written in go and gtk4'
arch=('x86_64' 'aarch64')
@@ -20,25 +20,25 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "${_pkgname}"
+ mkdir -p build
+}
+
build() {
- # add config flags per https://wiki.archlinux.org/index.php/Go_package_guidelines
+ cd "${_pkgname}"
+ # https://wiki.archlinux.org/index.php/Go_package_guidelines
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
- export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
-
- # check if user has already set their GoLang path
- if [[ -z "${GOPATH}" ]]; then
- export GOPATH="${srcdir}/go"
- fi
- cd "${_pkgname}"
- go mod tidy
- go build -trimpath
+ export GOPATH="${srcdir}/go"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build
}
package() {
- cd "${_pkgname}"
+ cd "${_pkgname}/build"
install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
install -Dm644 "${srcdir}/${_pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
sed -i "s/Chat;/Chat;InstantMessaging;/" "${srcdir}/${_pkgname}/nix/xyz.diamondb.gtkcord4.desktop"