summaryrefslogtreecommitdiff
path: root/net/irrd/Makefile
blob: 6319f67d3e563ea34b8f719cc9cd6bee4e24dec3 (plain)
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
# $NetBSD: Makefile,v 1.46 2012/10/23 17:18:29 asau Exp $

DISTNAME=		irrd2.3.9
PKGNAME=		irrd-2.3.9
PKGREVISION=		1
CATEGORIES=		net
MASTER_SITES=		http://www.irrd.net/
EXTRACT_SUFX=		.tgz

MAINTAINER=		kim@tac.nyc.ny.us
HOMEPAGE=		http://www.irrd.net/
COMMENT=		Internet Routing Registry Daemon
LICENSE=		original-bsd

MAKE_JOBS_SAFE=		no

DEPENDS+=		gnupg-[0-9]*:../../security/gnupg
DEPENDS+=		wget-[0-9]*:../../net/wget

USE_TOOLS+=		automake autoconf flex perl:run yacc

WRKSRC=			${WRKDIR}/${DISTNAME}/src

BUILD_DEFS+=		VARBASE

PKG_SYSCONFSUBDIR=	irrd
EGDIR=			${PREFIX}/share/examples/irrd
DOCDIR=			${PREFIX}/share/doc/irrd
CONF_FILES+=		${EGDIR}/irrd.conf ${PKG_SYSCONFDIR}/irrd.conf

IRRD_USER=		irrd
IRRD_GROUP=		irrd

PKG_GROUPS=		${IRRD_USER}
PKG_USERS=		${IRRD_USER:Q}:${IRRD_GROUP:Q}
PKG_GECOS.${IRRD_USER}=	IRRd user
RCD_SCRIPTS+=		irrd

GNU_CONFIGURE=		yes

.include "options.mk"

REPLACE_PERL+=		programs/irrdcacher/irrdcacher
REPLACE_PERL+=		programs/irrdcacher/ripe2rpsl

FILES_SUBST+=		VARBASE=${VARBASE:Q}
FILES_SUBST+=		DOCDIR=${DOCDIR:Q}
FILES_SUBST+=		IRRD_USER=${IRRD_USER:Q}
FILES_SUBST+=		IRRD_GROUP=${IRRD_GROUP:Q}

INSTALLATION_DIRS+=	${PKGMANDIR}/man8
INSTALLATION_DIRS+=	sbin
INSTALLATION_DIRS+=	${EGDIR}
INSTALLATION_DIRS+=	${DOCDIR}

OWN_DIRS_PERMS+=	${PKG_SYSCONFDIR}/pgp ${IRRD_USER} ${IRRD_GROUP} 750
OWN_DIRS_PERMS+=	${VARBASE}/irrd/db ${IRRD_USER} ${IRRD_GROUP} 755
OWN_DIRS_PERMS+=	${VARBASE}/irrd/log ${IRRD_USER} ${IRRD_GROUP} 755

pre-configure:
	cd ${WRKSRC} && ${RM} acconfig.h && autoreconf

SUBST_CLASSES+=		confpaths
SUBST_FILES.confpaths=	../samples/irrd.conf.sample
SUBST_SED.confpaths=	-e 's,/var/spool/irr_database,'${VARBASE}'/irrd/db,'
SUBST_SED.confpaths+=	-e 's,/var/log/irrd,'${VARBASE}'/irrd/log/irrd.log,'
SUBST_STAGE.confpaths=	post-patch

post-install:
	${INSTALL_DATA} ${WRKSRC}/../samples/irrd.conf.sample ${DESTDIR}${EGDIR}/irrd.conf
	${INSTALL_DATA} ${WRKSRC}/../irrd-user.pdf ${DESTDIR}${DOCDIR}/irrd-user.pdf
	${INSTALL_DATA} ${WRKSRC}/../irrd-user.sgml ${DESTDIR}${DOCDIR}/irrd-user.sgml
	cd ${WRKSRC}/programs/IRRd && ${MAKE} DESTDIR=${DESTDIR} install-man
	cd ${WRKSRC}/programs/irrdcacher && \
	${INSTALL_SCRIPT} irrdcacher ${DESTDIR}${PREFIX}/sbin && \
	${INSTALL_SCRIPT} ripe2rpsl ${DESTDIR}${PREFIX}/sbin

.include "../../mk/bsd.pkg.mk"