summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Klein2015-05-18 10:49:37 +0200
committerPhilipp Klein2015-06-10 19:57:46 +0200
commit0ab6e684b6a0ac422cb8b052afe9dfd53cefe816 (patch)
tree59bed8e08955676746e2b58860120880cb31a7cf
parent053215b9e4b714032322fb1ef8c2f4721bf3cc88 (diff)
downloadaur-0ab6e684b6a0ac422cb8b052afe9dfd53cefe816.tar.gz
Compile gdrive instead of using the prebuilt binaries
- fetch source now via github releases and build it - make more use of variables (e.g. $pkgname intead of a harcoded "gdrive") - drop the LICENSE file since it is provided in the source - bump pkgrel
-rw-r--r--.SRCINFO15
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD31
3 files changed, 26 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 61631592339d..ad74849bb0d0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,16 @@
pkgbase = gdrive
pkgdesc = Command line utility for uploading and downloading single files to your Google Drive
pkgver = 1.6.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/prasmussen/gdrive
- arch = i686
arch = x86_64
+ arch = i686
license = MIT
- source = LICENSE
- sha256sums = 141e360fe52a5f5a873ac9c49a08d2f50bce82212a8c8d6196a91b79820dd717
- source_i686 = gdrive-linux-i686::https://drive.google.com/uc?id=0B3X9GlR6EmbnZ1JESlBlX2s4XzQ
- sha256sums_i686 = ae89a67e35a3426c6ad969c61973b06202a3b23134269bce577c824ea2ad2ccc
- source_x86_64 = gdrive-linux-x86_64::https://drive.google.com/uc?id=0B3X9GlR6EmbnSWFxaExoUEk1NFk
- sha256sums_x86_64 = 52f7a20707e63868b7d1d8a458c1942f876d472f414b982d0f5164458d20bc2a
+ makedepends = git
+ makedepends = go
+ makedepends = mercurial
+ source = https://github.com/prasmussen/gdrive/archive/1.6.1.tar.gz
+ sha256sums = 50d5851c6f6cfa52713c001dae03a2c189ee3d9a255e8bf58ce8d4dadab5b9fc
pkgname = gdrive
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 5d0f9409f564..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2013 Petter Rasmussen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 2d9d9affd091..aae7b7ffce7d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: Philipp Klein <philipptheklein@gmail.com>
pkgname=gdrive
pkgver=1.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="Command line utility for uploading and downloading single files to your Google Drive"
-arch=('i686' 'x86_64')
+arch=('x86_64' 'i686')
url="https://github.com/prasmussen/gdrive"
license=('MIT')
groups=()
depends=()
-makedepends=()
+makedepends=(git go mercurial)
optdepends=()
provides=()
conflicts=()
@@ -17,19 +17,26 @@ backup=()
options=()
install=
changelog=
-source=("LICENSE")
-source_i686=("gdrive-linux-i686::https://drive.google.com/uc?id=0B3X9GlR6EmbnZ1JESlBlX2s4XzQ")
-source_x86_64=("gdrive-linux-x86_64::https://drive.google.com/uc?id=0B3X9GlR6EmbnSWFxaExoUEk1NFk")
+source=("https://github.com/prasmussen/$pkgname/archive/$pkgver.tar.gz")
+sha256sums=('50d5851c6f6cfa52713c001dae03a2c189ee3d9a255e8bf58ce8d4dadab5b9fc')
noextract=()
-sha256sums=('141e360fe52a5f5a873ac9c49a08d2f50bce82212a8c8d6196a91b79820dd717')
-sha256sums_i686=('ae89a67e35a3426c6ad969c61973b06202a3b23134269bce577c824ea2ad2ccc')
-sha256sums_x86_64=('52f7a20707e63868b7d1d8a458c1942f876d472f414b982d0f5164458d20bc2a')
+_gourl="github.com/prasmussen/gdrive"
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ GOPATH="$srcdir" go get -fix -v -x $_gourl
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ GOPATH="$srcdir" go build -o "$srcdir/bin/$pkgname"
+}
package() {
install -dm755 "$pkgdir/usr/bin"
- install -dm755 "$pkgdir/usr/share/licenses/gdrive"
- install -m755 "$srcdir/gdrive-linux-$CARCH" "$pkgdir/usr/bin/gdrive"
- install -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/gdrive"
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ install -m755 "$srcdir/bin/$pkgname" "$pkgdir/usr/bin"
+ install -m644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}
# vim:sw=4:ts=4:et