blob: c6f37556f9ce950e7639b3133131d23d28f58b5a (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
# Created by: Shaun Amott <shaun@inerd.com>
# $FreeBSD$
PORTNAME= ircd-ratbox
PORTVERSION= 3.0.8
CATEGORIES= irc ipv6
MASTER_SITES= http://www.ratbox.org/download/ \
http://www.ratbox.org/download/old/
MAINTAINER= moggie@elasticmind.net
COMMENT= Advanced, stable IRC daemon, used widely on EFnet
LICENSE= GPLv2
CONFLICTS= ircd-ratbox-devel-[0-9]* charybdis-[0-9]*
USES= libtool tar:bzip2
#MAN8= ircd.8
USE_RC_SUBR= ircd-ratbox
USE_SQLITE= 3
USE_LDCONFIG= ${PREFIX}/lib/ircd-ratbox
USERS= ircd
GROUPS= ${USERS}
LOGDIR?= /var/log/${PORTNAME}
RUNDIR?= /var/run/${PORTNAME}
DBDIR?= /var/db/${PORTNAME}
SUB_FILES= pkg-message pkg-install
PLIST_SUB= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR}
SUB_LIST= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-confdir=${PREFIX}/etc/${PORTNAME} \
--with-logdir=/var/log/${PORTNAME} \
--with-moduledir=${PREFIX}/lib/${PORTNAME}/modules \
--libexecdir=${PREFIX}/libexec \
--with-helpdir=${DATADIR}/help \
--libdir=${PREFIX}/lib/${PORTNAME} \
--with-sqlite3=${LOCALBASE} \
--disable-backups
INSTALL_TARGET= install-strip
PORTDOCS= [^i]*.txt README.* technical/[^i]*.txt Tao-of-IRC.*
#-- Options ------------------------------------------------------------
OPTIONS_DEFINE= OPENSSL IPV6 ZIPLINKS SHARED_MODS ASSERT SMALL_NET \
SERVICES SHORTCUTS
OPENSSL_DESC= Support OpenSSL encrypted connections
IPV6_DESC= Enable IPv6 support
ZIPLINKS_DESC= Support compressed server links
SHARED_MODS_DESC= Support shared modules
ASSERT_DESC= Enable debugging code
SMALL_NET_DESC= Tune server internals for small networks
SERVICES_DESC= Enable ratbox-services compatibility code
SHORTCUTS_DESC= Build with ircd-shortcut commands
OPTIONS_DEFAULT= OPENSSL IPV6 ZIPLINKS SHARED_MODS
OPTIONS_EXCLUDE= NLS EXAMPLES
#----------------------------------------------------------------------
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENSSL}
WITH_OPENSSL_BASE=yes
CONFIGURE_ARGS+= --enable-openssl
.else
CONFIGURE_ARGS+= --disable-openssl
.endif
.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if ${PORT_OPTIONS:MZIPLINKS}
CONFIGURE_ARGS+= --disable-zlib
.endif
.if ${PORT_OPTIONS:MSHARED_MODS}
CONFIGURE_ARGS+= --disable-shared-modules
.endif
.if ${PORT_OPTIONS:MASSERT}
CONFIGURE_ARGS+= --enable-assert
.else
CONFIGURE_ARGS+= --disable-assert
.endif
.if ${PORT_OPTIONS:MSMALL_NET}
CONFIGURE_ARGS+= --enable-small-net
.endif
.if ${PORT_OPTIONS:MSERVICES}
CONFIGURE_ARGS+= --enable-services
PLIST_SUB+= SERVICES=""
.else
PLIST_SUB+= SERVICES="@comment "
.endif
.if ${PORT_OPTIONS:MSHORTCUTS}
USES+= perl5
USE_PERL5= build
PLIST_SUB+= SHORTCUTS=""
.else
PLIST_SUB+= SHORTCUTS="@comment "
.endif
#-- User Configuration -------------------------------------------------
.if !empty(NICKLEN)
CONFIGURE_ARGS+= --with-nicklen=${NICKLEN}
.endif
#-----------------------------------------------------------------------
pre-configure:
@${ECHO_MSG} ""
@${ECHO_MSG} "This port has additional options:"
@${ECHO_MSG} " NICKLEN [default 9, max 50] - Max nick length on server"
@${ECHO_MSG} ""
@${ECHO_MSG} " SERVER_NAME [default 'services.ircd-ratbox.org'] - Name of services"
@${ECHO_MSG} " USER_SERV [default 'USERSERV'] - Name of user registration service"
@${ECHO_MSG} " CHAN_SERV [default 'CHANSERV'] - Name of channel registration serv'"
@${ECHO_MSG} " NICK_SERV [default 'NICKSERV'] - Name of nickname registration serv'"
@${ECHO_MSG} " ALIS_SERV [default 'ALIS'] - Name of channel list service"
@${ECHO_MSG} " OPER_BOT [default 'OPERBOT'] - Name of operbot service"
@${ECHO_MSG} " OPER_SERV [default 'OPERSERV'] - Name of oper command service"
@${ECHO_MSG} " JUPE_SERV [default 'JUPESERV'] - Name of jupe service"
@${ECHO_MSG} " GLOBAL_SERV [default 'GLOBAL'] - Name of global announce service"
@${ECHO_MSG} ""
@${ECHO_MSG} "Press CTRL+C now if you wish to set them."
@${ECHO_MSG} ""
pre-build:
@${REINPLACE_CMD} -e "s#-O2##" ${WRKSRC}/configure
@${REINPLACE_CMD} -e "s#%%PREFIX%%#${PREFIX}#g" \
${WRKSRC}/doc/example.conf \
${WRKSRC}/doc/example.efnet.conf
@${REINPLACE_CMD} -e "s#%%LOGDIR%%#${LOGDIR}#g" \
${WRKSRC}/doc/example.conf \
${WRKSRC}/doc/example.efnet.conf
@${REINPLACE_CMD} -e "s#%%DBDIR%%#${DBDIR}#g" \
${WRKSRC}/doc/example.conf \
${WRKSRC}/doc/example.efnet.conf
@${REINPLACE_CMD} -e "s#%%RUNDIR%%#${RUNDIR}#g" ${WRKSRC}/include/config.h
@${REINPLACE_CMD} -e "s#%%DBDIR%%#${DBDIR}#g" ${WRKSRC}/include/config.h
@${REINPLACE_CMD} -e "s#%%WRKSRC%%#${WRKSRC}#g" ${WRKSRC}/contrib/ircd-shortcut.pl
#-- ircd-shortcut.pl ratbox-services commands --------------------------------------
.if !empty(SERVER_NAME)
@${REINPLACE_CMD} -e "s#services.ircd-ratbox.org#${SERVER_NAME}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(USER_SERV)
@${REINPLACE_CMD} -e "s#USERSERV#${USER_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(CHAN_SERV)
@${REINPLACE_CMD} -e "s#CHANSERV#${CHAN_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(NICK_SERV)
@${REINPLACE_CMD} -e "s#NICKSERV#${NICK_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(ALIS_SERV)
@${REINPLACE_CMD} -e "s#ALIS#${ALIS_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(OPER_BOT)
@${REINPLACE_CMD} -e "s#OPERBOT#${OPER_BOT}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(OPER_SERV)
@${REINPLACE_CMD} -e "s#OPERSERV#${OPER_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(JUPE_SERV)
@${REINPLACE_CMD} -e "s#JUPESERV#${JUPE_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
.if !empty(GLOBAL_SERV)
@${REINPLACE_CMD} -e "s#GLOBAL#${GLOBAL_SERV}#" \
${WRKSRC}/contrib/ircd-shortcut.pl
.endif
# ----- Execute ircd-shortcut perl script to generate the .c file. -----
.if ${PORT_OPTIONS:MSHORTCUTS}
@${ECHO_MSG} "Executing ircd-shortcut.pl for ircd-shortcuts generation."
${PERL} ${WRKSRC}/contrib/ircd-shortcut.pl
.endif
post-build:
@cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
# ----- Need to build the m_rsshortcut.so module for ircd-shortcut.pl ----
.if ${PORT_OPTIONS:MSHORTCUTS}
@${ECHO_MSG} "Building m_rsshortcut.la for ircd-shortcuts."
@cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} m_rsshortcut.la
.endif
pre-install:
${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}${DATADIR}/help
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules
post-install:
${MKDIR} ${STAGEDIR}${DBDIR}
${MKDIR} ${STAGEDIR}${RUNDIR}
${MKDIR} ${STAGEDIR}${LOGDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}
${INSTALL_DATA} ${WRKSRC}/doc/ircd.motd ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.motd.sample
${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/genssl.sh
# ----- We need to install the shortcut.pl module ----
.if ${PORT_OPTIONS:MSHORTCUTS}
@${ECHO_MSG} "Executing install-mod.sh for ircd-shortcuts module installation."
${SH} ${WRKSRC}/install-mod.sh ${WRKSRC}/contrib/m_rsshortcut.la \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules/contrib
.endif
.include <bsd.port.mk>
|