blob: bdf46845fdf81034d16be2a3e21f7999a441e7a5 (
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
|
# Maintainer: database64128 <free122448@hotmail.com>
_pkgname=ddns-go
pkgname=cubic-$_pkgname
pkgver=1.1.2
pkgrel=1
pkgdesc="DDNS service supporting dynamic updates of A, AAAA, and HTTPS records"
arch=('x86_64' 'aarch64')
url="https://github.com/database64128/$_pkgname"
license=('GPL-3.0-or-later')
makedepends=('git' 'go')
provides=("$_pkgname")
conflicts=("$_pkgname")
backup=("etc/$_pkgname/config.json")
source=("$_pkgname::git+$url.git#tag=v$pkgver?signed")
b2sums=('e2c5ed9fe3725427142c79bddb0c8a6e18a651c2a3ff6997a6a8fceaea96a3a4b79cfb152983efa44f4443ad2a968d86ad3969eca9b3072746783c55374583c8')
validpgpkeys=(
'4DCED15E346E2923B931D6F71CA27546BEDB8B01' # Ian Chen (database64128) <free122448@hotmail.com>
)
build() {
cd $_pkgname
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath"
go build -ldflags='-s -w -linkmode=external' ./cmd/$_pkgname
}
package() {
cd $_pkgname
install -Dm644 docs/$_pkgname.service "$pkgdir"/usr/lib/systemd/system/$_pkgname.service
install -Dm644 docs/$_pkgname@.service "$pkgdir"/usr/lib/systemd/system/$_pkgname@.service
install -d "$pkgdir"/etc/$_pkgname
install -Dm644 docs/config.json "$pkgdir"/etc/$_pkgname/config.json
install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
}
|