summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian2020-10-02 12:29:58 +0200
committerAlexander Sulfrian2020-10-02 12:29:58 +0200
commit88a778cacebfa356d2bc17ef00b546fd6f9017a0 (patch)
tree76068c6ae648a86c69e2b14450e6ce33796b9921
parent984969eb87d9b648fb56bdb21a9790308a138d1e (diff)
downloadaur-dbus-go.tar.gz
Fix go build
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD39
2 files changed, 12 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 949dde9301e4..951bd9d4c8fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dbus-go
pkgdesc = Native Go bindings for D-Bus
pkgver = 5.0.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/godbus/dbus
arch = x86_64
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index f3d352e4f71f..f190e813986b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,32 @@
# Maintainer: Alexander Sulfrian <asulfrian at zedat dot fu-berlin dot de>
_pkgname=dbus
-_gourl="github.com/godbus/dbus"
-
pkgname="$_pkgname-go"
+
pkgver=5.0.3
-pkgrel=1
+pkgrel=2
pkgdesc="Native Go bindings for D-Bus"
arch=('x86_64' 'i686')
-url="https://$_gourl"
+url="https://github.com/godbus/dbus"
license=('BSD')
depends=('go')
options=('!strip' '!emptydirs')
-source=("https://$_gourl/archive/v$pkgver.tar.gz")
+source=("https://github.com/godbus/dbus/archive/v$pkgver.tar.gz")
sha256sums=('49d27bde2861f5e5ab4195fddc5f38f25324aac3b32b3cc03e712cca3d2b75fa')
-
-build() {
- godir="$srcdir/src/$_gourl"
-
- test -d "$godir/" && rm -rf "$godir/"
- mkdir -p "$(dirname "$godir")"
- mv "$_pkgname-$pkgver" "$godir/"
- cd "$godir/"
-
- GOPATH="$srcdir" go get -fix -v ./...
-}
-
-check() {
- cd "src/$_gourl"
-
- GOPATH="$srcdir" go test -v
+heck() {
+ cd "${_pkgname}-${pkgver}"
+ go test -v ./...
}
package() {
- GOPATH="usr/lib/go/"
-
- mkdir -p "$pkgdir/$GOPATH"
- cp -Rv --preserve=timestamps "$srcdir/"{src,pkg} "$pkgdir/$GOPATH"
+ mkdir -p "$pkgdir/usr/share/gocode/src/github.com/godbus/"
+ cp -a --preserve=timestamps "${_pkgname}-${pkgver}" "$pkgdir/usr/share/gocode/src/github.com/godbus/dbus"
# Package license (if available)
for f in LICENSE COPYING LICENSE.* COPYING.*; do
- if [ -e "$srcdir/src/$_gourl/$f" ]; then
- install -Dm644 "$srcdir/src/$_gourl/$f" \
- "$pkgdir/usr/share/licenses/$pkgname/$f"
+ if [ -e "${_pkgname}-${pkgver}/$f" ]; then
+ install -Dm644 "${_pkgname}-${pkgver}/$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
fi
done
}