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

Morten Linderud foxboron at archlinux.org
Sat May 9 14:28:56 UTC 2020


    Date: Saturday, May 9, 2020 @ 14:28:55
  Author: foxboron
Revision: 625964

upgpkg: rclone 1.51.0-4

Removed go get usage and updated to current guidelines

Modified:
  rclone/trunk/PKGBUILD

----------+
 PKGBUILD |   37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-09 14:18:51 UTC (rev 625963)
+++ PKGBUILD	2020-05-09 14:28:55 UTC (rev 625964)
@@ -1,8 +1,9 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
 
 pkgname=rclone
 pkgver=1.51.0
-pkgrel=3
+pkgrel=4
 pkgdesc="Sync files to and from Google Drive, S3, Swift, Cloudfiles, Dropbox and Google Cloud Storage"
 arch=('x86_64')
 url="https://rclone.org/"
@@ -9,40 +10,38 @@
 license=('MIT')
 depends=('glibc')
 optdepends=('fuse2: for rclone mount')
-makedepends=('python' 'pandoc' 'go-pie' 'git')
+makedepends=('python' 'pandoc' 'go' 'git')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/rclone/rclone/archive/v$pkgver.tar.gz")
 sha512sums=('b0881e09b75093abe4d31e95425a90513aed4a16d9e2dbf79023c9dc68875b90a1332204879530c450a16ab9cac475d967f7657d6f810a1e0f0d84b88d7de916')
 
 prepare() {
-  cd rclone-$pkgver
-
+  cd "rclone-$pkgver"
   sed -i "1s/python$/&2/" bin/make_manual.py bin/make_backend_docs.py
-
-  mkdir -p .gopath/src/github.com/rclone
-  ln -sf "$PWD" .gopath/src/github.com/rclone/rclone
-  export GOPATH="$PWD/.gopath"
-
-  go get github.com/rclone/rclone
 }
 
 build() {
-  cd rclone-$pkgver/.gopath/src/github.com/rclone/rclone
+  cd "rclone-$pkgver"
+  
+  export GOFLAGS="-buildmode=pie -trimpath"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CPPFLAGS="${CPPFLAGS}"
 
-  PATH="$GOPATH/bin:$PATH" make TAG=v$pkgver rclone rclone.1 MANUAL.html MANUAL.txt
-
-  ./rclone genautocomplete bash rclone.bash_completion
-  ./rclone genautocomplete zsh rclone.zsh_completion
+  PATH=".:$PATH" make TAG=v$pkgver rclone rclone.1 MANUAL.html MANUAL.txt
+ ./rclone genautocomplete bash rclone.bash_completion
+ ./rclone genautocomplete zsh rclone.zsh_completion
 }
 
 check() {
-  cd rclone-$pkgver/.gopath/src/github.com/rclone/rclone
-  make TAG=v$pkgver test || warning "Tests failed"
+  cd "rclone-$pkgver"
+  make TAG=v$pkgver test
 }
 
 package() {
-  cd rclone-$pkgver/.gopath/src/github.com/rclone/rclone
-  make TAG=v$pkgver DESTDIR="$pkgdir" install
+  cd "rclone-$pkgver"
 
+  install -Dm755 rclone "$pkgdir"/usr/bin/rclone
+
   install -Dm644 rclone.bash_completion "$pkgdir"/usr/share/bash-completion/completions/rclone
   install -Dm644 rclone.zsh_completion "$pkgdir"/usr/share/zsh/site-functions/_rclone
 



More information about the arch-commits mailing list