blob: f104cd3b3da6d49f70ca168f2f29b18623827c1f (
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
|
# Maintainer: Danilo <aur ät dbrgn döt ch>
# Submitter: Simon Legner <Simon.Legner@gmail.com>
# Contributor: Muflone http://www.muflone.com/contacts/english/
# Contributor: Patrick McCarty <pnorcks at gmail dot com>
pkgname=transifex-client
pkgver=1.6.17
pkgrel=1
pkgdesc="The Transifex command-line tool to download and upload translations from Transifex"
arch=('x86_64')
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=('759320acd621991046533089bb77320202853cc97b860ab7783040d0e4d5e34f')
prepare() {
cd "cli-${pkgver}"
# Create build dir
mkdir -p build/
# Download module cache
go mod download
}
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 -X 'github.com/transifex/cli/internal/txlib.Version=${pkgver}'\" -mod=readonly -modcacherw"
# Build
go build -o build
}
package() {
cd "cli-${pkgver}"
# Install binary
install -Dm 755 build/cli "${pkgdir}"/usr/bin/tx
}
# vim:set ts=2 sw=2 et:
|