summaryrefslogtreecommitdiff
path: root/dns/gdnsd3/Makefile
blob: a5ba0d562e7dbe140369aac87d3c05f1099ae1e0 (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
PORTNAME=	gdnsd
PORTVERSION=	3.8.0
CATEGORIES=	dns
MASTER_SITES=	https://github.com/gdnsd/gdnsd/releases/download/v${PORTVERSION}/ \
		ZI \
		http://gdnsd.scaleengine.net/gdnsd/
PKGNAMESUFFIX=	3

MAINTAINER=	zi@FreeBSD.org
COMMENT=	Authoritative-only GeoIP-aware DNS server
WWW=		https://github.com/blblack/gdnsd

LICENSE=	GPLv3

LIB_DEPENDS=	libev.so:devel/libev \
		libsodium.so:security/libsodium \
		liburcu.so:sysutils/liburcu

FETCH_ARGS=	-Fpr

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--localstatedir=/var --with-buildinfo=${PORTVERSION}
USE_LDCONFIG=	yes
USES=		cpe pkgconfig libtool tar:xz perl5 gmake
USE_PERL5=	build
CPPFLAGS+=	-isystem${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFLICTS_INSTALL=	gdnsd2

USE_RC_SUBR=	gdnsd

USERS?=		gdnsd
GROUPS?=	gdnsd

OPTIONS_DEFINE=	DOCS MAXMINDDB
OPTIONS_DEFAULT=MAXMINDDB

MAXMINDDB_DESC=		Enable GeoIP1 + GeoIP2 Support
MAXMINDDB_LIB_DEPENDS=	libmaxminddb.so:net/libmaxminddb

post-patch:
	@${REINPLACE_CMD} -e 's|$${localstatedir}/lib/$${PACKAGE_NAME}|/var/db/${PORTNAME}|g' \
		${WRKSRC}/configure

post-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdnsd/geoip \
		${STAGEDIR}${PREFIX}/etc/gdnsd/zones \
		${STAGEDIR}/var/run/gdnsd

.include <bsd.port.mk>