aboutsummaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-05-19 07:01:38 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-05-19 07:01:38 +0000
commitaa86169786940e83bc040a99fb559298330803fe (patch)
treee102a4722455a2d27d51063b14856a711677f06d /irc
parent9f5138cfaf18ebd8536ef38b193495d98c73669c (diff)
downloadports-aa86169786940e83bc040a99fb559298330803fe.tar.gz
ports-aa86169786940e83bc040a99fb559298330803fe.zip
- Update to version 1.1.19
- Add OPTIONS dialogue to enable extra modules - Add rc.subr start-up script - Add the usual boilerplate so that inspircd will run as user ircd from /usr/ports/UIDs - Fix compilation so it works with the base system version of the openssl libs as well as openssl installed from ports. PR: ports/123076 Submitted by: Matthew Seaman <matthew.seaman@thebunker.net> Approved by: Craig Edwards (Brain) <brain@inspircd.org> (maintainer)
Notes
Notes: svn path=/head/; revision=213322
Diffstat (limited to 'irc')
-rw-r--r--irc/inspircd/Makefile183
-rw-r--r--irc/inspircd/distinfo6
-rw-r--r--irc/inspircd/files/extra-patch-src__modules__extra__m_ldapauth.cpp11
-rw-r--r--irc/inspircd/files/extra-patch-src__modules__extra__m_ssl_openssl.cpp12
-rw-r--r--irc/inspircd/files/inspircd.sh.in76
-rw-r--r--irc/inspircd/files/patch-configure11
-rw-r--r--irc/inspircd/files/pkg-deinstall.in32
-rw-r--r--irc/inspircd/files/pkg-install.in109
-rw-r--r--irc/inspircd/pkg-plist238
9 files changed, 544 insertions, 134 deletions
diff --git a/irc/inspircd/Makefile b/irc/inspircd/Makefile
index 54e04f155f63..272cd1439226 100644
--- a/irc/inspircd/Makefile
+++ b/irc/inspircd/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= inspircd
-PORTVERSION= 1.1.8
-PORTREVISION= 2
+PORTVERSION= 1.1.19
CATEGORIES= irc
MASTER_SITES= http://www.inspircd.org/downloads/ \
http://www.chatspike.net/downloads/
@@ -20,39 +19,175 @@ 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=${PREFIX}/etc/inspircd \
- --module-dir=${PREFIX}/lib/inspircd/modules \
- --library-dir=${PREFIX}/lib/inspircd \
- --prefix=${PREFIX}/inspircd --binary-dir=${PREFIX}/bin \
- --enable-remote-ipv6 --disable-interactive
+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
+ ${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
-# 1.0.6 Makefile forgets to make these directories
-# during install. We make these ourselves. This may
-# be fixed in a later version of InspIRCd.
pre-install:
- @${INSTALL} -d ${PREFIX}/inspircd/
- @${INSTALL} -d ${PREFIX}/lib/inspircd/
- @${INSTALL} -d ${PREFIX}/lib/inspircd/modules/
- @${INSTALL} -d ${PREFIX}/etc/inspircd/
+ ${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
- @${STRIP_CMD} ${PREFIX}/lib/inspircd/modules/*.so
- @${STRIP_CMD} ${PREFIX}/lib/inspircd/*.so
- @${STRIP_CMD} ${PREFIX}/bin/inspircd
-.for FILE in censor conf filter helpop motd quotes rules
- @if ${TEST} -f ${PREFIX}/etc/inspircd/inspircd.${FILE}; then \
- ${CP} ${PREFIX}/etc/inspircd/inspircd.${FILE}.example ${PREFIX}/etc/inspircd/inspircd.${FILE}; \
+ @${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.mk>
+.include <bsd.port.post.mk>
diff --git a/irc/inspircd/distinfo b/irc/inspircd/distinfo
index e4abed9a0fbf..88bf02640494 100644
--- a/irc/inspircd/distinfo
+++ b/irc/inspircd/distinfo
@@ -1,3 +1,3 @@
-MD5 (InspIRCd-1.1.8.tar.bz2) = f86b39cef74381434a27508357161fe8
-SHA256 (InspIRCd-1.1.8.tar.bz2) = 427af997ee9d90e073c3daa30d978c63a61d3731b731efc519a121dca41d85f0
-SIZE (InspIRCd-1.1.8.tar.bz2) = 484433
+MD5 (InspIRCd-1.1.19.tar.bz2) = 9bfb5722cfd5c2435e85c14870fa2ef2
+SHA256 (InspIRCd-1.1.19.tar.bz2) = 4e1394749096e92ac976160c8d82a2017e718d5edd0a86f6049b3d473023c64e
+SIZE (InspIRCd-1.1.19.tar.bz2) = 505193
diff --git a/irc/inspircd/files/extra-patch-src__modules__extra__m_ldapauth.cpp b/irc/inspircd/files/extra-patch-src__modules__extra__m_ldapauth.cpp
new file mode 100644
index 000000000000..992a18c1e1d2
--- /dev/null
+++ b/irc/inspircd/files/extra-patch-src__modules__extra__m_ldapauth.cpp
@@ -0,0 +1,11 @@
+--- ./src/modules/extra/m_ldapauth.cpp.orig 2008-03-15 13:33:33.000000000 +0000
++++ ./src/modules/extra/m_ldapauth.cpp 2008-04-11 13:34:37.000000000 +0100
+@@ -29,7 +29,7 @@
+ #include <ldap.h>
+
+ /* $ModDesc: Allow/Deny connections based upon answer from LDAP server */
+-/* $LinkerFlags: -lldap */
++/* $LinkerFlags: -L/usr/local/lib -lldap */
+
+ class ModuleLDAPAuth : public Module
+ {
diff --git a/irc/inspircd/files/extra-patch-src__modules__extra__m_ssl_openssl.cpp b/irc/inspircd/files/extra-patch-src__modules__extra__m_ssl_openssl.cpp
new file mode 100644
index 000000000000..f555c6eea2d5
--- /dev/null
+++ b/irc/inspircd/files/extra-patch-src__modules__extra__m_ssl_openssl.cpp
@@ -0,0 +1,12 @@
+--- ./src/modules/extra/m_ssl_openssl.cpp.orig 2008-04-18 09:13:19.000000000 +0100
++++ ./src/modules/extra/m_ssl_openssl.cpp 2008-04-18 09:14:44.000000000 +0100
+@@ -38,8 +38,7 @@
+ #endif
+
+ /* $ModDesc: Provides SSL support for clients */
+-/* $CompileFlags: pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */
+-/* $LinkerFlags: rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto -ldl") */
++/* $LinkerFlags: -lssl -lcrypto */
+ /* $ModDep: transport.h */
+
+ enum issl_status { ISSL_NONE, ISSL_HANDSHAKING, ISSL_OPEN };
diff --git a/irc/inspircd/files/inspircd.sh.in b/irc/inspircd/files/inspircd.sh.in
new file mode 100644
index 000000000000..10ba22a2efe6
--- /dev/null
+++ b/irc/inspircd/files/inspircd.sh.in
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: %%PORTNAME%%
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%:
+#
+# %%PORTNAME%%_enable="YES"
+#
+# Other rc.conf variables:
+#
+# %%PORTNAME%%_config="%%ETCDIR%%/%%PORTNAME%%.conf"
+# -- path to config file
+# %%PORTNAME%%_pidfile="%%INSPIRCD_RUN%%/%%PORTNAME%%.pid"
+# -- location of pidfile: must match setting
+# in ${%%PORTNAME%%_conffile}
+# %%PORTNAME%%_user="%%INSPIRCD_USR%%"
+# -- user to run %%PORTNAME%% as
+# %%PORTNAME%%_group="%%INSPIRCD_GRP%%"
+# -- group to run %%PORTNAME%% as
+# %%PORTNAME%%_logfile="%%INSPIRCD_LOG%%"
+# -- file %%PORTNAME%% writes logs to
+#
+. /etc/rc.subr
+
+name=%%PORTNAME%%
+rcvar=`set_rcvar`
+
+load_rc_config ${name}
+
+: ${%%PORTNAME%%_enable="NO"}
+: ${%%PORTNAME%%_config="%%ETCDIR%%/%%PORTNAME%%.conf"}
+: ${%%PORTNAME%%_pidfile="%%INSPIRCD_RUN%%/%%PORTNAME%%.pid"}
+: ${%%PORTNAME%%_flags=""}
+: ${%%PORTNAME%%_user="%%INSPIRCD_USR%%"}
+: ${%%PORTNAME%%_group="%%INSPIRCD_GRP%%"}
+: ${%%PORTNAME%%_logfile="%%INSPIRCD_LOG%%"}
+
+command=%%PREFIX%%/bin/%%PORTNAME%%
+pidfile=${%%PORTNAME%%_pidfile}
+required_files=${%%PORTNAME%%_config}
+start_precmd=%%PORTNAME%%_prestart
+
+%%PORTNAME%%_prestart ()
+{
+ piddir=$(dirname ${%%PORTNAME%%_pidfile})
+ if [ ! -d ${piddir} ]; then
+ mkdir -m 755 -p ${piddir}
+ chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${piddir}
+ fi
+ logdir=$(dirname ${%%PORTNAME%%_logfile})
+ if [ ! -d ${logdir} ]; then
+ mkdir -m 755 -p ${logdir}
+ chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${logdir}
+ fi
+}
+
+case "${%%PORTNAME%%_flags}" in
+ *--config\ *)
+ echo "Warning \$%%PORTNAME%%_flags includes --config option." \
+ "Please use \$%%PORTNAME%%_config instead."
+ ;;
+ *--logfile\ *)
+ echo "Warning \$%%PORTNAME%%_flags includes --logfile option." \
+ "Please use \$%%PORTNAME%%_logfile instead."
+ ;;
+ *)
+ %%PORTNAME%%_flags="${%%PORTNAME%%_flags} --logfile ${%%PORTNAME%%_logfile} --config ${%%PORTNAME%%_config}"
+ ;;
+esac
+
+run_rc_command "$1"
diff --git a/irc/inspircd/files/patch-configure b/irc/inspircd/files/patch-configure
new file mode 100644
index 000000000000..1f9f4dfd13e5
--- /dev/null
+++ b/irc/inspircd/files/patch-configure
@@ -0,0 +1,11 @@
+--- ./configure.orig 2008-02-21 20:35:25.000000000 +0000
++++ ./configure 2008-04-18 09:12:20.000000000 +0100
+@@ -136,7 +136,7 @@
+ $config{LIBRARY_DIR} = $opt_library_dir;
+ }
+ chomp($config{HAS_GNUTLS} = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
+-chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); # Openssl version
++chomp($config{HAS_OPENSSL} = `openssl version | cut -d ' ' -f 2`); # Openssl version
+ chomp($gnutls_ver = $config{HAS_GNUTLS});
+ chomp($openssl_ver = $config{HAS_OPENSSL});
+ $config{USE_GNUTLS} = "n";
diff --git a/irc/inspircd/files/pkg-deinstall.in b/irc/inspircd/files/pkg-deinstall.in
new file mode 100644
index 000000000000..f182a03917b6
--- /dev/null
+++ b/irc/inspircd/files/pkg-deinstall.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+inspircd_usr=%%INSPIRCD_USR%%
+inspircd_grp=%%INSPIRCD_GRP%%
+etcdir=%%ETCDIR%%
+inspircd_name=%%PORTNAME%%
+
+case $2 in
+ POST-DEINSTALL)
+
+ cat <<EOMSG
+
+The $inspircd_name port has been deleted. If you are not
+upgrading and don't intend to use $inspircd_name any more
+then you may wish to delete the $inspircd_usr account,
+and the $inspircd_grp group together with the configuration
+directory ${etcdir}; which can be done with the
+following commands:
+
+ # pw userdel -n $inspircd_usr
+ # rm -rf $etcdir
+EOMSG
+ echo
+ ;;
+esac
+
+#
+# That's All Folks!
+#
diff --git a/irc/inspircd/files/pkg-install.in b/irc/inspircd/files/pkg-install.in
new file mode 100644
index 000000000000..66d7d9e97dce
--- /dev/null
+++ b/irc/inspircd/files/pkg-install.in
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+inspircd_usr=%%INSPIRCD_USR%%
+inspircd_uid=%%INSPIRCD_UID%%
+inspircd_grp=%%INSPIRCD_GRP%%
+inspircd_gid=%%INSPIRCD_GID%%
+inspircd_name=%%PORTNAME%%
+etcdir=%%ETCDIR%%
+
+inspircd_gcos="IRC daemon"
+inspircd_home=/nonexistent
+inspircd_shell=/sbin/nologin
+
+create_group() {
+ local user uid group gid gcos home shell
+
+ user=$1
+ uid=$2
+ group=$3
+ gid=$4
+ gcos=$5
+ home=$6
+ shell=$7
+
+ if pw groupadd -n $group -g $gid ; then
+ echo "===> Group $group created"
+ else
+ cat <<-EOERRORMSG
+ *** Failed to create the $group group.
+
+ Please add the $user user and $group group
+ manually with the commands:
+
+ pw groupadd -n $group -g $gid
+ pw useradd -n $user -u $uid -g $group -c "$gcos" \\
+ -d $home -s $shell -h -
+
+ and retry installing this package.
+ EOERRORMSG
+ exit 1
+ fi
+}
+
+
+create_user() {
+ local user uid group gid gcos home shell
+
+ user=$1
+ uid=$2
+ group=$3
+ gid=$4
+ gcos=$5
+ home=$6
+ shell=$7
+
+ if pw useradd -n $user -u $uid -g $group -c "$gcos" -d $home \
+ -s $shell -h - ; then
+ echo "===> Created $user user"
+ else
+ cat <<-EOERRORMSG
+ *** Failed to create the $user user.
+
+ Please add the $user user manually with the command:
+
+ pw useradd -n $user -u $uid -g $group -c "$gcos" \\
+ -d $home -s $shell -h -
+
+ and retry installing this package.
+ EOERRORMSG
+ exit 1
+ fi
+}
+
+
+case $2 in
+ PRE-INSTALL)
+
+ # Create the inspircd user and group if they do not already exist
+
+ if pw user show -n $inspircd_usr >/dev/null 2>&1 ; then
+ echo "===> Using pre-existing user $inspircd_usr"
+ else
+ if ! pw group show -n $inspircd_grp >/dev/null 2>&1 ; then
+ create_group $inspircd_usr $inspircd_uid $inspircd_grp \
+ $inspircd_gid "$inspircd_gcos" $inspircd_home \
+ $inspircd_shell
+ fi
+ create_user $inspircd_usr $inspircd_uid $inspircd_grp \
+ $inspircd_gid "$inspircd_gcos" $inspircd_home \
+ $inspircd_shell
+ fi
+ ;;
+
+ POST-INSTALL)
+
+ # Make sure access to the etc dir is limited to $inspircd_grp
+ chmod 750 $etcdir
+ chgrp $inspircd_grp $etcdir
+ ;;
+esac
+
+#
+# That's All Folks!
+#
diff --git a/irc/inspircd/pkg-plist b/irc/inspircd/pkg-plist
index 39f95bc04197..f722e7f7e754 100644
--- a/irc/inspircd/pkg-plist
+++ b/irc/inspircd/pkg-plist
@@ -78,139 +78,163 @@ lib/inspircd/cmd_who.so
lib/inspircd/cmd_whois.so
lib/inspircd/cmd_whowas.so
lib/inspircd/cmd_zline.so
-lib/inspircd/modules/m_blockcaps.so
+lib/inspircd/modules/m_alias.so
+lib/inspircd/modules/m_alltime.so
+lib/inspircd/modules/m_antibear.so
+lib/inspircd/modules/m_antibottler.so
+lib/inspircd/modules/m_auditorium.so
+lib/inspircd/modules/m_banexception.so
+lib/inspircd/modules/m_banredirect.so
lib/inspircd/modules/m_blockamsg.so
-lib/inspircd/modules/m_dnsbl.so
+lib/inspircd/modules/m_blockcaps.so
+lib/inspircd/modules/m_blockcolor.so
+lib/inspircd/modules/m_botmode.so
+lib/inspircd/modules/m_cban.so
lib/inspircd/modules/m_censor.so
-lib/inspircd/modules/m_hideoper.so
+lib/inspircd/modules/m_cgiirc.so
+lib/inspircd/modules/m_chancreate.so
+lib/inspircd/modules/m_chanfilter.so
+lib/inspircd/modules/m_chanprotect.so
+lib/inspircd/modules/m_check.so
+lib/inspircd/modules/m_chghost.so
+lib/inspircd/modules/m_chgident.so
+lib/inspircd/modules/m_chgname.so
+lib/inspircd/modules/m_cloaking.so
+lib/inspircd/modules/m_clones.so
+lib/inspircd/modules/m_close.so
+lib/inspircd/modules/m_commonchans.so
+lib/inspircd/modules/m_conn_join.so
+lib/inspircd/modules/m_conn_umodes.so
lib/inspircd/modules/m_conn_waitpong.so
-lib/inspircd/modules/m_vhost.so
-lib/inspircd/modules/m_safelist.so
-lib/inspircd/modules/m_remove.so
-lib/inspircd/modules/m_override.so
-lib/inspircd/modules/m_sapart.so
-lib/inspircd/modules/m_watch.so
-lib/inspircd/modules/m_botmode.so
-lib/inspircd/modules/m_tline.so
-lib/inspircd/modules/m_silence_ext.so
-lib/inspircd/modules/m_xmlsocket.so
-lib/inspircd/modules/m_uhnames.so
-lib/inspircd/modules/m_noinvite.so
-lib/inspircd/modules/m_services.so
+lib/inspircd/modules/m_connflood.so
+lib/inspircd/modules/m_customtitle.so
+lib/inspircd/modules/m_cycle.so
+lib/inspircd/modules/m_dccallow.so
+lib/inspircd/modules/m_deaf.so
+lib/inspircd/modules/m_denychans.so
+lib/inspircd/modules/m_devoice.so
+lib/inspircd/modules/m_dnsbl.so
lib/inspircd/modules/m_filter.so
-lib/inspircd/modules/m_invisible.so
-lib/inspircd/modules/m_operjoin.so
-lib/inspircd/modules/m_sha256.so
-lib/inspircd/modules/m_knock.so
-lib/inspircd/modules/m_cban.so
-lib/inspircd/modules/m_noctcp.so
-lib/inspircd/modules/m_oper_hash.so
+lib/inspircd/modules/m_foobar.so
lib/inspircd/modules/m_globalload.so
-lib/inspircd/modules/m_userip.so
-lib/inspircd/modules/m_antibottler.so
-lib/inspircd/modules/m_nokicks.so
-lib/inspircd/modules/m_devoice.so
-lib/inspircd/modules/m_showwhois.so
+lib/inspircd/modules/m_globops.so
+lib/inspircd/modules/m_helpop.so
+lib/inspircd/modules/m_hidechans.so
+lib/inspircd/modules/m_hideoper.so
+lib/inspircd/modules/m_hostchange.so
+lib/inspircd/modules/m_httpd.so
+lib/inspircd/modules/m_httpd_stats.so
lib/inspircd/modules/m_ident.so
+lib/inspircd/modules/m_invisible.so
+lib/inspircd/modules/m_inviteexception.so
lib/inspircd/modules/m_joinflood.so
-lib/inspircd/modules/m_blockcolor.so
-lib/inspircd/modules/m_helpop.so
-lib/inspircd/modules/m_opermotd.so
-lib/inspircd/modules/m_sslmodes.so
-lib/inspircd/modules/m_timedbans.so
-lib/inspircd/modules/m_chanprotect.so
-lib/inspircd/modules/m_nonicks.so
-lib/inspircd/modules/m_connflood.so
-lib/inspircd/modules/m_chanfilter.so
-lib/inspircd/modules/m_opermodes.so
+lib/inspircd/modules/m_jumpserver.so
+lib/inspircd/modules/m_kicknorejoin.so
+lib/inspircd/modules/m_knock.so
+lib/inspircd/modules/m_lockserv.so
lib/inspircd/modules/m_md5.so
+lib/inspircd/modules/m_messageflood.so
lib/inspircd/modules/m_namesx.so
-lib/inspircd/modules/m_restrictmsg.so
-lib/inspircd/modules/m_chghost.so
+lib/inspircd/modules/m_nickflood.so
+lib/inspircd/modules/m_nicklock.so
+lib/inspircd/modules/m_noctcp.so
+lib/inspircd/modules/m_noinvite.so
+lib/inspircd/modules/m_nokicks.so
+lib/inspircd/modules/m_nonicks.so
+lib/inspircd/modules/m_nonotice.so
+lib/inspircd/modules/m_oper_hash.so
lib/inspircd/modules/m_operchans.so
-lib/inspircd/modules/m_uninvite.so
-lib/inspircd/modules/m_services_account.so
-lib/inspircd/modules/m_taxonomy.so
-lib/inspircd/modules/m_banredirect.so
-lib/inspircd/modules/m_sanick.so
-lib/inspircd/modules/m_alias.so
-lib/inspircd/modules/m_inviteexception.so
-lib/inspircd/modules/m_deaf.so
-lib/inspircd/modules/m_lockserv.so
-lib/inspircd/modules/m_banexception.so
+lib/inspircd/modules/m_operjoin.so
+lib/inspircd/modules/m_operlevels.so
+lib/inspircd/modules/m_operlog.so
+lib/inspircd/modules/m_opermodes.so
+lib/inspircd/modules/m_opermotd.so
+lib/inspircd/modules/m_override.so
+lib/inspircd/modules/m_randquote.so
lib/inspircd/modules/m_redirect.so
+lib/inspircd/modules/m_regonlycreate.so
+lib/inspircd/modules/m_remove.so
+lib/inspircd/modules/m_restrictbanned.so
lib/inspircd/modules/m_restrictchans.so
+lib/inspircd/modules/m_restrictmsg.so
+lib/inspircd/modules/m_safelist.so
+lib/inspircd/modules/m_sajoin.so
+lib/inspircd/modules/m_samode.so
+lib/inspircd/modules/m_sanick.so
+lib/inspircd/modules/m_sapart.so
+lib/inspircd/modules/m_saquit.so
lib/inspircd/modules/m_securelist.so
-lib/inspircd/modules/m_globops.so
-lib/inspircd/modules/m_check.so
lib/inspircd/modules/m_seenicks.so
-lib/inspircd/modules/m_spy.so
-lib/inspircd/modules/m_spanningtree.so
-lib/inspircd/modules/m_swhois.so
-lib/inspircd/modules/m_setname.so
-lib/inspircd/modules/m_nonotice.so
-lib/inspircd/modules/m_randquote.so
-lib/inspircd/modules/m_httpd_stats.so
-lib/inspircd/modules/m_cgiirc.so
-lib/inspircd/modules/m_cloaking.so
+lib/inspircd/modules/m_services.so
+lib/inspircd/modules/m_services_account.so
+lib/inspircd/modules/m_sethost.so
+lib/inspircd/modules/m_setident.so
lib/inspircd/modules/m_setidle.so
+lib/inspircd/modules/m_setname.so
+lib/inspircd/modules/m_sha256.so
+lib/inspircd/modules/m_showwhois.so
lib/inspircd/modules/m_silence.so
-lib/inspircd/modules/m_http_client.so
-lib/inspircd/modules/m_regonlycreate.so
-lib/inspircd/modules/m_operlevels.so
-lib/inspircd/modules/m_messageflood.so
+lib/inspircd/modules/m_silence_ext.so
+lib/inspircd/modules/m_spanningtree.so
+lib/inspircd/modules/m_spy.so
+lib/inspircd/modules/m_ssl_dummy.so
+lib/inspircd/modules/m_sslmodes.so
lib/inspircd/modules/m_stripcolor.so
-lib/inspircd/modules/m_conn_join.so
-lib/inspircd/modules/m_denychans.so
-lib/inspircd/modules/m_httpd.so
-lib/inspircd/modules/m_foobar.so
lib/inspircd/modules/m_svshold.so
-lib/inspircd/modules/m_hostchange.so
-lib/inspircd/modules/m_sajoin.so
-lib/inspircd/modules/m_hidechans.so
-lib/inspircd/modules/m_saquit.so
-lib/inspircd/modules/m_dccallow.so
-lib/inspircd/modules/m_samode.so
-lib/inspircd/modules/m_sethost.so
-lib/inspircd/modules/m_nicklock.so
-lib/inspircd/modules/m_ssl_dummy.so
-lib/inspircd/modules/m_jumpserver.so
-lib/inspircd/modules/m_operlog.so
-lib/inspircd/modules/m_kicknorejoin.so
-lib/inspircd/modules/m_conn_umodes.so
-lib/inspircd/modules/m_setident.so
+lib/inspircd/modules/m_swhois.so
+lib/inspircd/modules/m_taxonomy.so
lib/inspircd/modules/m_testcommand.so
-lib/inspircd/modules/m_clones.so
-lib/inspircd/modules/m_alltime.so
-lib/inspircd/modules/m_auditorium.so
-lib/inspircd/modules/m_chancreate.so
-lib/inspircd/modules/m_chgident.so
-lib/inspircd/modules/m_restrictbanned.so
-lib/inspircd/modules/m_antibear.so
+lib/inspircd/modules/m_timedbans.so
+lib/inspircd/modules/m_tline.so
+lib/inspircd/modules/m_uhnames.so
+lib/inspircd/modules/m_uninvite.so
+lib/inspircd/modules/m_userip.so
+lib/inspircd/modules/m_vhost.so
+lib/inspircd/modules/m_watch.so
+lib/inspircd/modules/m_xmlsocket.so
+%%FILTER_PCRE%%lib/inspircd/modules/m_filter_pcre.so
+%%LDAPAUTH%%lib/inspircd/modules/m_ldapauth.so
+%%MYSQL%%lib/inspircd/modules/m_mysql.so
+%%PGSQL%%lib/inspircd/modules/m_pgsql.so
+%%SQLMODULES%%lib/inspircd/modules/m_sqlauth.so
+%%SQLITE3%%lib/inspircd/modules/m_sqlite3.so
+%%SQLMODULES%%lib/inspircd/modules/m_sqllog.so
+%%SQLMODULES%%lib/inspircd/modules/m_sqloper.so
+%%SQLMODULES%%lib/inspircd/modules/m_sqlutils.so
+%%GNUTLS%%lib/inspircd/modules/m_ssl_gnutls.so
+%%OPENSSL%%lib/inspircd/modules/m_ssl_openssl.so
+%%SSLMODULES%%lib/inspircd/modules/m_ssl_oper_cert.so
+%%SSLMODULES%%lib/inspircd/modules/m_sslinfo.so
+%%ZIPLINK%%lib/inspircd/modules/m_ziplink.so
@dirrm inspircd
@dirrm lib/inspircd/modules
@dirrm lib/inspircd
-@unexec if cmp -s %D/etc/inspircd/inspircd.censor.example %D/etc/inspircd/inspircd.censor; then rm -f %D/etc/inspircd/inspircd.censor; fi
-etc/inspircd/inspircd.censor.example
+@mode 640
+@group %%INSPIRCD_GRP%%
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.censor.example %D/%%ETCDIR%%/inspircd.censor; then rm -f %D/%%ETCDIR%%/inspircd.censor; fi
+%%ETCDIR%%/inspircd.censor.example
@exec if [ ! -f %B/inspircd.censor ] ; then cp -p %D/%F %B/inspircd.censor; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.conf.example %D/etc/inspircd/inspircd.conf; then rm -f %D/etc/inspircd/inspircd.conf; fi
-etc/inspircd/inspircd.conf.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.conf.example %D/%%ETCDIR%%/inspircd.conf; then rm -f %D/%%ETCDIR%%/inspircd.conf; fi
+%%ETCDIR%%/inspircd.conf.example
@exec if [ ! -f %B/inspircd.conf ] ; then cp -p %D/%F %B/inspircd.conf; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.filter.example %D/etc/inspircd/inspircd.filter; then rm -f %D/etc/inspircd/inspircd.filter; fi
-etc/inspircd/inspircd.filter.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.filter.example %D/%%ETCDIR%%/inspircd.filter; then rm -f %D/%%ETCDIR%%/inspircd.filter; fi
+%%ETCDIR%%/inspircd.filter.example
@exec if [ ! -f %B/inspircd.filter ] ; then cp -p %D/%F %B/inspircd.filter; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.helpop.example %D/etc/inspircd/inspircd.helpop; then rm -f %D/etc/inspircd/inspircd.helpop; fi
-etc/inspircd/inspircd.helpop.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.helpop.example %D/%%ETCDIR%%/inspircd.helpop; then rm -f %D/%%ETCDIR%%/inspircd.helpop; fi
+%%ETCDIR%%/inspircd.helpop.example
@exec if [ ! -f %B/inspircd.helpop ] ; then cp -p %D/%F %B/inspircd.helpop; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.helpop-full.example %D/etc/inspircd/inspircd.helpop; then rm -f %D/etc/inspircd/inspircd.helpop; fi
-etc/inspircd/inspircd.helpop-full.example
-@unexec if cmp -s %D/etc/inspircd/inspircd.motd.example %D/etc/inspircd/inspircd.motd; then rm -f %D/etc/inspircd/inspircd.motd; fi
-etc/inspircd/inspircd.motd.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.helpop-full.example %D/%%ETCDIR%%/inspircd.helpop-full; then rm -f %D/%%ETCDIR%%/inspircd.helpop-full; fi
+%%ETCDIR%%/inspircd.helpop-full.example
+@exec if [ ! -f %B/inspircd.helpop-full ] ; then cp -p %D/%F %B/inspircd.helpop-full; fi
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.motd.example %D/%%ETCDIR%%/inspircd.motd; then rm -f %D/%%ETCDIR%%/inspircd.motd; fi
+%%ETCDIR%%/inspircd.motd.example
@exec if [ ! -f %B/inspircd.motd ] ; then cp -p %D/%F %B/inspircd.motd; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.quotes.example %D/etc/inspircd/inspircd.quotes; then rm -f %D/etc/inspircd/inspircd.quotes; fi
-etc/inspircd/inspircd.quotes.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.quotes.example %D/%%ETCDIR%%/inspircd.quotes; then rm -f %D/%%ETCDIR%%/inspircd.quotes; fi
+%%ETCDIR%%/inspircd.quotes.example
@exec if [ ! -f %B/inspircd.quotes ] ; then cp -p %D/%F %B/inspircd.quotes; fi
-@unexec if cmp -s %D/etc/inspircd/inspircd.rules.example %D/etc/inspircd/inspircd.rules; then rm -f %D/etc/inspircd/inspircd.rules; fi
-etc/inspircd/inspircd.rules.example
+@unexec if cmp -s %D/%%ETCDIR%%/inspircd.rules.example %D/%%ETCDIR%%/inspircd.rules; then rm -f %D/%%ETCDIR%%/inspircd.rules; fi
+%%ETCDIR%%/inspircd.rules.example
@exec if [ ! -f %B/inspircd.rules ] ; then cp -p %D/%F %B/inspircd.rules; fi
-@dirrmtry etc/inspircd
+@dirrmtry %%ETCDIR%%
+@mode
+@group