aboutsummaryrefslogtreecommitdiff
path: root/net/irrd-legacy/Makefile
blob: d584ccf91961d0ee8e4dfdea0281094e53795f3e (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
74
75
76
77
78
79
# Created by: TAKANO Yuji <takano@net-chef.net>

PORTNAME=	irrd
PORTVERSION=	2.3.10
DISTVERSIONPREFIX=	v
CATEGORIES=	net
PKGNAMESUFFIX=	-legacy

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

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

BROKEN_FreeBSD_13=	ld: error: duplicate symbol: error_buf
BROKEN_FreeBSD_14=	ld: error: duplicate symbol: error_buf

RUN_DEPENDS=	wget:ftp/wget

USES=		shebangfix
USE_GITHUB=	yes
USE_RC_SUBR=	irrd

GH_ACCOUNT=	irrdnet
GH_PROJECT=	${PORTNAME}${PKGNAMESUFFIX}

WRKSRC_SUBDIR=	src

IRRD_CONFDIR=	${PREFIX}/etc

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>