Package Details: gomp-git r388.2432714-1

Git Clone URL: https://aur.archlinux.org/gomp-git.git (read-only, click to copy)
Package Base: gomp-git
Description: MPD client inspired by ncmpcpp written in GO.
Upstream URL: https://github.com/aditya-K2/gomp
Keywords: mpd music tui tui-music
Licenses: GPL3
Submitter: aditya-K2
Maintainer: aditya-K2
Last Packager: aditya-K2
Votes: 0
Popularity: 0.000000
First Submitted: 2021-12-16 19:56 (UTC)
Last Updated: 2024-06-30 14:08 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

lmartinez-mirror commented on 2021-12-16 20:19 (UTC)

I quickly wrote up a patch to address several things in the PKGBUILD.

diff --git a/PKGBUILD b/PKGBUILD
index 8baa1b9..3d7ebe3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,40 @@
 # Maintainer: aditya-K2 <adityakurdunkar2@gmail.com>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+
 pkgname=gomp-git
-pkgver=0.1
+pkgver=r196.0db49ca
 pkgrel=1
-pkgdesc='MPD client inspired by ncmpcpp written in GO.'
-arch=('any')
+pkgdesc='MPD client inspired by ncmpcpp'
+arch=('x86_64')
 url="https://github.com/aditya-K2/gomp"
-license=('GPL')
-makedepends=('go')
-source=("https://github.com/aditya-K2/gomp/archive/refs/heads/master.zip")
+license=('GPL3')
+depends=('glibc')
+makedepends=('git' 'go')
+source=("$pkgname::git+$url")
 sha256sums=('SKIP')

+pkgver() {
+   cd "$pkgname"
+   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+   cd "$pkgname"
+   mkdir -p build
+}
+
 build() {
-    cd "${pkgname%-git}-master"
-    go build
+   export CGO_CPPFLAGS="${CPPFLAGS}"
+   export CGO_CFLAGS="${CFLAGS}"
+   export CGO_CXXFLAGS="${CXXFLAGS}"
+   export CGO_LDFLAGS="${LDFLAGS}"
+   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+   cd "$pkgname"
+   go build -o build
 }

 package() {
-    cd "${pkgname%-git}-master"
-    install -Dm 655 gomp -t "${pkgdir}/usr/bin"
+   cd "$pkgname"
+   install -D build/gomp -t "$pkgdir/usr/bin/"
 }

micwoj92 commented on 2021-12-16 20:07 (UTC)

also it needs to download git repo, not zipped files.

lmartinez-mirror commented on 2021-12-16 20:04 (UTC)

If this is a git package, it needs a pkgver() for auto-updating.

See here:

https://wiki.archlinux.org/title/Arch_package_guidelines

https://wiki.archlinux.org/title/Go_package_guidelines

https://wiki.archlinux.org/title/VCS_package_guidelines