summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38023d15d7cac941312b97130d2d7d0b4d6daf86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Josef Vybíhal <josef.vybihal@gmail.com>
# Contributor: Ainola
# Contributor: Ethan Schoonover

#  shellcheck disable=SC2034
pkgname=gamadv-xtd3
pkgver=7.01.01
pkgrel=1
pkgdesc="Free, open source command line tool for Google Workspace (formerly G Suite) Administrators to manage domain and user settings quickly and easily."
arch=('x86_64')
url="https://github.com/taers232c/GAMADV-XTD3"
license=('Apache-2.0')
conflicts=('gam')
depends=(
    'python-dateutil'
    'python-distro'
    'python-dnspython'
    'python-filelock'
    'python-google-api-core'
    'python-google-api-python-client'
    'python-google-auth'
    'python-google-auth-httplib2'
    'python-google-auth-oauthlib'
    'python-httplib2'
    'python-pathvalidate'
    'python-passlib'
    'python-lxml'
)

source=(
    "${pkgname^^}-$pkgver.tar.gz::$url/archive/v${pkgver}.tar.gz"
    "gam.sh"
)

sha256sums=('ca9bc0d12e6de3f0b6ae8075d1d907aef8a591c5fa33cb600f3c06e5a46b03d9'
            '05ff2239d6ac90d2ca7caa690470b797e41e802bf1fb98d6338803546b2ae68d')

prepare() {
    mv "${pkgname^^}-$pkgver" "$pkgname-$pkgver"
}

package() {
    mkdir -p "$pkgdir/usr/share/$pkgname"

    cp -r "$pkgname-$pkgver"/src/gam/ "$pkgdir/usr/share/$pkgname"

    find "$pkgdir/usr/share/$pkgname" -type f -exec chmod 644 {} +
    find "$pkgdir/usr/share/$pkgname" -type d -exec chmod 755 {} +
    find "$pkgdir/usr/share/$pkgname" -name '*_test.py' -exec rm {} +

    install -Dm755 "$pkgname-$pkgver/src/gam.py" -t "$pkgdir/usr/share/$pkgname/"
    install -Dm755 "$pkgname-$pkgver/src/GamCommands.txt" -t "$pkgdir/usr/share/$pkgname/"
    install -Dm755 gam.sh "$pkgdir/usr/bin/gam"
}