summaryrefslogtreecommitdiff
path: root/dns/gdnsd2/Makefile
blob: 062bef947aa1cb22daa962a8814a1c650d6fe5f8 (plain) (blame)
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
51
52
53
54
55
56
57
# Created by: Allan Jude <allanjude@freebsd.org>
# $FreeBSD$

PORTNAME=	gdnsd
PORTVERSION=	2.2.2
CATEGORIES=	dns
MASTER_SITES=	https://github.com/gdnsd/gdnsd/releases/download/v${PORTVERSION}/ \
		http://mirrors.rit.edu/zi/ \
		http://gdnsd.scaleengine.net/gdnsd/
PKGNAMESUFFIX=	2

MAINTAINER=	zi@FreeBSD.org
COMMENT=	Authoritative-only GeoIP-aware DNS server

LICENSE=	GPLv3

LIB_DEPENDS=	libev.so:devel/libev
BUILD_DEPENDS=	ragel>0:devel/ragel

FETCH_ARGS=	-Fpr

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--localstatedir=/var
USE_LDCONFIG=	yes
USES=		pkgconfig libtool tar:xz perl5 gmake
USE_PERL5=	build
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFLICTS_INSTALL=	gdnsd-1.[0-9]*

USE_RC_SUBR=	gdnsd

USERS?=		gdnsd
GROUPS?=	gdnsd

OPTIONS_DEFINE=	DOCS GEOIP URCU
OPTIONS_DEFAULT=GEOIP

GEOIP_DESC=		Enable GeoIP Support
GEOIP_RUN_DEPENDS=	GeoIP>=0:net/GeoIP

URCU_DESC=		Read-Copy-Update Support (Faster Zone Parsing)
URCU_CONFIGURE_WITH=	urcu
URCU_LIB_DEPENDS=	liburcu.so:sysutils/liburcu

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

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/libgdnsd.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/plugin_*.so
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdnsd/geoip \
		${STAGEDIR}${PREFIX}/etc/gdnsd/zones \
		${STAGEDIR}/var/run/gdnsd

.include <bsd.port.mk>