summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraditya-K22021-12-17 02:19:24 +0530
committeraditya-K22021-12-17 02:21:18 +0530
commit64c6baa68923c4fef9915088972afe0267664c28 (patch)
tree37f1b133c25b07e7420454f51c8e46664d2ae22c
parent301ac8cabd2d9ec0c9a59d5c1b0436b35c8edffd (diff)
downloadaur-64c6baa68923c4fef9915088972afe0267664c28.tar.gz
Making the changes that were suggested in diff
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD26
2 files changed, 21 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 69e3462a5502..3e0058546d68 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,10 +3,11 @@ pkgbase = gomp-git
pkgver = r196.0db49ca
pkgrel = 1
url = https://github.com/aditya-K2/gomp
- arch = any
- license = GPL
+ arch = x86_64
+ license = GPL3
+ makedepends = git
makedepends = go
- source = git+https://github.com/aditya-K2/gomp/
+ source = gomp-git::git+https://github.com/aditya-K2/gomp
sha256sums = SKIP
pkgname = gomp-git
diff --git a/PKGBUILD b/PKGBUILD
index ef27db93c758..7a6ad4b79820 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,34 @@
# Maintainer: aditya-K2 <adityakurdunkar2@gmail.com>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+
pkgname=gomp-git
pkgver=r196.0db49ca
pkgrel=1
pkgdesc='MPD client inspired by ncmpcpp written in GO.'
-arch=('any')
+arch=('x86_64')
url="https://github.com/aditya-K2/gomp"
-license=('GPL')
-makedepends=('go')
-source=("git+https://github.com/aditya-K2/gomp/")
+license=('GPL3')
+makedepends=('git' 'go')
+source=("$pkgname::git+$url")
sha256sums=('SKIP')
pkgver() {
- cd "${pkgname%-git}"
+ 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}"
- go build
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ cd "$pkgname"
+ go build -o build
}
package() {
- cd "${pkgname%-git}"
- install -Dm 655 gomp -t "${pkgdir}/usr/bin"
+ cd "$pkgname"
+ install -D build/gomp -t "$pkgdir/usr/bin/"
}