summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0b92832a7d0c851ddfc070ba317801dead29a7f6 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Daniel Hillenbrand <codeworkx at bbqlinux dot org>

_pkgbase=stubby
pkgname=stubby-git
pkgver=2718.8797280
pkgrel=1
pkgdesc="DNS Privacy stub resolver"
arch=('x86_64')
url="https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby"
license=('BSD')
backup=('etc/stubby/stubby.yml')
makedepends=('libtool' 'git')
conflicts=('getdns' 'stubby')
source=("$_pkgbase::git+https://github.com/getdnsapi/getdns.git"
        "${_pkgbase}.sysusers")
sha256sums=('SKIP'
            '2acedcf2b65d6e802a70deb55a5befbb71ff83be68a0ba5231a09c126910142b')

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

prepare() {
    cd ${srcdir}/${_pkgbase}
    git submodule update --init
    libtoolize -ci
    autoreconf -fi
    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --without-libidn \
        --with-ssl=/usr \
        --enable-stub-only \
        --with-stubby
}

build() {
    cd ${srcdir}/${_pkgbase}
    make
}

package() {
    cd ${srcdir}/${_pkgbase}

    make DESTDIR="${pkgdir}" install

    install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${_pkgbase}
    rmdir "${pkgdir}"/var{/run,}

    install -Dm644 stubby/systemd/${_pkgbase}.service -t "${pkgdir}"/usr/lib/systemd/system/
    install -Dm644 stubby/systemd/${_pkgbase}.conf -t "${pkgdir}"/usr/lib/tmpfiles.d/
    install -Dm644 ../../${_pkgbase}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${_pkgbase}.conf
}