-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
49 lines (41 loc) · 1.36 KB
/
PKGBUILD
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
# Maintainer: Laurel May <[email protected]>
_pkgbase=dynamic-route53
pkgname="${_pkgbase}"-git
pkgver=0.1.0
pkgrel=1
pkgdesc="Dynamically update Route 53 Hosted Zone with the current host's public IP"
arch=("x86_64")
url="https://github.com/laurelmay/dynamic-route53-rs"
license=(MIT)
depends=()
makedepends=(git cargo)
source=("${pkgname}::git+${url}")
sha512sums=('SKIP')
backup=(etc/dynamic-route53/config.yml
etc/dynamic-route53/aws-vars
)
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/$pkgname"
cargo build --release --locked --all-features --target-dir=target
}
check() {
cd "$srcdir/$pkgname"
cargo test --release --locked --target-dir=target
}
package() {
cd "$srcdir/$pkgname"
install -Dm 755 "target/release/${_pkgbase}" -t "${pkgdir}/usr/bin/"
# Systemd Units
mkdir -p "${pkgdir}/usr/lib/systemd/system/"
install -Dm 644 "systemd/dynamic-route53.service" "${pkgdir}/usr/lib/systemd/system/"
install -Dm 644 "systemd/dynamic-route53.timer" "${pkgdir}/usr/lib/systemd/system/"
# Configuaration files
mkdir -p "${pkgdir}/etc/dynamic-route53/"
install -Dm 644 "sample_config.yml" "${pkgdir}/etc/dynamic-route53/config.yml"
touch "${pkgdir}/etc/dynamic-route53/aws-vars"
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}