summaryrefslogtreecommitdiffstats
path: root/irc/nefarious/Makefile
blob: 620109d318edff9c5ef16f07e92d6f988a31c4d8 (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
79
80
81
82
# Created by: Frank J. Laszlo <laszlof@FreeBSD.org>
# $FreeBSD$

PORTNAME=	Nefarious
PORTVERSION=	1.2.0
PORTREVISION=	1
CATEGORIES=	irc
MASTER_SITES=	SF/evilnet/${PORTNAME}%20IRCu/${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	IRC server used by evilnet based off of Undernet's ircu

BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash

USES=		tar:bzip2
HAS_CONFIGURE=	yes
BINMODE=	711
PLIST_SUB+=	INSTALL_PREFIX=${INSTALL_PREFIX:S/${PREFIX}\///}

OPTIONS_DEFINE=	SSL CHROOT DOCS
CHROOT_DESC=	Chroot the irc daemon within INSTALL_PREFIX

SSL_CONFIGURE_ENABLE=	ssl

.include <bsd.port.options.mk>

.if defined(NEFARIUS_INSTALL_PREFIX)
INSTALL_PREFIX=${NEFARIUS_INSTALL_PREFIX}
.else
INSTALL_PREFIX=${PREFIX}/${PORTNAME}
.endif
STAGEPREFIX=${STAGEDIR}${INSTALL_PREFIX}

.if ${PORT_OPTIONS:MSSL}
USE_OPENSSL=	yes
.endif

.if ${PORT_OPTIONS:MCHROOT}
CONFIGURE_ARGS+=	--with-chroot=${INSTALL_PREFIX}
.endif

.if defined(NEFARIOUS_DOMAIN)
CONFIGURE_ARGS+=	--with-domain=${NEFARIOUS_DOMAIN}
.endif

CONFIGURE_ARGS+=	--prefix=${INSTALL_PREFIX} \
			--mandir=${MANPREFIX}/man

SYMLINKS=	admin away challenge invite names nick version \
		join kick motd oper part quit time cnotice \
		cprivmsg credits copyright info ircops ison links \
		lusers map notice pass rules silence sethost topic \
		userhost userip wallchops wallhops wallvoices whois \
		commands

post-extract:
	@${FIND} ${WRKSRC} -type d -name ".svn" | ${XARGS} ${RM} -rf

post-patch:
	@${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' ${WRKSRC}/configure

pre-configure:
	@${ECHO_CMD} "User configurable options for ${PORTNAME}:"
	@${ECHO_CMD} "NEFARIOUS_INSTALL_PREFIX - Install location for Nefarious"
	@${ECHO_CMD} "                           (default: ${PREFIX}/Nefarious)"
	@${ECHO_CMD} "NEFARIOUS_DOMAIN         - Domain to use for IRCd"

do-install:
	${MKDIR} ${STAGEPREFIX}/bin ${STAGEPREFIX}/lib/help
	${INSTALL_PROGRAM} ${WRKSRC}/ircd/ircd ${STAGEPREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/ircd/chkconf ${STAGEPREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEPREFIX}/lib
	${INSTALL_MAN} ${WRKSRC}/doc/ircd.8 ${STAGEDIR}${MANPREFIX}/man/man8
.if ${PORT_OPTIONS:MDOCS}
	cd ${WRKSRC}/help && \
		${COPYTREE_SHARE} users ${STAGEPREFIX}/lib/help && \
		${COPYTREE_SHARE} opers ${STAGEPREFIX}/lib/help
	cd ${STAGEPREFIX}/lib/help/opers && ${CP} ${SYMLINKS} ../users
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud