summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 609713f2ce3ddffcba425888a209aa434755b38d (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
# Maintainer: Fijxu <fijxu <at> zzls <dot> xyz>
pkgname=dnsproxy-git
pkgver=0.48.3.r787.c060c2a
pkgrel=1
pkgdesc="Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support (git version)"
arch=('any')
url="https://github.com/AdguardTeam/dnsproxy"
license=('Apache')
makedepends=('git' 'go')
provides=('dnsproxy')
conflicts=(dnsproxy-bin dnsproxy-adguard)
backup=(etc/dnsproxy/dnsproxy.yaml)
install=$pkgname.install
source=("dnsproxy-git::git+https://github.com/AdguardTeam/dnsproxy.git"
        "dnsproxy.yaml"
        "dnsproxy.service")
sha256sums=("SKIP"
        "9d8a7088bb101114397dd299c19d690f0356a6787844c2b4ca7358612dd1b594"
        "565eea9808589ecafa81f2229ac1f85b39028e26d488a9a7c0b51afc43d7f42b")
_conf=etc/dnsproxy/dnsproxy.yaml    

pkgver() {
    cd "$srcdir/$pkgname"
    printf "0.48.3.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$pkgname"
    make build
}

# Thanks "5long" for the package(), configuration files and systemd service
package() {
    cd "$srcdir/$pkgname"
    install -Dm755 dnsproxy "$pkgdir"/usr/bin/dnsproxy
    install -Dm644 LICENSE "$pkgdir"/usr/share/license/dnsproxy/LICENSE
    install -Dm644 README.md "$pkgdir"/usr/share/doc/dnsproxy/README.md
    install -Dm644 $srcdir/dnsproxy.yaml "$pkgdir/$_conf"
    install -Dm644 $srcdir/dnsproxy.service "$pkgdir"/usr/lib/systemd/system/dnsproxy.service
}