blob: e7ef0a679bcac2927fd229b299d5b7e222950af4 (
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
|
# Maintainer: Kuan-Yen Chou <kuanyenchou@gmail.com>
pkgname=tron
pkgver=1.0.4
pkgrel=1
pkgdesc='Tiny CLI tool for controlling Lutron Caséta systems'
depends=()
optdepends=()
makedepends=('go')
arch=('x86_64')
url='https://github.com/tessro/tron'
license=('MIT')
source=("https://github.com/tessro/tron/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('f67805693d4208ea320102c8308e86f33e726dc0fffc5fc8ea9d97bb7e41efc0')
build() {
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"
cd "$srcdir/$pkgname-$pkgver"
bash get_versions.sh
echo -n "$pkgver" >tmp/version.txt
mkdir -p build
go build -o build ./...
}
check() {
cd "$srcdir/$pkgname-$pkgver"
go test ./...
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -Dm 755 "build/$pkgname" -t "$pkgdir/usr/bin/"
}
# vim: set sw=4 ts=4 et:
|