aboutsummaryrefslogtreecommitdiffstats
path: root/dns/curvedns/Makefile
blob: 3d6ce43f7d8a2dd6ad2f8ab8be965a154600ab8d (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
58
59
60
61
62
# Created by: Leo Vandewoestijne <freebsd@dns-lab.com>
# $FreeBSD$

PORTNAME=       curvedns
PORTVERSION=        0.88.b
PORTREVISION=       2
CATEGORIES=     dns
MASTER_SITES=       http://curvedns.on2it.net/releases/
DISTNAME=       curvedns-0.88-unstable

MAINTAINER=     freebsd@dns-lab.com
COMMENT=        Forwarder adding DNSCurve to an authoritative nameserver

LIB_DEPENDS=        ev.4:${PORTSDIR}/devel/libev
RUN_DEPENDS=        setuidgid:${PORTSDIR}/sysutils/daemontools
BUILD_DEPENDS=      bash:${PORTSDIR}/shells/bash

HAS_CONFIGURE=      yes
CONFIGURE_SCRIPT=   configure.nacl
ALL_TARGET=     # yes, an empty target.

USERS=          bind
GROUPS=         bind
CURVE_UID=      53
CURVE_GID=      53

SUB_FILES=      pkg-message

NO_STAGE=   yes
.include <bsd.port.pre.mk>

.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN=     Does not compile on ia64, powerpc, or sparc64
.endif

post-patch:
    @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/freebsd.patch

pre-configure:
    @${ECHO_MSG} "===>   configuring may take a couple of minutes"

post-configure:
.if ${ARCH} == "amd64"
    @cd ${WRKSRC} && ./configure.curvedns amd64
.else
    @cd ${WRKSRC} && ./configure.curvedns
.endif

post-install:
    ${CP} ${WRKSRC}/curvedns ${WRKSRC}/curvedns-keygen ${PREFIX}/bin/
    ${MKDIR} ${PREFIX}/etc/curvedns/log ${PREFIX}/etc/curvedns/env
    ${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run.sample
    ${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run.sample
    ${ECHO_CMD} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID
    ${ECHO_CMD} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID
    ${CHOWN} -R ${CURVE_UID}:${CURVE_GID} ${PREFIX}/etc/curvedns
    ${CHMOD} 755 ${PREFIX}/etc/curvedns/run.sample \
        ${PREFIX}/etc/curvedns/log/run.sample
    ${CHMOD} 0700 ${PREFIX}/etc/curvedns/env
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>