summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNarrat2020-01-18 01:25:59 +0100
committerNarrat2020-01-18 01:25:59 +0100
commitd49bf8402b581a76198c5bd8f2ab5d4913b5c4c9 (patch)
tree3035119266677f3380129fe7d20f1ba4647b352e /PKGBUILD
parent8d45dbfb3a0e085d6b67e75b60431647183d3dd3 (diff)
downloadaur-python-gyb-git.tar.gz
add git to makedeps and move sed into prepare()
Dunno if this package works. Just wanted to address the missing makedep
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 19 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index df887f5d2461..48c95c7661ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,42 @@
-# Maintainer: sqrlfish at gmail dot com
+# Contributor: Lex Black <autumn-wind@web.de>
+# Contributor: sqrlfish at gmail dot com
+
pkgname=python-gyb-git
_pkgname=got-your-back
-pkgver=1.0.r16.g07ff2da
-pkgrel=11
+pkgver=1.34.r0.g79f3da5
+pkgrel=1
pkgdesc="Command line tool for backing up Gmail messages to your computer"
arch=('any')
url="https://github.com/jay0lee/${_pkgname}"
license=('Apache')
-makedepends=('python-setuptools')
+makedepends=('python-setuptools' 'git')
depends=('python>=3.5.0'
- 'python-google-api-python-client'
- )
+ 'python-google-api-python-client')
provides=('gyb')
conflicts=("${_pkgname}")
options=(!emptydirs)
source=("git+https://github.com/jay0lee/${_pkgname}.git")
sha256sums=('SKIP')
+
pkgver() {
cd "$_pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ cd "${_pkgname}"
+ # Gyb uses the executable path for storing both client secrets, configuration
+ # files, and flag files (like nobrowser.txt.) We'll instead use
+ # /usr/share/gyb/ for the static secrets, and the current directory for
+ # anything user-configurable. This makes gyb behave as if the executable was
+ # located in the current working directory, as is described in README.txt
+ sed -i "s/CLIENT_SECRETS = getProgPath()/CLIENT_SECRETS = '\/usr\/share\/gyb\/'/" gyb.py
+ sed -i "s/os\.path\.dirname(os\.path\.realpath(sys\.argv\[0\]))/os\.path\.curdir/" gyb.py
+}
package() {
- cd "${srcdir}/${_pkgname}"
- # Gyb uses the executable path for storing both client secrets, configuration
- # files, and flag files (like nobrowser.txt.) We'll instead use
- # /usr/share/gyb/ for the static secrets, and the current directory for
- # anything user-configurable. This makes gyb behave as if the executable was
- # located in the current working directory, as is described in README.txt
- sed -i "s/CLIENT_SECRETS = getProgPath()/CLIENT_SECRETS = '\/usr\/share\/gyb\/'/" gyb.py
- sed -i "s/os\.path\.dirname(os\.path\.realpath(sys\.argv\[0\]))/os\.path\.curdir/" gyb.py
+ cd "${_pkgname}"
install -D -m755 gyb.py "${pkgdir}/usr/bin/gyb"
install -D -m644 client_secrets.json "${pkgdir}/usr/share/gyb/client_secrets.json"
}