summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e0245e1cc68cb17caf45006c5a204c326666bdcb (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
# Maintainer: Conrad Hoffmann <ch@bitfehler.net>

pkgname=ipcalc-redhat
pkgver=1.0.3
pkgrel=1
pkgdesc="Redhat's modernized ipcalc fork with IPv6 support"
arch=('x86_64')
url="https://gitlab.com/ipcalc/ipcalc"
license=('GPL-2.0-or-later')
conflicts=('ipcalc')
depends=('glibc')
makedepends=('geoip' 'meson' 'ruby-ronn')
optdepends=('geoip: display geoinfo for IP with -g')
source=("https://gitlab.com/ipcalc/ipcalc/-/archive/${pkgver}/ipcalc-${pkgver}.tar.gz")
sha256sums=('451f323764f37ea6057e0ade60a0473938232ab2a92b97ffdc8c4860a8c76cfc')

build() {
	cd "$srcdir/ipcalc-$pkgver"
	meson setup build \
		-Duse_maxminddb=disabled \
		-Duse_geoip=enabled \
		-Duse_runtime_linking=enabled
	ninja -C build
}

check() {
	cd "$srcdir/ipcalc-$pkgver"
	ninja -C build test
}

package() {
	cd "$srcdir/ipcalc-$pkgver"
	install -m755 -Dt "${pkgdir}/usr/bin/" build/ipcalc
	install -m644 -Dt "${pkgdir}/usr/share/man/man1/" build/ipcalc.1
}