aboutsummaryrefslogtreecommitdiffstats
path: root/net/irrd/Makefile
blob: b2a60034d44cacb92f885c0440e3f6d8d93a67ef (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
63
64
65
66
67
68
69
70
71
72
73
# Created by: TAKANO Yuji <takano@net-chef.net>
# $FreeBSD$

PORTNAME=   irrd
PORTVERSION=    2.3.10
PORTREVISION=   3
CATEGORIES= net ipv6
MASTER_SITES=   http://www.irrd.net/
DISTNAME=   ${PORTNAME}${PORTVERSION}

MAINTAINER= ume@FreeBSD.org
COMMENT=    Internet Routing Registry database server

LICENSE=    BSD4CLAUSE
LICENSE_FILE=   ${WRKDIR}/${PORTNAME}${PORTVERSION}/COPYRIGHT

RUN_DEPENDS=    wget:ftp/wget

WRKSRC=     ${WRKDIR}/${PORTNAME}${PORTVERSION}/src

IRRD_CONFDIR=   ${PREFIX}/etc

USES=       shebangfix tar:tgz
USE_RC_SUBR=    irrd
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  YACC="${YACC}"
MAKE_JOBS_UNSAFE=   yes
DESTDIRNAME=    STAGEDIR

OPTIONS_DEFINE=     IPV6
IPV6_CONFIGURE_ENABLE=  ipv6

SHEBANG_FILES=  programs/irrdcacher/irrdcacher \
        programs/irrdcacher/ripe2rpsl

PLIST_FILES=    etc/irrd.conf.sample \
        man/man8/irrd.8.gz \
        sbin/irr_notify \
        sbin/irr_rpsl_check \
        sbin/irr_rpsl_submit \
        sbin/irrd \
        sbin/irrdcacher \
        sbin/ripe2rpsl

post-patch:
    ${REINPLACE_CMD} -e 's|/etc/irrd.conf|${IRRD_CONFDIR}/irrd.conf|g' \
        ${WRKSRC}/programs/IRRd/irrd.8 \
        ${WRKSRC}/programs/IRRd/main.c \
        ${WRKSRC}/programs/hdr_comm/read_conf.c \
        ${WRKSRC}/programs/irr_notify/main.c \
        ${WRKSRC}/programs/irr_rpsl_check/main.c \
        ${WRKSRC}/programs/irr_rpsl_submit/main.c \
        ${WRKSRC}/programs/irrdcacher/irrdcacher \
        ${WRKSRC}/programs/rps_dist/rpsdist.c
    ${REINPLACE_CMD} -e 's|\($$(DESTDIR)\)|$$(STAGEDIR)\1|g' \
        -e 's|\( -m 755 \)| -s\1|g' \
        -e 's| -o root -g bin||g' \
        ${WRKSRC}/programs/IRRd/Makefile \
        ${WRKSRC}/programs/irr_notify/Makefile \
        ${WRKSRC}/programs/irr_rpsl_check/Makefile \
        ${WRKSRC}/programs/irr_rpsl_submit/Makefile

post-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/irrdcacher \
        ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/ripe2rpsl \
        ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_DATA} ${WRKSRC}/../samples/irrd.conf.sample \
        ${STAGEDIR}${IRRD_CONFDIR}
    ${INSTALL_DATA} ${WRKSRC}/programs/IRRd/irrd.8 \
        ${STAGEDIR}${PREFIX}/man/man8

.include <bsd.port.mk>