summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Pavlica2020-06-19 17:53:53 +0200
committerNikola Pavlica2020-06-19 17:53:53 +0200
commitaff9d5d58a7a075e47ca6cdd05e0764b6cbfd4ab (patch)
treebd503ad081406080c07887b1b1c8ba2d08119e42
parent0b2c95722a50b0d97c65294e77c73eacb5c3339b (diff)
downloadaur-aff9d5d58a7a075e47ca6cdd05e0764b6cbfd4ab.tar.gz
[fix] add fixes suggested by @katt on AUR
-rw-r--r--.SRCINFO4
-rwxr-xr-xPKGBUILD21
2 files changed, 17 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 13d56c776a9..b6f2c71c167 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gtkcord3
pkgdesc = Discord client written in go and gtk3
pkgver = 0.0.4
- pkgrel = 3
+ pkgrel = 1
url = https://github.com/diamondburned/gtkcord3
arch = any
license = GPL3
@@ -10,8 +10,6 @@ pkgbase = gtkcord3
depends = gtk3
depends = libhandy
depends = discordlogin-git
- provides = gtkcord3
- conflicts = gtkcord3-git
source = https://github.com/diamondburned/gtkcord3/archive/v0.0.4.tar.gz
source = gtkcord3.desktop
sha256sums = 704c623393d79cc8abb68ac59a5b243576df6857626276ec3fdf15fc9b7c753f
diff --git a/PKGBUILD b/PKGBUILD
index d8b4648b6a5..7034f2e3bf5 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,41 @@
pkgname=gtkcord3
pkgver=0.0.4
-pkgrel=3
+pkgrel=1
pkgdesc='Discord client written in go and gtk3'
arch=('any')
url='https://github.com/diamondburned/gtkcord3'
license=('GPL3')
depends=('gtk3' 'libhandy' 'discordlogin-git')
-provides=('gtkcord3')
-conflicts=('gtkcord3-git')
makedepends=('git' 'go')
+
source=('https://github.com/diamondburned/gtkcord3/archive/v0.0.4.tar.gz'
'gtkcord3.desktop')
sha256sums=('704c623393d79cc8abb68ac59a5b243576df6857626276ec3fdf15fc9b7c753f'
'8839b86e0a4174d5b5f3f7aa1248ee6af26901e4b5d4e749088444e1861982a4')
build() {
+ # add config flags as per 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 -mod=readonly -modcacherw"
+
# check if user has already set their GoLang path
if [[ -z "${GOPATH}" ]]; then
export GOPATH="${srcdir}/go"
fi
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
go build -trimpath
}
+check() {
+ cd "$pkgname-$pkgver"
+ go test
+}
+
package() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"