diff options
author | Danilo Bargen | 2022-02-27 02:00:49 +0100 |
---|---|---|
committer | Danilo Bargen | 2022-02-27 02:04:55 +0100 |
commit | 073efb13c63f73793d582c2aac0412f47c75ae7c (patch) | |
tree | b6a1cc9636df5f943280113bae30fc0d3f93bdd1 | |
parent | 9c64c59c19aff4fe13721317b55b77c6a7121b2b (diff) | |
download | aur-073efb13c63f73793d582c2aac0412f47c75ae7c.tar.gz |
Version 1.0.3-1
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | transifex-client.install | 17 |
3 files changed, 54 insertions, 30 deletions
@@ -1,17 +1,13 @@ pkgbase = transifex-client pkgdesc = The Transifex command-line tool to download and upload translations from Transifex - pkgver = 0.14.4 + pkgver = 1.0.3 pkgrel = 1 - url = http://pypi.python.org/pypi/transifex-client + url = https://github.com/transifex/cli + install = transifex-client.install arch = any - license = GPL2 - depends = python-distribute - depends = python-urllib3 - depends = python-six - depends = python-requests - depends = python-slugify - depends = python-gitpython - source = https://pypi.io/packages/source/t/transifex-client/transifex-client-0.14.4.tar.gz - sha256sums = 11dc95cefe90ebf0cef3749c8c7d85b9d389c05bd0e3389bf117685df562bd5c + license = Apache + makedepends = go + source = transifex-client-1.0.3.tar.gz::https://github.com/transifex/cli/archive/refs/tags/v1.0.3.tar.gz + sha256sums = 50bec348a86cea0af6b3f22e99327312bc22f30113e0107b81d6da3f2f2a2a39 pkgname = transifex-client @@ -4,36 +4,47 @@ # Contributor: Patrick McCarty <pnorcks at gmail dot com> pkgname=transifex-client -pkgver=0.14.4 +pkgver=1.0.3 pkgrel=1 pkgdesc="The Transifex command-line tool to download and upload translations from Transifex" arch=('any') -url="http://pypi.python.org/pypi/transifex-client" -license=('GPL2') -depends=( - 'python-distribute' - 'python-urllib3' - 'python-six' - 'python-requests' - 'python-slugify' - 'python-gitpython' -) -source=("https://pypi.io/packages/source/t/${pkgname}/${pkgname}-${pkgver}.tar.gz") -sha256sums=('11dc95cefe90ebf0cef3749c8c7d85b9d389c05bd0e3389bf117685df562bd5c') +url="https://github.com/transifex/cli" +license=('Apache') +depends=() +makedepends=('go') +source=("$pkgname-$pkgver.tar.gz::https://github.com/transifex/cli/archive/refs/tags/v${pkgver}.tar.gz") +install=transifex-client.install +sha256sums=('50bec348a86cea0af6b3f22e99327312bc22f30113e0107b81d6da3f2f2a2a39') prepare() { - cd "${pkgname}-${pkgver}" - sed -i 's#python-slugify<5.0.0#python-slugify#' requirements.txt + cd "cli-${pkgver}" + + # Create build dir + mkdir -p build/ + + # Download module cache + go mod download } build() { - cd "${pkgname}-${pkgver}" - python setup.py build + cd "cli-${pkgver}" + + # Set flags + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + + # Build + go build -o build } package() { - cd "${pkgname}-${pkgver}" - python setup.py install --root=${pkgdir} --optimize=1 + cd "cli-${pkgver}" + + # Install binary + install -Dm 755 build/cli "${pkgdir}"/usr/bin/tx } # vim:set ts=2 sw=2 et: diff --git a/transifex-client.install b/transifex-client.install new file mode 100644 index 000000000000..e50bf8c49482 --- /dev/null +++ b/transifex-client.install @@ -0,0 +1,17 @@ +post_install() { + true +} + +post_upgrade() { + echo "" + echo "NOTE: If you just upgraded to the new go-based transifex client," + echo "you may need to migrate your configuration." + echo "" + echo "See the following page for instructions:" + echo "https://github.com/transifex/cli#migrating-from-older-versions-of-the-client" + echo "" +} + +post_remove() { + true +} |