[arch-commits] Commit in gx/trunk (PKGBUILD)

Johannes Löthberg demize at archlinux.org
Sat May 26 22:08:57 UTC 2018


    Date: Saturday, May 26, 2018 @ 22:08:55
  Author: demize
Revision: 331294

Build from source instead

Modified:
  gx/trunk/PKGBUILD

----------+
 PKGBUILD |   37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-05-26 22:08:40 UTC (rev 331293)
+++ PKGBUILD	2018-05-26 22:08:55 UTC (rev 331294)
@@ -7,19 +7,38 @@
 
 pkgdesc="Packaging tool built around the distributed, content addressed filesystem IPFS"
 url="https://github.com/whyrusleeping/gx"
-arch=('i686' 'x86_64')
+arch=('x86_64')
 license=('MIT')
 
-depends=('glibc')
-optdepends=('gx-go: gx packaging module for go')
+makedepends=('git' 'go-pie')
+optdepends=('gx-go: gx packaing module for go')
 
-_srcroot="https://ipfs.io/ipns/dist.ipfs.io"
-source_x86_64=("$_srcroot/gx/v$pkgver/gx_v${pkgver}_linux-amd64.tar.gz")
-source_i686=("$_srcroot/gx/v$pkgver/gx_v${pkgver}_linux-386.tar.gz")
+source=("git+https://github.com/whyrusleeping/gx.git#tag=v$pkgver")
+md5sums=('SKIP')
 
-sha512sums_i686=('4102815ec8743bfd6221122d2b4578762d320450051cf5fa8965b3729af99fb1f927e04b955d06f21760540c90bc80d8bb6363b6f8b3a7391cc10555d9e76fa0')
-sha512sums_x86_64=('ebd529695d0b31d6e26d224b2a01d1b79b9f3b158b6d7954ca1e00d10a0c754f6c5c3b2814fe1727faa5690d41dd96de98f2f0626b2469a4f96c982558a34afa')
+prepare() {
+  mkdir -p "$srcdir"/src/github.com/whyrusleeping/
+  ln -fs "$srcdir/gx" "$srcdir"/src/github.com/whyrusleeping/gx
+}
 
+build() {
+  # Required for go get
+  export GOPATH="$srcdir"
+  export GOBIN="$GOPATH/bin"
+  cd "$srcdir"/src/github.com/whyrusleeping/gx
+
+  msg2 'Installing dependencies...'
+  go get -v
+
+  msg2 'Building binary...'
+  go install -v
+}
+
 package() {
-  install -Dm 755 gx/gx "$pkgdir"/usr/bin/gx
+  msg2 'Packaging binary...'
+  install -Dm 755 bin/gx "${pkgdir}/usr/bin/gx"
+
+  msg2 'Packaging auxiliary files...'
+  cd gx
+  install -Dm 644 -t "${pkgdir}/usr/share/licenses/gx" LICENSE
 }



More information about the arch-commits mailing list