summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6b4f1f15e708d859be600018aa96f47bc3971d19 (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
# Maintainer: Hexhu <i@hexhu.net>
# Maintainer: Lucas Magalhães <whoisroot@national.shitposting.agency>
_pkgname=passivedns
pkgname=${_pkgname}-git
pkgver=r297.be48a8e
pkgrel=1
pkgdesc="A network sniffer that logs all DNS server replies for use in a passive DNS setup"
arch=('x86_64')
url="https://github.com/gamelinux/passivedns"
license=('GPLv2')
depends=('ldns' 'libpcap')
makedepends=('git' 'binutils')
provides=("${_pkgname}")
source=("git+https://github.com/gamelinux/passivedns.git"
        "passivedns.service")
sha256sums=('SKIP'
            '49eccbd5e9f5a78d444abd5b0282af3143de5a4c8105203a3270724685a47a73')

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

build() {
    cd "${srcdir}/${_pkgname}"
    autoreconf --install
    ./configure --prefix=/usr
    make
}

package() {
    cd "${srcdir}/${_pkgname}"
    make DESTDIR="${pkgdir}" install

    install -D -m 0644 "${srcdir}/${_pkgname}"/tools/* -t "$pkgdir"/usr/share/doc/passivedns/tools/
    install -D -m 0644 "${srcdir}/${_pkgname}"/doc/* -t "$pkgdir"/usr/share/doc/passivedns/doc/
    install -D -m 0644 README "$pkgdir"/usr/share/doc/passivedns/README
    install -D -m 0644 ../passivedns.service "$pkgdir"/usr/lib/systemd/system/passivedns.service
}