aboutsummaryrefslogtreecommitdiffstats
path: root/net/relayd/Makefile
blob: 46032fdc179a19d8c1e6ce664fa178de042a1d95 (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
# New ports collection makefile for: relayd
# Date created:         5 Jun 2007
# Whom:                 Jun Kuriyama <kuriyama@FreeBSD.org>
#
# $FreeBSD$

PORTNAME=   relayd
PORTVERSION=    4.2.20071221
PORTREVISION=   1
CATEGORIES= net
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= kuriyama

MAINTAINER= kuriyama@FreeBSD.org
COMMENT=    OpenBSD Relay Daemon

LIB_DEPENDS=    event-1.4:${PORTSDIR}/devel/libevent

WRKSRC=     ${WRKDIR}/tmp
MAN5=       relayd.conf.5
MAN8=       relayctl.8 relayd.8
USE_RC_SUBR=    relayd

CFLAGS+=    -I${PREFIX}/include

WRKSRCC=    ${WRKDIR}/tmp/relayctl
WRKSRCD=    ${WRKDIR}/tmp/relayd
_MAKE=      ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
RUSER=      _relayd
RGROUP=     _relayd

post-extract:
    ${MKDIR} ${WRKSRC}
    ${MV} ${WRKDIR}/relayctl ${WRKSRC}/
    ${MV} ${WRKDIR}/relayd   ${WRKSRC}/

pre-build:
    ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
        ${WRKSRCD}/relayd.h \
        ${WRKSRCD}/relayd.conf.5 ${WRKSRCD}/relayd.8

do-build:
    (cd ${WRKSRCC}; ${_MAKE} ${ALL_TARGET})
    (cd ${WRKSRCD}; ${_MAKE} ${ALL_TARGET})

pre-su-install:
    @${SETENV} PKG_PREFIX=${PREFIX} RUSER=${RUSER} RGROUP=${RGROUP} \
        ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL

do-install:
    (cd ${WRKSRCC}; ${_MAKE} ${INSTALL_TARGET} install-man)
    (cd ${WRKSRCD}; ${_MAKE} ${INSTALL_TARGET} install-man)

.include <bsd.port.pre.mk>

.if (${OSVERSION} < 700049) && !defined(I_KNOW_WHAT_I_AM_DOING)
IGNORE= needs a patched kernel to work correctly (http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/pf_table.c.diff?r1=1.67&r2=1.68)
.endif

.include <bsd.port.post.mk>