summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAinola2018-05-21 17:37:49 -0600
committerAinola2018-05-21 17:37:49 -0600
commite3b72a0ea02f0decc7cbb460e7e6cf4b70835183 (patch)
tree2ba3c5e272dc7e059535c354ac18a4c1ff1bb91e
parentc2b41b4fe079e824d8b2562c162351ede41c2fb7 (diff)
downloadaur-e3b72a0ea02f0decc7cbb460e7e6cf4b70835183.tar.gz
on the road to a functioning current version
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD68
-rwxr-xr-xgam.sh2
-rw-r--r--python2.patch6
-rw-r--r--python_utils_import.patch11
5 files changed, 77 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 690a9a51ccc..0ee9d32cfd7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,28 @@
+# Generated by mksrcinfo v8
+# Mon May 21 23:37:25 UTC 2018
pkgbase = gam
- pkgdesc = Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation
- pkgver = 3.51
- pkgrel = 3
+ pkgdesc = Command line tool for Google G Suite Administrators to manage domain and user settings quickly and easily.
+ pkgver = 4.40
+ pkgrel = 1
url = https://github.com/jay0lee/GAM
arch = any
license = Apache
- makedepends = tar gzip
depends = python2
- noextract = v3.51.tar.gz
- source = https://github.com/jay0lee/GAM/archive/v3.51.tar.gz
- source = client_secrets.patch
- md5sums = 0ab658cb70b375a4634d477edcd02123
- md5sums = 89d247a2ab0612c0edf098d0284d9a8b
+ depends = python2-google-api-python-client
+ depends = python2-httplib2
+ depends = python2-simplejson
+ depends = python2-gdata
+ depends = python2-google-auth
+ depends = python2-utils
+ depends = perl-mozilla-ca
+ source = https://github.com/jay0lee/GAM/archive/v4.40.tar.gz
+ source = python2.patch
+ source = python_utils_import.patch
+ source = gam.sh
+ sha256sums = 01ce48e0ac79f35ba6c891e54156c67af232f210e98dea2b3178186659064ee0
+ sha256sums = 417f05ee7da33763f56b7b148f46564859133ececbd5a847cd3396a9802d5944
+ sha256sums = 4ab006cec39b8d2307cd338d6ff09b4621e3a4abcd0e1362f26a47de9539e9db
+ sha256sums = d93809852ef9eefeb99f3fc1b955305264f93f2552db14b4d9d6fe7c2b08345b
pkgname = gam
diff --git a/PKGBUILD b/PKGBUILD
index 73ee4fca16b..db6d84a2a8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,48 @@
-# Maintainer: Ethan Schoonover <es@ethanschoonover.com> @ethanschoonover IRC/BBS/AUR:altercation
+# Maintainer: Ainola
+# Contributor: Ethan Schoonover
pkgname=gam
-pkgver=3.51
-pkgrel=3
-holdver=$pkgver
-pkgdesc="Command line tool for Google Apps Administrators to manage domain and user settings; patched for managed installation"
+pkgver=4.40
+pkgrel=1
+pkgdesc="Command line tool for Google G Suite Administrators to manage domain and user settings quickly and easily."
arch=('any')
url="https://github.com/jay0lee/GAM"
license=('Apache')
-depends=('python2')
-makedepends=('tar gzip')
-optdepends=()
-provides=()
-source=("https://github.com/jay0lee/GAM/archive/v${pkgver}.tar.gz"
- "client_secrets.patch")
-noextract=("v${pkgver}.tar.gz")
-md5sums=('0ab658cb70b375a4634d477edcd02123'
- '89d247a2ab0612c0edf098d0284d9a8b')
+depends=(
+ 'python2'
+ 'python2-google-api-python-client'
+ 'python2-httplib2'
+ 'python2-simplejson'
+ 'python2-gdata'
+ 'python2-google-auth'
+ 'python2-utils'
+ 'perl-mozilla-ca'
+)
+source=(
+ "https://github.com/jay0lee/GAM/archive/v${pkgver}.tar.gz"
+ "python2.patch"
+ "python_utils_import.patch"
+ "gam.sh"
+)
+sha256sums=('01ce48e0ac79f35ba6c891e54156c67af232f210e98dea2b3178186659064ee0'
+ '417f05ee7da33763f56b7b148f46564859133ececbd5a847cd3396a9802d5944'
+ '4ab006cec39b8d2307cd338d6ff09b4621e3a4abcd0e1362f26a47de9539e9db'
+ 'd93809852ef9eefeb99f3fc1b955305264f93f2552db14b4d9d6fe7c2b08345b')
-build() {
- cd $srcdir
- [[ -d $srcdir/build ]] && rm -rf $srcdir/build
- mkdir build
- tar --gzip --extract --overwrite --strip-components=1 --directory=build --file=v${pkgver}.tar.gz
- cd build
- patch -uN -i ../client_secrets.patch || return 1
+prepare(){
+ patch -i "$srcdir/python2.patch" -d "$srcdir/GAM-$pkgver/src/"
+ patch -i "$srcdir/python_utils_import.patch" -d "$srcdir/GAM-$pkgver/src/"
}
package() {
- cd "${srcdir}/build"
- install -d ${pkgdir}/opt/${pkgname}
- install -d ${pkgdir}/usr/bin
- touch ${pkgdir}/opt/${pkgname}/noupdatecheck.txt
- touch ${pkgdir}/opt/${pkgname}/nobrowser.txt
- cp -af * ${pkgdir}/opt/${pkgname}/
- echo "python2 /opt/${pkgname}/gam.py \"\$@\"" > ${pkgdir}/usr/bin/gam
- chmod 0755 ${pkgdir}/usr/bin/gam
- rm -rf ../build
+ install -m755 -d "$pkgdir/etc/$pkgname/"
+ install -m755 -d "$pkgdir/usr/share/$pkgname"
+ touch "$pkgdir/etc/$pkgname/noupdatecheck.txt"
+ touch "$pkgdir/etc/$pkgname/nobrowser.txt"
+ install -Dm755 "$srcdir/GAM-$pkgver/src/gam.py" "$pkgdir/usr/share/$pkgname/gam.py"
+ install -Dm644 "$srcdir/GAM-$pkgver/src/var.py" "$pkgdir/usr/share/$pkgname/var.py"
+ install -Dm755 "$srcdir/gam.sh" "$pkgdir/usr/bin/gam"
+
+ ln -s /usr/share/perl5/vendor_perl/Mozilla/CA/cacert.pem \
+ "$pkgdir/usr/share/$pkgname/cacert.pem"
}
diff --git a/gam.sh b/gam.sh
new file mode 100755
index 00000000000..7d2a26ff0f7
--- /dev/null
+++ b/gam.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/share/gam/gam.py "$@"
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 00000000000..9a1af47edbc
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,6 @@
+--- gam.py 2014-08-18 05:15:29.429612735 -0400
++++ gam.py 2014-08-18 05:15:23.403373373 -0400
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
diff --git a/python_utils_import.patch b/python_utils_import.patch
new file mode 100644
index 00000000000..d31b93d1748
--- /dev/null
+++ b/python_utils_import.patch
@@ -0,0 +1,11 @@
+--- gam.py 2017-12-21 08:12:46.000000000 -0700
++++ gam.py 2018-05-21 17:30:01.345278208 -0600
+@@ -52,7 +52,7 @@
+ import oauth2client.file
+ import oauth2client.tools
+
+-import utils
++import python_utils as utils
+ from var import *
+
+ # Override some oauth2client.tools strings saving us a few GAM-specific mods to oauth2client