blob: 272cd14392267a8163a23aa8caaf9d3ebebdab1a (
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
|
# New ports collection makefile for: inspircd
# Date created: 25 August 2006
# Whom: brain
#
# $FreeBSD$
#
PORTNAME= inspircd
PORTVERSION= 1.1.19
CATEGORIES= irc
MASTER_SITES= http://www.inspircd.org/downloads/ \
http://www.chatspike.net/downloads/
DISTNAME= InspIRCd-${PORTVERSION}
MAINTAINER= brain@inspircd.org
COMMENT= A modular C++ IRC daemon
WRKSRC= ${WRKDIR}/inspircd
USE_GMAKE= yes
USE_BZIP2= yes
USE_LDCONFIG= ${PREFIX}/lib/inspircd
USE_RC_SUBR= inspircd.sh
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+= PORTNAME=${PORTNAME} \
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}
SUB_FILES+= pkg-install pkg-deinstall
USE_OPENSSL= yes
OPENSSL_PORT?= security/openssl
# 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=${PREFIX}/${PORTNAME} --binary-dir=${PREFIX}/bin \
--enable-ipv6 --enable-remote-ipv6 --disable-interactive
OPTIONS= FILTER_PCRE "Build m_filter_pcre module" off \
LDAPAUTH "Build m_ldapauth module" 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" off \
SSLMODULES "Build m_ssl_{info,oper_cert}" off \
ZIPLINK "Build m_ziplink module" off
.include <bsd.port.pre.mk>
.if defined(WITH_FILTER_PCRE) && !defined(WITHOUT_FILTER_PCRE)
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
SYMLINK_FILES+= m_filter_pcre.cpp
PLIST_SUB+= FILTER_PCRE=""
.else
PLIST_SUB+= FILTER_PCRE="@comment "
.endif
.if defined(WITH_LDAPAUTH) && !defined(WITHOUT_LDAPAUTH)
USE_OPENLDAP= yes
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__modules__extra__m_ldapauth.cpp
SYMLINK_FILES+= m_ldapauth.cpp
PLIST_SUB+= LDAPAUTH=""
.else
PLIST_SUB+= LDAPAUTH="@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.26:${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)
# I'd like to say USE_OPENSSL=yes here but that's not allowed.
# Failing that maybe?: .include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+= --enable-openssl
SYMLINK_FILES+= m_ssl_openssl.cpp
PLIST_SUB+= OPENSSL=""
# The configure script tries to run 'pkg-config --libs openssl' in
# order to work out how to link against openssl. This works fine if
# OpenSSL is installed as a port, but not if the base system version
# is being used.
.if defined(WITH_OPENSSL_BASE)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__modules__extra__m_ssl_openssl.cpp
.endif
.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
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
pre-install:
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${STRIP_CMD} ${PREFIX}/lib/${PORTNAME}/modules/*.so
@${STRIP_CMD} ${PREFIX}/lib/${PORTNAME}/*.so
@${STRIP_CMD} ${PREFIX}/bin/${PORTNAME}
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.for FILE in censor conf filter helpop-full helpop motd quotes rules
@if ${TEST} -f ${ETCDIR}/${PORTNAME}.${FILE} && \
${TEST} ! -f ${ETCDIR}/${PORTNAME}.${FILE}.example ; then \
${CP} -p ${ETCDIR}/${PORTNAME}.${FILE}.example \
${ETCDIR}/${PORTNAME}.${FILE}; \
fi
.endfor
.include <bsd.port.post.mk>
|