blob: 3249efe1abd6005e0158a06ab712792f188e60c3 (
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
|
# New ports collection Makefile for: inspircd
# Date created: 07 March 2011
# Whom: Maxim Ignatenko <gelraen.ua@gmail.com>
#
# $FreeBSD$
#
PORTNAME= inspircd
PORTVERSION= 1.2.8
CATEGORIES= irc
MASTER_SITES= http://www.inspircd.org/downloads/ \
http://www.chatspike.net/downloads/
DISTNAME= InspIRCd-${PORTVERSION}
MAINTAINER= gelraen.ua@gmail.com
COMMENT= A modular C++ IRC daemon
CONFLICTS= inspircd-1.1* inspircd-2.*
LATEST_LINK= inspircd12
WRKSRC= ${WRKDIR}/inspircd
USE_BZIP2= yes
USE_LDCONFIG= ${PREFIX}/lib/inspircd
USE_RC_SUBR= inspircd.sh
MAKE_JOBS_SAFE= yes
USERS= ${INCPIRCD_USR}
GROUPS= ${INSPIRCD_GRP}
INSPIRCD_USR?= ircd
INSPIRCD_UID?= 72
INSPIRCD_GRP?= ircd
INSPIRCD_GID?= 72
INSPIRCD_RUN?= /var/run/${PORTNAME}
INSPIRCD_LOG?= /var/log/${PORTNAME}/ircd.log
SUB_LIST+= \
INSPIRCD_USR=${INSPIRCD_USR} \
INSPIRCD_UID=${INSPIRCD_UID} \
INSPIRCD_GRP=${INSPIRCD_GRP} \
INSPIRCD_GID=${INSPIRCD_GID} \
INSPIRCD_RUN=${INSPIRCD_RUN} \
INSPIRCD_LOG=${INSPIRCD_LOG}
PLIST_SUB+= INSPIRCD_GRP=${INSPIRCD_GRP}
# Configure script is written in perl
USE_PERL5_BUILD=yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --with-cc=${CXX} --config-dir=${ETCDIR} \
--module-dir=${PREFIX}/lib/${PORTNAME}/modules \
--library-dir=${PREFIX}/lib/${PORTNAME} \
--prefix=${DATADIR} --binary-dir=${PREFIX}/bin \
--disable-interactive
MAKEFILE= BSDmakefile
OPTIONS= LDAPMODULES "Build m_ldap{auth,oper} modules" off \
MYSQL "Build m_mysql module" off \
PGSQL "Build m_pgsql module" off \
SQLITE3 "Build m_sqlite3 module" off \
SQLMODULES "Build m_sql{log,oper,utils,auth}" off \
GNUTLS "Build m_ssl_gnutls module" off \
OPENSSL "Build m_ssl_openssl module" on \
ZIPLINK "Build m_ziplink module" off \
POSIX_RE "Build m_regex_posix module" on \
PCRE "Build m_regex_pcre module" off \
TRE "Build m_regex_tre module" off \
IPV6 "Enable IPv6 support" on
.include <bsd.port.options.mk>
.if defined(WITH_IPV6) && !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --enable-ipv6 --enable-remote-ipv6
.else
CONFIGURE_ARGS+= --disable-remote-ipv6
.endif
.if defined(WITH_POSIX_RE) && !defined(WITHOUT_POSIX_RE)
PLIST_SUB+= POSIX_RE=""
SYMLINK_FILES+= m_regex_posix.cpp
.else
PLIST_SUB+= POSIX_RE="@comment "
.endif
.if defined(WITH_PCRE) && !defined(WITHOUT_PCRE)
PLIST_SUB+= PCRE=""
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
SYMLINK_FILES+= m_regex_pcre.cpp
.else
PLIST_SUB+= PCRE="@comment "
.endif
.if defined(WITH_TRE) && !defined(WITHOUT_TRE)
PLIST_SUB+= TRE=""
LIB_DEPENDS+= tre:${PORTSDIR}/textproc/libtre
CONFIGURE_ARGS+= --tre-includes=${LOCALBASE}/include
SYMLINK_FILES+= m_regex_tre.cpp
.else
PLIST_SUB+= TRE="@comment "
.endif
.if defined(WITH_LDAPMODULES) && !defined(WITHOUT_LDAPMODULES)
USE_OPENLDAP= yes
SYMLINK_FILES+= m_ldapauth.cpp m_ldapoper.cpp
PLIST_SUB+= LDAPMODULES=""
.else
PLIST_SUB+= LDAPMODULES="@comment "
.endif
.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL)
USE_MYSQL= yes
SYMLINK_FILES+= m_mysql.cpp m_sqlv2.h
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL)
USE_PGSQL= yes
SYMLINK_FILES+= m_pgsql.cpp m_sqlv2.h
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif
.if defined(WITH_SQLITE3) && !defined(WITHOUT_SQLITE3)
USE_SQLITE= 3
SYMLINK_FILES+= m_sqlite3.cpp m_sqlv2.h
PLIST_SUB+= SQLITE3=""
.else
PLIST_SUB+= SQLITE3="@comment "
.endif
.if defined(WITH_SQLMODULES) && !defined(WITHOUT_SQLMODULES)
.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE3)
BROKEN= Please enable at least one of MYSQL, PGSQL or SQLITE3 required by SQLMODULES
.endif
SYMLINK_FILES+= m_sqlauth.cpp m_sqllog.cpp m_sqloper.cpp m_sqlutils.cpp \
m_sqlutils.h
PLIST_SUB+= SQLMODULES=""
.else
PLIST_SUB+= SQLMODULES="@comment "
.endif
.if defined(WITH_GNUTLS) && !defined(WITHOUT_GNUTLS)
LIB_DEPENDS+= gnutls.40:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+= --enable-gnutls
SYMLINK_FILES+= m_ssl_gnutls.cpp
PLIST_SUB+= GNUTLS=""
.else
PLIST_SUB+= GNUTLS="@comment "
.endif
.if defined(WITH_OPENSSL) && !defined(WITHOUT_OPENSSL)
USE_OPENSSL= yes
CONFIGURE_ARGS+= --enable-openssl
SYMLINK_FILES+= m_ssl_openssl.cpp
PLIST_SUB+= OPENSSL=""
.else
PLIST_SUB+= OPENSSL="@comment "
.endif
.if defined(WITH_SSLMODULES) && !defined(WITHOUT_SSLMODULES)
.if !defined(WITH_GNUTLS) && !defined(WITH_OPENSSL)
BROKEN= Please enable at least one of GNUTLS or OPENSSL required by SSLMODULES
.endif
SYMLINK_FILES+= m_ssl_oper_cert.cpp m_sslinfo.cpp
PLIST_SUB+= SSLMODULES=""
.else
PLIST_SUB+= SSLMODULES="@comment "
.endif
.if defined(WITH_ZIPLINK) && !defined(WITHOUT_ZIPLINK)
SYMLINK_FILES+= m_ziplink.cpp
PLIST_SUB+= ZIPLINK=""
.else
PLIST_SUB+= ZIPLINK="@comment "
.endif
CXXFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
post-patch:
${REINPLACE_CMD} -e '/INSTMODE/s|700|755|;/install -d.*BINPATH/d'\
-e 's,FLAGS = @FLAGS@,FLAGS = ${CXXFLAGS} @FLAGS@,' \
${WRKSRC}/.Makefile.inc
.for f in ${SYMLINK_FILES}
pre-configure::
cd ${WRKSRC}/src/modules && \
${TEST} -L ${f} || \
${LN} -s extra/${f} ${f}
.endfor
post-configure:
# ${MV} ${WRKSRC}/BSDmakefile ${WRKSRC}/Makefile
${TOUCH} ${WRKSRC}/.force-root-ok
post-install:
@${MKDIR} ${PREFIX}/include/${PORTNAME}
@${CP} -rv ${WRKSRC}/include/* ${PREFIX}/include/${PORTNAME}/
@${MKDIR} ${PREFIX}/share/${PORTNAME}/locales
@${CP} -rv ${WRKSRC}/locales/* ${PREFIX}/share/${PORTNAME}/locales/
@${STRIP_CMD} ${PREFIX}/lib/${PORTNAME}/modules/*.so
@${STRIP_CMD} ${PREFIX}/lib/${PORTNAME}/*.so
@${STRIP_CMD} ${PREFIX}/bin/${PORTNAME}
.for FILE in censor conf filter helpop-full helpop motd quotes rules
@if [ ! -f ${ETCDIR}/${PORTNAME}.${FILE} ] ; then \
${CP} -p ${ETCDIR}/${PORTNAME}.${FILE}.example \
${ETCDIR}/${PORTNAME}.${FILE}; \
fi
.endfor
.include <bsd.port.mk>
|