summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9e6db7473b5af7e5d60923a13aa079bba2995e64 (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
# Maintainer: Hexhu <i at hexhu.net>
# Contributor : Thermi <noel [at] familie-kuntze dot de>

pkgname=ndppd-git
pkgver=r116.e01d67a
pkgrel=3
pkgdesc="NDP Proxy Daemon, version 0.x (git version)"
arch=('x86_64')
url="https://github.com/DanielAdolfsson/ndppd"
license=('GPL3')
depends=()
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=('etc/ndppd.conf')
source=('git+https://github.com/DanielAdolfsson/ndppd'
        'ndppd.service')
md5sums=('SKIP'
         '4658734163b92421e4e4fea4cbb4f7d9')

pkgver() {
	cd "${srcdir}/${pkgname%-git}"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${srcdir}/${pkgname%-git}"

    # Fix versioning, though dozens of commits have been added to the master branch
    # after v0.2.5, which was released at August 2016.
    sed -i 's/\"0.2.4\"/\"0.2.5\"/' src/ndppd.h

    make DEBUG=1 PREFIX=/usr all
}

package() {
    cd "${srcdir}/${pkgname%-git}"
    make PREFIX=/usr SBINDIR=/${pkgdir}/usr/bin DESTDIR=${pkgdir} install
    install -D -m 644 "${srcdir}/ndppd.service" "${pkgdir}/usr/lib/systemd/system/ndppd.service"
    install -D -m 644 "ndppd.conf-dist" "${pkgdir}/etc/ndppd.conf"
}