blob: 7f422262f367e31cf2b85a27194c05271e80ac27 (
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
|
# Maintainer: German Lashevich <german.lashevich@gmail.com>
#
# Source: https://github.com/zebradil/aur
#
# shellcheck disable=SC2034,SC2154
pkgname=cloudflare-dynamic-dns
pkgver=4.3.9
pkgrel=1
pkgdesc='Updates AAAA records at Cloudflare according to the current IPv6 address'
url='https://github.com/zebradil/cloudflare-dynamic-dns'
arch=(any)
license=(MIT)
install=''
makedepends=(go)
provides=(cloudflare-dynamic-dns)
source=(cloudflare-dynamic-dns-4.3.9::https://github.com/zebradil/cloudflare-dynamic-dns/archive/4.3.9.tar.gz)
prepare ()
{
cd "$pkgname-$pkgver" || exit 1;
mkdir -p build/
}
build ()
{
cd "$pkgname-$pkgver" || exit 1;
export CGO_ENABLED=0;
go build -buildmode=pie -trimpath -ldflags=-linkmode=external -ldflags="-X=main.version=$pkgver -X=main.commit=$pkgver -X=main.date=$(date -Iseconds)" -mod=readonly -modcacherw -o build/$pkgname main.go
}
check ()
{
cd "$pkgname-$pkgver" || exit 1;
go test ./...
}
package ()
{
set -eo pipefail;
cd "$pkgname-$pkgver";
BIN="build/$pkgname";
install -Dm755 "$BIN" -t "$pkgdir/usr/bin";
install -Dm644 systemd/* -t "$pkgdir/usr/lib/systemd/system";
install -m700 -d "$pkgdir/etc/$pkgname/config.d"
}
sha256sums=('96f087883ddb7fb54435f748992dd6b0a7c643795e5185dfbd722afa6827c87b')
|