summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 819d4f50e38601e1393004cb8eb9140f4f5b6a9d (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
# Maintainer: Michael Yang <ohmyarchlinux@protonmail.com>

pkgname=dnspodc-git
pkgver=r18.28ae3c91
pkgrel=1
pkgdesc='IPv6 DNSPOD client written in C++17'
arch=('x86_64' 'armv7h' 'aarch64')
url='https://github.com/microcai/dnspodc'
license=('GPL')
makedepends=('git' 'cmake>=3.0.0' 'boost')
depends=('boost-libs' 'openssl')
conflicts=('dnspodc')
provides=('dnspodc')
source=('git+https://github.com/microcai/dnspodc')
sha512sums=('SKIP')

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

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../dnspodc \
    -DBoost_USE_STATIC_LIBS=OFF \
    -DUSE_SYSTEM_OPENSSL=ON \
    -DUSE_SYSTEM_BOOST=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  make -C build DESTDIR=${pkgdir} install
  install -Dm644 dnspodc/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}