summaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2006-01-27 06:09:27 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2006-01-27 06:09:27 +0000
commit4019b070f6746eb2a0556fd6ac002eb6dce8ec70 (patch)
treed24afa98baa95e0b695620c127d103e5c2b0483f /irc
parentUSE_MESA has been removed from bsd.port.mk. (diff)
Add ircd-ratbox.
This is a port of the ircd-ratbox IRC daemon. ircd-ratbox is the primary ircd used on EFnet; it combines the stability of an ircd required for a large production network together with a rich set of features, making it also suitable for use on smaller networks. WWW: http://www.ircd-ratbox.org/ PR: ports/92404 Submitted by: Shaun Amott <shaun@inerd.com>
Notes
Notes: svn path=/head/; revision=154556
Diffstat (limited to 'irc')
-rw-r--r--irc/Makefile1
-rw-r--r--irc/ircd-ratbox-devel/Makefile145
-rw-r--r--irc/ircd-ratbox-devel/distinfo3
-rw-r--r--irc/ircd-ratbox-devel/files/ircd-ratbox.sh.in35
-rw-r--r--irc/ircd-ratbox-devel/files/patch-Makefile.in11
-rw-r--r--irc/ircd-ratbox-devel/files/patch-contrib_Makefile.in12
-rw-r--r--irc/ircd-ratbox-devel/files/patch-doc_Makefile.in32
-rw-r--r--irc/ircd-ratbox-devel/files/patch-doc_example.conf59
-rw-r--r--irc/ircd-ratbox-devel/files/patch-doc_example.efnet.conf59
-rw-r--r--irc/ircd-ratbox-devel/files/patch-help_Makefile.in17
-rw-r--r--irc/ircd-ratbox-devel/files/patch-include_config.h19
-rw-r--r--irc/ircd-ratbox-devel/files/patch-modules_Makefile.in16
-rw-r--r--irc/ircd-ratbox-devel/files/patch-servlink_Makefile.in12
-rw-r--r--irc/ircd-ratbox-devel/files/patch-src_Makefile.in12
-rw-r--r--irc/ircd-ratbox-devel/files/patch-tools_Makefile.in12
-rw-r--r--irc/ircd-ratbox-devel/files/pkg-install.in117
-rw-r--r--irc/ircd-ratbox-devel/files/pkg-message.in14
-rw-r--r--irc/ircd-ratbox-devel/pkg-descr7
-rw-r--r--irc/ircd-ratbox-devel/pkg-plist236
-rw-r--r--irc/ircd-ratbox/Makefile145
-rw-r--r--irc/ircd-ratbox/distinfo3
-rw-r--r--irc/ircd-ratbox/files/ircd-ratbox.sh.in35
-rw-r--r--irc/ircd-ratbox/files/patch-Makefile.in11
-rw-r--r--irc/ircd-ratbox/files/patch-contrib_Makefile.in12
-rw-r--r--irc/ircd-ratbox/files/patch-doc_Makefile.in32
-rw-r--r--irc/ircd-ratbox/files/patch-doc_example.conf59
-rw-r--r--irc/ircd-ratbox/files/patch-doc_example.efnet.conf59
-rw-r--r--irc/ircd-ratbox/files/patch-help_Makefile.in17
-rw-r--r--irc/ircd-ratbox/files/patch-include_config.h19
-rw-r--r--irc/ircd-ratbox/files/patch-modules_Makefile.in16
-rw-r--r--irc/ircd-ratbox/files/patch-servlink_Makefile.in12
-rw-r--r--irc/ircd-ratbox/files/patch-src_Makefile.in12
-rw-r--r--irc/ircd-ratbox/files/patch-tools_Makefile.in12
-rw-r--r--irc/ircd-ratbox/files/pkg-install.in117
-rw-r--r--irc/ircd-ratbox/files/pkg-message.in14
-rw-r--r--irc/ircd-ratbox/pkg-descr7
-rw-r--r--irc/ircd-ratbox/pkg-plist236
37 files changed, 1637 insertions, 0 deletions
diff --git a/irc/Makefile b/irc/Makefile
index 86dc2b375f92..b9b9ac8de013 100644
--- a/irc/Makefile
+++ b/irc/Makefile
@@ -40,6 +40,7 @@
SUBDIR += ircII
SUBDIR += ircd-hybrid
SUBDIR += ircd-hybrid-ru
+ SUBDIR += ircd-ratbox
SUBDIR += ircd-ru
SUBDIR += ircd-rusnet
SUBDIR += ircg
diff --git a/irc/ircd-ratbox-devel/Makefile b/irc/ircd-ratbox-devel/Makefile
new file mode 100644
index 000000000000..d7d3ae0b5d9c
--- /dev/null
+++ b/irc/ircd-ratbox-devel/Makefile
@@ -0,0 +1,145 @@
+# New ports collection makefile for: ircd-ratbox
+# Date Created: 2006-01-27
+# Whom: Shaun Amott <shaun@inerd.com>
+#
+# $FreeBSD$
+#
+# ex: ts=8
+
+PORTNAME= ircd-ratbox
+PORTVERSION= 2.1.7
+CATEGORIES= irc ipv6
+MASTER_SITES= ftp://ftp.ircd-ratbox.org/pub/ircd-ratbox/ \
+ ftp://ftp.demon.co.uk/pub/mirrors/ircd-ratbox/ \
+ http://www.ircd-ratbox.org/download/ \
+ ftp://ftp.parodius.com/pub/ircd-ratbox/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= shaun@inerd.com
+COMMENT= An advanced, stable IRC daemon, used on many EFnet servers
+
+MAN8= ircd.8
+USE_RC_SUBR= ircd-ratbox.sh
+
+LOGDIR= /var/log/${PORTNAME}
+RUNDIR= /var/run/${PORTNAME}
+SUB_FILES= pkg-message pkg-install
+PLIST_SUB= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
+SUB_LIST= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-confdir=${PREFIX}/etc/${PORTNAME} \
+ --with-logdir=/var/log/${PORTNAME} \
+ --with-moduledir=${PREFIX}/lib/${PORTNAME}/modules \
+ --with-helpdir=${DATADIR}/help
+
+PORTDOCS= [^i]*.txt README.* technical/[^i]*.txt Tao-of-IRC.*
+
+#-- Options ------------------------------------------------------------
+
+OPTIONS= KQUEUE "Use superior kqueue(2) instead of poll(2)" on \
+ OPENSSL "Enable openssl support" on \
+ IPV6 "Enable IPv6 support" off \
+ ZIPLINKS "Enable ziplinks support" on \
+ SHARED_MODULES "Enable shared modules support" on \
+ ASSERT "Enable debugging code" off \
+ SMALL_NET "Tune server for small networks" off \
+ SERVICES "Enable ratbox-services compatibility code" off
+
+#----------------------------------------------------------------------
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_KQUEUE)
+CONFIGURE_ARGS+= --enable-kqueue
+.else
+CONFIGURE_ARGS+= --enable-poll
+.endif
+
+.if defined(WITH_OPENSSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CONFIGURE_ARGS+= --enable-openssl
+.else
+CONFIGURE_ARGS+= --disable-openssl
+.endif
+
+.if defined(WITH_IPV6)
+CONFIGURE_ARGS+= --enable-ipv6
+.endif
+
+.if defined(WITHOUT_ZIPLINKS)
+CONFIGURE_ARGS+= --disable-zlib
+.endif
+
+.if defined(WITHOUT_SHARED_MODULES)
+CONFIGURE_ARGS+= --disable-shared-modules
+.endif
+
+.if defined(WITH_ASSERT)
+CONFIGURE_ARGS+= --enable-assert
+.else
+CONFIGURE_ARGS+= --disable-assert
+.endif
+
+.if defined(WITH_SMALL_NET)
+CONFIGURE_ARGS+= --enable-small-net
+.endif
+
+.if defined(WITH_SERVICES)
+CONFIGURE_ARGS+= --enable-services
+.endif
+
+#-- User Configuration -------------------------------------------------
+
+.if defined(NICKLEN)
+CONFIGURE_ARGS+= --with-nicklen=${NICKLEN}
+.endif
+
+.if defined(TOPICLEN)
+CONFIGURE_ARGS+= --with-topiclen=${TOPICLEN}
+.endif
+
+.if defined(MAXCLIENTS)
+CONFIGURE_ARGS+= --with-maxclients=${MAXCLIENTS}
+.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} " TOPICLEN [default 120, max 390] - Max topic length"
+ @${ECHO_MSG} " MAXCLIENTS [default 3000] - Max clients server can handle"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Press CTRL+C now if you wish to set them."
+ @${ECHO_MSG} ""
+
+post-patch:
+ @${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#%%RUNDIR%%#${RUNDIR}#g" ${WRKSRC}/include/config.h
+
+pre-su-install:
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ ${MKDIR} ${PREFIX}/etc/${PORTNAME}
+ ${MKDIR} ${DATADIR}/help
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}/modules
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/doc/ircd.motd ${PREFIX}/etc/${PORTNAME}/ircd.motd.sample
+ ${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
+
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+#-----------------------------------------------------------------------
+
+.include <bsd.port.post.mk>
diff --git a/irc/ircd-ratbox-devel/distinfo b/irc/ircd-ratbox-devel/distinfo
new file mode 100644
index 000000000000..a3e82695c683
--- /dev/null
+++ b/irc/ircd-ratbox-devel/distinfo
@@ -0,0 +1,3 @@
+MD5 (ircd-ratbox-2.1.7.tgz) = 204b2125456c9b43600b2fb60f99286b
+SHA256 (ircd-ratbox-2.1.7.tgz) = 3373c0423496a1270615a4d62c98cd8b0500efe994c96b0040815091e64a93d7
+SIZE (ircd-ratbox-2.1.7.tgz) = 683398
diff --git a/irc/ircd-ratbox-devel/files/ircd-ratbox.sh.in b/irc/ircd-ratbox-devel/files/ircd-ratbox.sh.in
new file mode 100644
index 000000000000..2c42999e475d
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/ircd-ratbox.sh.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# PROVIDE: ircd-ratbox
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="ircd_ratbox"
+rcvar=`set_rcvar`
+load_rc_config $name
+
+ircd_ratbox_enable=${ircd_ratbox_enable:-"NO"}
+ircd_ratbox_user=${ircd_ratbox_user:-"ircd"}
+ircd_ratbox_group=${ircd_ratbox_group:-"ircd"}
+
+command="%%PREFIX%%/bin/ircd"
+pidfile=%%RUNDIR%%/ircd.pid
+required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
+
+start_precmd=prestart
+stop_precmd=prestop
+
+prestart()
+{
+ touch $pidfile
+ chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile
+}
+
+prestop()
+{
+ rm -f $pidfile
+}
+
+run_rc_command "$1"
diff --git a/irc/ircd-ratbox-devel/files/patch-Makefile.in b/irc/ircd-ratbox-devel/files/patch-Makefile.in
new file mode 100644
index 000000000000..199c2bf72f8e
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Fri Dec 10 21:28:20 2004
++++ Makefile.in Mon Jan 23 17:10:28 2006
+@@ -46,7 +46,7 @@
+ # the system one.
+ #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
+ SHELL=/bin/sh
+-SUBDIRS=modules adns src tools servlink doc help
++SUBDIRS=modules adns src tools servlink doc help contrib
+ CLEANDIRS = ${SUBDIRS} contrib
+ RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
+
diff --git a/irc/ircd-ratbox-devel/files/patch-contrib_Makefile.in b/irc/ircd-ratbox-devel/files/patch-contrib_Makefile.in
new file mode 100644
index 000000000000..bdb7811db55e
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-contrib_Makefile.in
@@ -0,0 +1,12 @@
+--- contrib/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ contrib/Makefile.in Mon Jan 23 17:17:00 2006
+@@ -43,8 +43,7 @@
+ spy_stats_p_notice.c \
+ spy_trace_notice.c \
+ spy_whois_notice.c \
+- spy_whois_notice_global.c \
+- example_module.c
++ spy_whois_notice_global.c
+
+ OBJS = ${SRCS:.c=.so}
+
diff --git a/irc/ircd-ratbox-devel/files/patch-doc_Makefile.in b/irc/ircd-ratbox-devel/files/patch-doc_Makefile.in
new file mode 100644
index 000000000000..5d60cc8aab3d
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-doc_Makefile.in
@@ -0,0 +1,32 @@
+--- doc/Makefile.in.orig Fri Jun 18 01:19:00 2004
++++ doc/Makefile.in Fri Jan 27 07:03:15 2006
+@@ -53,28 +53,9 @@
+ fi
+
+ install: install-mkdirs build
+- @echo "ircd: installing example config files ($(CONFS))"
+- @for i in $(CONFS); do \
+- if test -f $(DESTDIR)$(confdir)/$$i; then \
+- $(MV) $(DESTDIR)$(confdir)/$$i $(DESTDIR)$(confdir)/$$i.old; \
+- fi; \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(confdir); \
+- done
+-
+- @for i in $(DEFAULTCONFS); do \
+- if test ! -f $(DESTDIR)$(confdir)/$$i; then \
+- echo "ircd: creating config file ($$i)"; \
+- ${TOUCH} $(DESTDIR)$(confdir)/$$i; \
+- fi; \
+- done
+-
+ -@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \
+ echo "ircd: installing motd file (ircd.motd)"; \
+- $(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \
+- fi
+-
+- -@if test -f $(DESTDIR)$(confdir)/links.txt; then \
+- $(RM) $(DESTDIR)$(confdir)/links.txt; \
++ $(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir)/ircd.motd.sample; \
+ fi
+
+ @echo "ircd: installing manpage"
diff --git a/irc/ircd-ratbox-devel/files/patch-doc_example.conf b/irc/ircd-ratbox-devel/files/patch-doc_example.conf
new file mode 100644
index 000000000000..4108098b4891
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-doc_example.conf
@@ -0,0 +1,59 @@
+--- doc/example.conf.orig Sat Jun 11 22:26:01 2005
++++ doc/example.conf Fri Jan 27 06:46:05 2006
+@@ -110,16 +110,16 @@
+ * - operspylog: operspy usage
+ * - ioerrorlog: IO errors
+ */
+- fname_userlog = "logs/userlog";
+- #fname_fuserlog = "logs/fuserlog";
+- fname_operlog = "logs/operlog";
+- #fname_foperlog = "logs/foperlog";
+- fname_serverlog = "logs/serverlog";
+- fname_glinelog = "logs/glinelog";
+- #fname_klinelog = "logs/klinelog";
+- fname_killlog = "logs/killlog";
+- fname_operspylog = "logs/operspylog";
+- #fname_ioerrorlog = "logs/ioerror";
++ fname_userlog = "%%LOGDIR%%/userlog";
++ #fname_fuserlog = "%%LOGDIR%%/fuserlog";
++ fname_operlog = "%%LOGDIR%%/operlog";
++ #fname_foperlog = "%%LOGDIR%%/foperlog";
++ fname_serverlog = "%%LOGDIR%%/serverlog";
++ fname_glinelog = "%%LOGDIR%%/glinelog";
++ #fname_klinelog = "%%LOGDIR%%/klinelog";
++ fname_killlog = "%%LOGDIR%%/killlog";
++ fname_operspylog = "%%LOGDIR%%/operspylog";
++ #fname_ioerrorlog = "%%LOGDIR%%/ioerror";
+ };
+
+ /* class {}: contain information about classes for users (OLD Y:) */
+@@ -309,7 +309,7 @@
+ * A password should not be defined when this is used, see
+ * doc/challenge.txt for more information.
+ */
+- #rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
++ #rsa_public_key_file = "%%PREFIX%%/etc/ircd-ratbox/oper.pub";
+
+ /* umodes: the specific umodes this oper gets when they oper.
+ * If this is specified an oper will not be given oper_umodes
+@@ -878,7 +878,7 @@
+ *
+ * only define if servlink is not in same directory as ircd itself.
+ */
+- #servlink_path = "/usr/local/ircd/bin/servlink";
++ #servlink_path = "%%PREFIX%%/bin/servlink";
+
+ /* use egd: if your system does not have *random devices yet you
+ * want to use OpenSSL and encrypted links, enable this. Beware -
+@@ -923,8 +923,9 @@
+ /* module path: paths to search for modules specified below and
+ * in /modload.
+ */
+- path = "/usr/local/ircd/modules";
+- path = "/usr/local/ircd/modules/autoload";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/autoload/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/contrib/";
+
+ /* module: the name of a module to load on startup/rehash */
+ #module = "some_module.so";
diff --git a/irc/ircd-ratbox-devel/files/patch-doc_example.efnet.conf b/irc/ircd-ratbox-devel/files/patch-doc_example.efnet.conf
new file mode 100644
index 000000000000..7ab45d8ada35
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-doc_example.efnet.conf
@@ -0,0 +1,59 @@
+--- doc/example.efnet.conf.orig Sat Jun 11 22:26:01 2005
++++ doc/example.efnet.conf Fri Jan 27 06:47:05 2006
+@@ -112,16 +112,16 @@
+ * - operspylog: operspy usage
+ * - ioerrorlog: IO errors
+ */
+- fname_userlog = "logs/userlog";
+- #fname_fuserlog = "logs/fuserlog";
+- fname_operlog = "logs/operlog";
+- #fname_foperlog = "logs/foperlog";
+- fname_serverlog = "logs/serverlog";
+- fname_glinelog = "logs/glinelog";
+- #fname_klinelog = "logs/klinelog";
+- fname_killlog = "logs/killlog";
+- fname_operspylog = "logs/operspylog";
+- #fname_ioerrorlog = "logs/ioerror";
++ fname_userlog = "%%LOGDIR%%/userlog";
++ #fname_fuserlog = "%%LOGDIR%%/fuserlog";
++ fname_operlog = "%%LOGDIR%%/operlog";
++ #fname_foperlog = "%%LOGDIR%%/foperlog";
++ fname_serverlog = "%%LOGDIR%%/serverlog";
++ fname_glinelog = "%%LOGDIR%%/glinelog";
++ #fname_klinelog = "%%LOGDIR%%/klinelog";
++ fname_killlog = "%%LOGDIR%%/killlog";
++ fname_operspylog = "%%LOGDIR%%/operspylog";
++ #fname_ioerrorlog = "%%LOGDIR%%/ioerror";
+ };
+
+ /* class {}: contain information about classes for users (OLD Y:) */
+@@ -311,7 +311,7 @@
+ * A password should not be defined when this is used, see
+ * doc/challenge.txt for more information.
+ */
+- #rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
++ #rsa_public_key_file = "%%PREFIX%%/etc/ircd-ratbox/oper.pub";
+
+ /* umodes: the specific umodes this oper gets when they oper.
+ * If this is specified an oper will not be given oper_umodes
+@@ -897,7 +897,7 @@
+ *
+ * only define if servlink is not in same directory as ircd itself.
+ */
+- #servlink_path = "/usr/local/ircd/bin/servlink";
++ #servlink_path = "%%PREFIX%%/bin/servlink";
+
+ /* use egd: if your system does not have *random devices yet you
+ * want to use OpenSSL and encrypted links, enable this. Beware -
+@@ -942,8 +942,9 @@
+ /* module path: paths to search for modules specified below and
+ * in /modload.
+ */
+- path = "/usr/local/ircd/modules";
+- path = "/usr/local/ircd/modules/autoload";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/autoload/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/contrib/";
+
+ /* module: the name of a module to load on startup/rehash */
+ #module = "some_module.so";
diff --git a/irc/ircd-ratbox-devel/files/patch-help_Makefile.in b/irc/ircd-ratbox-devel/files/patch-help_Makefile.in
new file mode 100644
index 000000000000..8c7be9fe25b0
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-help_Makefile.in
@@ -0,0 +1,17 @@
+--- help/Makefile.in.orig Mon Sep 12 16:58:45 2005
++++ help/Makefile.in Mon Jan 23 23:15:32 2006
+@@ -63,14 +63,6 @@
+ rm -f opers/index.tmp
+
+ install:
+- -@if test -d $(DESTDIR)$(helpdir)-old; then \
+- rm -rf $(DESTDIR)$(helpdir)-old; \
+- fi
+- -@if test -d $(DESTDIR)$(helpdir); then \
+- echo "ircd: backing up old help files"; \
+- mv $(DESTDIR)$(helpdir) $(DESTDIR)$(helpdir)-old; \
+- fi
+-
+ @echo "ircd: setting up help directory structure"
+ @mkdir -p -m 755 $(DESTDIR)$(helpdir)
+ @mkdir -p -m 755 $(DESTDIR)$(helpdir)/opers
diff --git a/irc/ircd-ratbox-devel/files/patch-include_config.h b/irc/ircd-ratbox-devel/files/patch-include_config.h
new file mode 100644
index 000000000000..523b94915e00
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-include_config.h
@@ -0,0 +1,19 @@
+--- include/config.h.orig Thu Jan 20 11:04:40 2005
++++ include/config.h Fri Jan 27 02:25:37 2006
+@@ -56,6 +56,7 @@
+ #define LOGPATH LOG_DIR
+ #define UHPATH HELP_DIR "/users"
+ #define HPATH HELP_DIR "/opers"
++#define RUNPATH "%%RUNDIR%%"
+
+ /* files */
+ #define SPATH BINPATH "/ircd" /* ircd executable */
+@@ -68,7 +69,7 @@
+ #define RPATH ETCPATH "/ircd.rsa" /* ircd rsa private keyfile */
+ #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
+ #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
+-#define PPATH ETCPATH "/ircd.pid" /* pid file */
++#define PPATH RUNPATH "/ircd.pid" /* pid file */
+ #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
+
+ /* IGNORE_BOGUS_TS
diff --git a/irc/ircd-ratbox-devel/files/patch-modules_Makefile.in b/irc/ircd-ratbox-devel/files/patch-modules_Makefile.in
new file mode 100644
index 000000000000..09c39d6f5f7f
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-modules_Makefile.in
@@ -0,0 +1,16 @@
+--- modules/Makefile.in.orig Sun Jul 17 18:55:27 2005
++++ modules/Makefile.in Mon Jan 23 23:19:03 2006
+@@ -147,13 +147,6 @@
+ -@if test ! -d $(DESTDIR)$(moduledir); then \
+ mkdir $(DESTDIR)$(moduledir); \
+ fi
+- -@if test -d $(DESTDIR)$(moduledir)-old; then \
+- rm -rf $(DESTDIR)$(moduledir)-old; \
+- fi
+- -@if test -d $(DESTDIR)$(moduledir); then \
+- echo "ircd: backing up modules"; \
+- mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
+- fi
+
+ @mkdir -p -m 755 $(DESTDIR)$(moduledir)
+ @mkdir -p -m 755 $(DESTDIR)$(automoduledir)
diff --git a/irc/ircd-ratbox-devel/files/patch-servlink_Makefile.in b/irc/ircd-ratbox-devel/files/patch-servlink_Makefile.in
new file mode 100644
index 000000000000..39832cf4f987
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-servlink_Makefile.in
@@ -0,0 +1,12 @@
+--- servlink/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ servlink/Makefile.in Fri Jan 27 02:29:59 2006
+@@ -51,9 +51,6 @@
+ install: build
+ @echo "ircd: installing servlink ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done
+
diff --git a/irc/ircd-ratbox-devel/files/patch-src_Makefile.in b/irc/ircd-ratbox-devel/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..8c05204e83d8
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-src_Makefile.in
@@ -0,0 +1,12 @@
+--- src/Makefile.in.orig Thu Feb 24 01:48:06 2005
++++ src/Makefile.in Fri Jan 27 02:29:08 2006
+@@ -125,9 +125,6 @@
+ fi
+ @echo "ircd: installing ircd ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done
+
diff --git a/irc/ircd-ratbox-devel/files/patch-tools_Makefile.in b/irc/ircd-ratbox-devel/files/patch-tools_Makefile.in
new file mode 100644
index 000000000000..7d3a70444b7d
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/patch-tools_Makefile.in
@@ -0,0 +1,12 @@
+--- tools/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ tools/Makefile.in Fri Jan 27 02:30:32 2006
+@@ -92,9 +92,6 @@
+ install: install-mkdirs build
+ @echo "ircd: installing tools ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done; \
+ $(RM) -f $(DESTDIR)$(bindir)/vimotd $(DESTDIR)$(bindir)/viklines
diff --git a/irc/ircd-ratbox-devel/files/pkg-install.in b/irc/ircd-ratbox-devel/files/pkg-install.in
new file mode 100644
index 000000000000..135cee12edb2
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/pkg-install.in
@@ -0,0 +1,117 @@
+#!/bin/sh
+#
+# Adapted from irc/ircd-hybrid's script
+#
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+#-----------------------------------------------------------------------
+if [ "x$2" = "xPRE-INSTALL" ]; then
+#-----------------------------------------------------------------------
+
+if which -s pw ; then
+ :
+else
+ cat <<EOF
+Your system does not include the "pw" utility. You should upgrade
+to a newer version of FreeBSD. Without "pw" this script will not
+run.
+EOF
+ exit 1
+fi
+
+echo ""
+if pw groupshow ircd 2> /dev/null ; then
+ echo "You already have a group \"ircd\", so I will use it."
+else
+ if pw groupshow 72 2> /dev/null ; then
+ echo "You already have a gid \"72\". Please create a user \"ircd\""
+ echo "with a default group of \"ircd\"."
+ exit 1
+ fi
+ echo "You need a group \"ircd\"."
+ if which -s pw && yesno "Would you like me to create it" y; then
+ pw groupadd ircd -g 72 || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ if ! pw usershow ircd 2> /dev/null ; then
+ echo "While you're at it, please create a user \"ircd\""
+ echo 'too, with a default group of "ircd".'
+ fi
+ exit 1
+ fi
+fi
+
+if pw usershow ircd 2> /dev/null ; then
+ echo "You already have a user \"ircd\", so I will use it."
+else
+ if pw usershow 72 2> /dev/null ; then
+ echo "You already have a uid \"72\". Please create a user \"irc
+d\""
+ echo "with a default group of \"ircd\"."
+ exit 1
+ fi
+ echo "You need a user \"ircd\"."
+ if which -s pw && yesno "Would you like me to create it" y; then
+ pw useradd ircd -g ircd -u 72 -h - -d /nonexistent \
+ -s /nonexistent -c "IRC Daemon" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+#-----------------------------------------------------------------------
+elif [ "x$2" = "xPOST-INSTALL" ]; then
+#-----------------------------------------------------------------------
+
+mkdir -p %%LOGDIR%% \
+&& chown ircd:ircd %%LOGDIR%% \
+&& chmod 750 %%LOGDIR%%
+
+mkdir -p %%RUNDIR%% \
+&& chown ircd:ircd %%RUNDIR%% \
+&& chmod 750 %%RUNDIR%%
+
+# Secure permissions if we think this is a fresh install
+
+if [ ! -f ${PKG_PREFIX}/etc/ircd-ratbox/ircd.conf ]; then
+ chown -R ircd:ircd ${PKG_PREFIX}/etc/ircd-ratbox/
+ chmod 750 ${PKG_PREFIX}/etc/ircd-ratbox/
+ chmod 640 ${PKG_PREFIX}/etc/ircd-ratbox/*
+fi
+
+#-----------------------------------------------------------------------
+fi
+#-----------------------------------------------------------------------
+
+exit 0
diff --git a/irc/ircd-ratbox-devel/files/pkg-message.in b/irc/ircd-ratbox-devel/files/pkg-message.in
new file mode 100644
index 000000000000..ac96137de8c7
--- /dev/null
+++ b/irc/ircd-ratbox-devel/files/pkg-message.in
@@ -0,0 +1,14 @@
+------------------------------------------------------------------------
+ircd-ratbox has been successfully installed.
+
+You should now copy %%PREFIX%%/etc/ircd-ratbox/ircd.conf.sample to
+%%PREFIX%%/etc/ircd-ratbox/ircd.conf, and edit it as per the ratbox
+documentation. This file is required to start the server.
+
+Once you have added ircd_ratbox_enable="YES" to /etc/rc.conf, the
+server can be started by running:
+
+ %%PREFIX%%/etc/rc.d/ircd-ratbox.sh start
+
+Be sure to check out 'ratbox-services' if you need a services package.
+------------------------------------------------------------------------
diff --git a/irc/ircd-ratbox-devel/pkg-descr b/irc/ircd-ratbox-devel/pkg-descr
new file mode 100644
index 000000000000..9ffd84789266
--- /dev/null
+++ b/irc/ircd-ratbox-devel/pkg-descr
@@ -0,0 +1,7 @@
+This is a port of the ircd-ratbox IRC daemon.
+
+ircd-ratbox is the primary ircd used on EFnet; it combines the stability
+of an ircd required for a large production network together with a rich
+set of features, making it also suitable for use on smaller networks.
+
+WWW: http://www.ircd-ratbox.org/
diff --git a/irc/ircd-ratbox-devel/pkg-plist b/irc/ircd-ratbox-devel/pkg-plist
new file mode 100644
index 000000000000..c2f27389fee2
--- /dev/null
+++ b/irc/ircd-ratbox-devel/pkg-plist
@@ -0,0 +1,236 @@
+bin/convertilines
+bin/convertklines
+bin/ircd
+bin/mkpasswd
+bin/servlink
+bin/viconf
+bin/viklines
+bin/vimotd
+etc/ircd-ratbox/ircd-efnet.conf.sample
+etc/ircd-ratbox/ircd.conf.sample
+etc/ircd-ratbox/ircd.motd.sample
+lib/ircd-ratbox/modules/autoload/m_accept.so
+lib/ircd-ratbox/modules/autoload/m_admin.so
+lib/ircd-ratbox/modules/autoload/m_away.so
+lib/ircd-ratbox/modules/autoload/m_cap.so
+lib/ircd-ratbox/modules/autoload/m_capab.so
+lib/ircd-ratbox/modules/autoload/m_challenge.so
+lib/ircd-ratbox/modules/autoload/m_close.so
+lib/ircd-ratbox/modules/autoload/m_cmessage.so
+lib/ircd-ratbox/modules/autoload/m_connect.so
+lib/ircd-ratbox/modules/autoload/m_dline.so
+lib/ircd-ratbox/modules/autoload/m_encap.so
+lib/ircd-ratbox/modules/autoload/m_etrace.so
+lib/ircd-ratbox/modules/autoload/m_gline.so
+lib/ircd-ratbox/modules/autoload/m_help.so
+lib/ircd-ratbox/modules/autoload/m_info.so
+lib/ircd-ratbox/modules/autoload/m_invite.so
+lib/ircd-ratbox/modules/autoload/m_ison.so
+lib/ircd-ratbox/modules/autoload/m_kline.so
+lib/ircd-ratbox/modules/autoload/m_knock.so
+lib/ircd-ratbox/modules/autoload/m_links.so
+lib/ircd-ratbox/modules/autoload/m_list.so
+lib/ircd-ratbox/modules/autoload/m_locops.so
+lib/ircd-ratbox/modules/autoload/m_lusers.so
+lib/ircd-ratbox/modules/autoload/m_map.so
+lib/ircd-ratbox/modules/autoload/m_monitor.so
+lib/ircd-ratbox/modules/autoload/m_motd.so
+lib/ircd-ratbox/modules/autoload/m_names.so
+lib/ircd-ratbox/modules/autoload/m_oper.so
+lib/ircd-ratbox/modules/autoload/m_operspy.so
+lib/ircd-ratbox/modules/autoload/m_pass.so
+lib/ircd-ratbox/modules/autoload/m_ping.so
+lib/ircd-ratbox/modules/autoload/m_pong.so
+lib/ircd-ratbox/modules/autoload/m_post.so
+lib/ircd-ratbox/modules/autoload/m_rehash.so
+lib/ircd-ratbox/modules/autoload/m_restart.so
+lib/ircd-ratbox/modules/autoload/m_resv.so
+lib/ircd-ratbox/modules/autoload/m_set.so
+lib/ircd-ratbox/modules/autoload/m_stats.so
+lib/ircd-ratbox/modules/autoload/m_svinfo.so
+lib/ircd-ratbox/modules/autoload/m_tb.so
+lib/ircd-ratbox/modules/autoload/m_testline.so
+lib/ircd-ratbox/modules/autoload/m_testmask.so
+lib/ircd-ratbox/modules/autoload/m_time.so
+lib/ircd-ratbox/modules/autoload/m_topic.so
+lib/ircd-ratbox/modules/autoload/m_trace.so
+lib/ircd-ratbox/modules/autoload/m_unreject.so
+lib/ircd-ratbox/modules/autoload/m_user.so
+lib/ircd-ratbox/modules/autoload/m_userhost.so
+lib/ircd-ratbox/modules/autoload/m_users.so
+lib/ircd-ratbox/modules/autoload/m_version.so
+lib/ircd-ratbox/modules/autoload/m_wallops.so
+lib/ircd-ratbox/modules/autoload/m_who.so
+lib/ircd-ratbox/modules/autoload/m_whois.so
+lib/ircd-ratbox/modules/autoload/m_whowas.so
+lib/ircd-ratbox/modules/autoload/m_xline.so
+lib/ircd-ratbox/modules/contrib/m_clearchan.so
+lib/ircd-ratbox/modules/contrib/m_flags.so
+lib/ircd-ratbox/modules/contrib/m_force.so
+lib/ircd-ratbox/modules/contrib/m_mkpasswd.so
+lib/ircd-ratbox/modules/contrib/m_ojoin.so
+lib/ircd-ratbox/modules/contrib/m_okick.so
+lib/ircd-ratbox/modules/contrib/m_olist.so
+lib/ircd-ratbox/modules/contrib/m_opme.so
+lib/ircd-ratbox/modules/contrib/spy_admin_notice.so
+lib/ircd-ratbox/modules/contrib/spy_info_notice.so
+lib/ircd-ratbox/modules/contrib/spy_links_notice.so
+lib/ircd-ratbox/modules/contrib/spy_motd_notice.so
+lib/ircd-ratbox/modules/contrib/spy_stats_notice.so
+lib/ircd-ratbox/modules/contrib/spy_stats_p_notice.so
+lib/ircd-ratbox/modules/contrib/spy_trace_notice.so
+lib/ircd-ratbox/modules/contrib/spy_whois_notice.so
+lib/ircd-ratbox/modules/contrib/spy_whois_notice_global.so
+lib/ircd-ratbox/modules/m_die.so
+lib/ircd-ratbox/modules/m_error.so
+lib/ircd-ratbox/modules/m_join.so
+lib/ircd-ratbox/modules/m_kick.so
+lib/ircd-ratbox/modules/m_kill.so
+lib/ircd-ratbox/modules/m_message.so
+lib/ircd-ratbox/modules/m_mode.so
+lib/ircd-ratbox/modules/m_nick.so
+lib/ircd-ratbox/modules/m_part.so
+lib/ircd-ratbox/modules/m_quit.so
+lib/ircd-ratbox/modules/m_server.so
+lib/ircd-ratbox/modules/m_sjoin.so
+lib/ircd-ratbox/modules/m_squit.so
+%%DATADIR%%/help/opers/accept
+%%DATADIR%%/help/opers/admin
+%%DATADIR%%/help/opers/away
+%%DATADIR%%/help/opers/capab
+%%DATADIR%%/help/opers/challenge
+%%DATADIR%%/help/opers/close
+%%DATADIR%%/help/opers/cmode
+%%DATADIR%%/help/opers/cnotice
+%%DATADIR%%/help/opers/connect
+%%DATADIR%%/help/opers/cprivmsg
+%%DATADIR%%/help/opers/credits
+%%DATADIR%%/help/opers/die
+%%DATADIR%%/help/opers/dline
+%%DATADIR%%/help/opers/eob
+%%DATADIR%%/help/opers/error
+%%DATADIR%%/help/opers/etrace
+%%DATADIR%%/help/opers/gline
+%%DATADIR%%/help/opers/help
+%%DATADIR%%/help/opers/index
+%%DATADIR%%/help/opers/info
+%%DATADIR%%/help/opers/invite
+%%DATADIR%%/help/opers/ison
+%%DATADIR%%/help/opers/join
+%%DATADIR%%/help/opers/kick
+%%DATADIR%%/help/opers/kill
+%%DATADIR%%/help/opers/kline
+%%DATADIR%%/help/opers/knock
+%%DATADIR%%/help/opers/links
+%%DATADIR%%/help/opers/list
+%%DATADIR%%/help/opers/locops
+%%DATADIR%%/help/opers/lusers
+%%DATADIR%%/help/opers/map
+%%DATADIR%%/help/opers/modlist
+%%DATADIR%%/help/opers/modload
+%%DATADIR%%/help/opers/modrestart
+%%DATADIR%%/help/opers/modunload
+%%DATADIR%%/help/opers/motd
+%%DATADIR%%/help/opers/names
+%%DATADIR%%/help/opers/nick
+%%DATADIR%%/help/opers/notice
+%%DATADIR%%/help/opers/oper
+%%DATADIR%%/help/opers/operspy
+%%DATADIR%%/help/opers/operwall
+%%DATADIR%%/help/opers/part
+%%DATADIR%%/help/opers/pass
+%%DATADIR%%/help/opers/ping
+%%DATADIR%%/help/opers/pong
+%%DATADIR%%/help/opers/post
+%%DATADIR%%/help/opers/privmsg
+%%DATADIR%%/help/opers/quit
+%%DATADIR%%/help/opers/rehash
+%%DATADIR%%/help/opers/restart
+%%DATADIR%%/help/opers/resv
+%%DATADIR%%/help/opers/server
+%%DATADIR%%/help/opers/set
+%%DATADIR%%/help/opers/sjoin
+%%DATADIR%%/help/opers/squit
+%%DATADIR%%/help/opers/stats
+%%DATADIR%%/help/opers/svinfo
+%%DATADIR%%/help/opers/testgecos
+%%DATADIR%%/help/opers/testline
+%%DATADIR%%/help/opers/testmask
+%%DATADIR%%/help/opers/time
+%%DATADIR%%/help/opers/topic
+%%DATADIR%%/help/opers/trace
+%%DATADIR%%/help/opers/uhelp
+%%DATADIR%%/help/opers/umode
+%%DATADIR%%/help/opers/undline
+%%DATADIR%%/help/opers/ungline
+%%DATADIR%%/help/opers/unkline
+%%DATADIR%%/help/opers/unresv
+%%DATADIR%%/help/opers/unxline
+%%DATADIR%%/help/opers/user
+%%DATADIR%%/help/opers/userhost
+%%DATADIR%%/help/opers/users
+%%DATADIR%%/help/opers/version
+%%DATADIR%%/help/opers/wallops
+%%DATADIR%%/help/opers/who
+%%DATADIR%%/help/opers/whois
+%%DATADIR%%/help/opers/whowas
+%%DATADIR%%/help/opers/xline
+%%DATADIR%%/help/users/accept
+%%DATADIR%%/help/users/admin
+%%DATADIR%%/help/users/away
+%%DATADIR%%/help/users/challenge
+%%DATADIR%%/help/users/cmode
+%%DATADIR%%/help/users/cnotice
+%%DATADIR%%/help/users/cprivmsg
+%%DATADIR%%/help/users/credits
+%%DATADIR%%/help/users/error
+%%DATADIR%%/help/users/help
+%%DATADIR%%/help/users/index
+%%DATADIR%%/help/users/info
+%%DATADIR%%/help/users/invite
+%%DATADIR%%/help/users/ison
+%%DATADIR%%/help/users/join
+%%DATADIR%%/help/users/kick
+%%DATADIR%%/help/users/knock
+%%DATADIR%%/help/users/links
+%%DATADIR%%/help/users/list
+%%DATADIR%%/help/users/lusers
+%%DATADIR%%/help/users/map
+%%DATADIR%%/help/users/motd
+%%DATADIR%%/help/users/names
+%%DATADIR%%/help/users/nick
+%%DATADIR%%/help/users/notice
+%%DATADIR%%/help/users/oper
+%%DATADIR%%/help/users/part
+%%DATADIR%%/help/users/pass
+%%DATADIR%%/help/users/ping
+%%DATADIR%%/help/users/pong
+%%DATADIR%%/help/users/privmsg
+%%DATADIR%%/help/users/quit
+%%DATADIR%%/help/users/stats
+%%DATADIR%%/help/users/time
+%%DATADIR%%/help/users/topic
+%%DATADIR%%/help/users/trace
+%%DATADIR%%/help/users/umode
+%%DATADIR%%/help/users/user
+%%DATADIR%%/help/users/userhost
+%%DATADIR%%/help/users/users
+%%DATADIR%%/help/users/version
+%%DATADIR%%/help/users/who
+%%DATADIR%%/help/users/whois
+%%DATADIR%%/help/users/whowas
+@dirrm lib/ircd-ratbox/modules/autoload
+@dirrm lib/ircd-ratbox/modules/contrib
+@dirrm lib/ircd-ratbox/modules
+@dirrm lib/ircd-ratbox
+@dirrm %%DATADIR%%/help/users
+@dirrm %%DATADIR%%/help/opers
+@dirrm %%DATADIR%%/help
+@dirrm %%DATADIR%%
+@unexec f="%D/etc/ircd-ratbox/dline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/kline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/resv.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/xline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@dirrmtry etc/ircd-ratbox
+@unexec rmdir %%LOGDIR%% 2>/dev/null || true
+@unexec rmdir %%RUNDIR%% 2>/dev/null || true
diff --git a/irc/ircd-ratbox/Makefile b/irc/ircd-ratbox/Makefile
new file mode 100644
index 000000000000..d7d3ae0b5d9c
--- /dev/null
+++ b/irc/ircd-ratbox/Makefile
@@ -0,0 +1,145 @@
+# New ports collection makefile for: ircd-ratbox
+# Date Created: 2006-01-27
+# Whom: Shaun Amott <shaun@inerd.com>
+#
+# $FreeBSD$
+#
+# ex: ts=8
+
+PORTNAME= ircd-ratbox
+PORTVERSION= 2.1.7
+CATEGORIES= irc ipv6
+MASTER_SITES= ftp://ftp.ircd-ratbox.org/pub/ircd-ratbox/ \
+ ftp://ftp.demon.co.uk/pub/mirrors/ircd-ratbox/ \
+ http://www.ircd-ratbox.org/download/ \
+ ftp://ftp.parodius.com/pub/ircd-ratbox/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= shaun@inerd.com
+COMMENT= An advanced, stable IRC daemon, used on many EFnet servers
+
+MAN8= ircd.8
+USE_RC_SUBR= ircd-ratbox.sh
+
+LOGDIR= /var/log/${PORTNAME}
+RUNDIR= /var/run/${PORTNAME}
+SUB_FILES= pkg-message pkg-install
+PLIST_SUB= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
+SUB_LIST= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-confdir=${PREFIX}/etc/${PORTNAME} \
+ --with-logdir=/var/log/${PORTNAME} \
+ --with-moduledir=${PREFIX}/lib/${PORTNAME}/modules \
+ --with-helpdir=${DATADIR}/help
+
+PORTDOCS= [^i]*.txt README.* technical/[^i]*.txt Tao-of-IRC.*
+
+#-- Options ------------------------------------------------------------
+
+OPTIONS= KQUEUE "Use superior kqueue(2) instead of poll(2)" on \
+ OPENSSL "Enable openssl support" on \
+ IPV6 "Enable IPv6 support" off \
+ ZIPLINKS "Enable ziplinks support" on \
+ SHARED_MODULES "Enable shared modules support" on \
+ ASSERT "Enable debugging code" off \
+ SMALL_NET "Tune server for small networks" off \
+ SERVICES "Enable ratbox-services compatibility code" off
+
+#----------------------------------------------------------------------
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_KQUEUE)
+CONFIGURE_ARGS+= --enable-kqueue
+.else
+CONFIGURE_ARGS+= --enable-poll
+.endif
+
+.if defined(WITH_OPENSSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CONFIGURE_ARGS+= --enable-openssl
+.else
+CONFIGURE_ARGS+= --disable-openssl
+.endif
+
+.if defined(WITH_IPV6)
+CONFIGURE_ARGS+= --enable-ipv6
+.endif
+
+.if defined(WITHOUT_ZIPLINKS)
+CONFIGURE_ARGS+= --disable-zlib
+.endif
+
+.if defined(WITHOUT_SHARED_MODULES)
+CONFIGURE_ARGS+= --disable-shared-modules
+.endif
+
+.if defined(WITH_ASSERT)
+CONFIGURE_ARGS+= --enable-assert
+.else
+CONFIGURE_ARGS+= --disable-assert
+.endif
+
+.if defined(WITH_SMALL_NET)
+CONFIGURE_ARGS+= --enable-small-net
+.endif
+
+.if defined(WITH_SERVICES)
+CONFIGURE_ARGS+= --enable-services
+.endif
+
+#-- User Configuration -------------------------------------------------
+
+.if defined(NICKLEN)
+CONFIGURE_ARGS+= --with-nicklen=${NICKLEN}
+.endif
+
+.if defined(TOPICLEN)
+CONFIGURE_ARGS+= --with-topiclen=${TOPICLEN}
+.endif
+
+.if defined(MAXCLIENTS)
+CONFIGURE_ARGS+= --with-maxclients=${MAXCLIENTS}
+.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} " TOPICLEN [default 120, max 390] - Max topic length"
+ @${ECHO_MSG} " MAXCLIENTS [default 3000] - Max clients server can handle"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Press CTRL+C now if you wish to set them."
+ @${ECHO_MSG} ""
+
+post-patch:
+ @${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#%%RUNDIR%%#${RUNDIR}#g" ${WRKSRC}/include/config.h
+
+pre-su-install:
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ ${MKDIR} ${PREFIX}/etc/${PORTNAME}
+ ${MKDIR} ${DATADIR}/help
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}/modules
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/doc/ircd.motd ${PREFIX}/etc/${PORTNAME}/ircd.motd.sample
+ ${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
+
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+#-----------------------------------------------------------------------
+
+.include <bsd.port.post.mk>
diff --git a/irc/ircd-ratbox/distinfo b/irc/ircd-ratbox/distinfo
new file mode 100644
index 000000000000..a3e82695c683
--- /dev/null
+++ b/irc/ircd-ratbox/distinfo
@@ -0,0 +1,3 @@
+MD5 (ircd-ratbox-2.1.7.tgz) = 204b2125456c9b43600b2fb60f99286b
+SHA256 (ircd-ratbox-2.1.7.tgz) = 3373c0423496a1270615a4d62c98cd8b0500efe994c96b0040815091e64a93d7
+SIZE (ircd-ratbox-2.1.7.tgz) = 683398
diff --git a/irc/ircd-ratbox/files/ircd-ratbox.sh.in b/irc/ircd-ratbox/files/ircd-ratbox.sh.in
new file mode 100644
index 000000000000..2c42999e475d
--- /dev/null
+++ b/irc/ircd-ratbox/files/ircd-ratbox.sh.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# PROVIDE: ircd-ratbox
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="ircd_ratbox"
+rcvar=`set_rcvar`
+load_rc_config $name
+
+ircd_ratbox_enable=${ircd_ratbox_enable:-"NO"}
+ircd_ratbox_user=${ircd_ratbox_user:-"ircd"}
+ircd_ratbox_group=${ircd_ratbox_group:-"ircd"}
+
+command="%%PREFIX%%/bin/ircd"
+pidfile=%%RUNDIR%%/ircd.pid
+required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
+
+start_precmd=prestart
+stop_precmd=prestop
+
+prestart()
+{
+ touch $pidfile
+ chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile
+}
+
+prestop()
+{
+ rm -f $pidfile
+}
+
+run_rc_command "$1"
diff --git a/irc/ircd-ratbox/files/patch-Makefile.in b/irc/ircd-ratbox/files/patch-Makefile.in
new file mode 100644
index 000000000000..199c2bf72f8e
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Fri Dec 10 21:28:20 2004
++++ Makefile.in Mon Jan 23 17:10:28 2006
+@@ -46,7 +46,7 @@
+ # the system one.
+ #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
+ SHELL=/bin/sh
+-SUBDIRS=modules adns src tools servlink doc help
++SUBDIRS=modules adns src tools servlink doc help contrib
+ CLEANDIRS = ${SUBDIRS} contrib
+ RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
+
diff --git a/irc/ircd-ratbox/files/patch-contrib_Makefile.in b/irc/ircd-ratbox/files/patch-contrib_Makefile.in
new file mode 100644
index 000000000000..bdb7811db55e
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-contrib_Makefile.in
@@ -0,0 +1,12 @@
+--- contrib/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ contrib/Makefile.in Mon Jan 23 17:17:00 2006
+@@ -43,8 +43,7 @@
+ spy_stats_p_notice.c \
+ spy_trace_notice.c \
+ spy_whois_notice.c \
+- spy_whois_notice_global.c \
+- example_module.c
++ spy_whois_notice_global.c
+
+ OBJS = ${SRCS:.c=.so}
+
diff --git a/irc/ircd-ratbox/files/patch-doc_Makefile.in b/irc/ircd-ratbox/files/patch-doc_Makefile.in
new file mode 100644
index 000000000000..5d60cc8aab3d
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-doc_Makefile.in
@@ -0,0 +1,32 @@
+--- doc/Makefile.in.orig Fri Jun 18 01:19:00 2004
++++ doc/Makefile.in Fri Jan 27 07:03:15 2006
+@@ -53,28 +53,9 @@
+ fi
+
+ install: install-mkdirs build
+- @echo "ircd: installing example config files ($(CONFS))"
+- @for i in $(CONFS); do \
+- if test -f $(DESTDIR)$(confdir)/$$i; then \
+- $(MV) $(DESTDIR)$(confdir)/$$i $(DESTDIR)$(confdir)/$$i.old; \
+- fi; \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(confdir); \
+- done
+-
+- @for i in $(DEFAULTCONFS); do \
+- if test ! -f $(DESTDIR)$(confdir)/$$i; then \
+- echo "ircd: creating config file ($$i)"; \
+- ${TOUCH} $(DESTDIR)$(confdir)/$$i; \
+- fi; \
+- done
+-
+ -@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \
+ echo "ircd: installing motd file (ircd.motd)"; \
+- $(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \
+- fi
+-
+- -@if test -f $(DESTDIR)$(confdir)/links.txt; then \
+- $(RM) $(DESTDIR)$(confdir)/links.txt; \
++ $(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir)/ircd.motd.sample; \
+ fi
+
+ @echo "ircd: installing manpage"
diff --git a/irc/ircd-ratbox/files/patch-doc_example.conf b/irc/ircd-ratbox/files/patch-doc_example.conf
new file mode 100644
index 000000000000..4108098b4891
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-doc_example.conf
@@ -0,0 +1,59 @@
+--- doc/example.conf.orig Sat Jun 11 22:26:01 2005
++++ doc/example.conf Fri Jan 27 06:46:05 2006
+@@ -110,16 +110,16 @@
+ * - operspylog: operspy usage
+ * - ioerrorlog: IO errors
+ */
+- fname_userlog = "logs/userlog";
+- #fname_fuserlog = "logs/fuserlog";
+- fname_operlog = "logs/operlog";
+- #fname_foperlog = "logs/foperlog";
+- fname_serverlog = "logs/serverlog";
+- fname_glinelog = "logs/glinelog";
+- #fname_klinelog = "logs/klinelog";
+- fname_killlog = "logs/killlog";
+- fname_operspylog = "logs/operspylog";
+- #fname_ioerrorlog = "logs/ioerror";
++ fname_userlog = "%%LOGDIR%%/userlog";
++ #fname_fuserlog = "%%LOGDIR%%/fuserlog";
++ fname_operlog = "%%LOGDIR%%/operlog";
++ #fname_foperlog = "%%LOGDIR%%/foperlog";
++ fname_serverlog = "%%LOGDIR%%/serverlog";
++ fname_glinelog = "%%LOGDIR%%/glinelog";
++ #fname_klinelog = "%%LOGDIR%%/klinelog";
++ fname_killlog = "%%LOGDIR%%/killlog";
++ fname_operspylog = "%%LOGDIR%%/operspylog";
++ #fname_ioerrorlog = "%%LOGDIR%%/ioerror";
+ };
+
+ /* class {}: contain information about classes for users (OLD Y:) */
+@@ -309,7 +309,7 @@
+ * A password should not be defined when this is used, see
+ * doc/challenge.txt for more information.
+ */
+- #rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
++ #rsa_public_key_file = "%%PREFIX%%/etc/ircd-ratbox/oper.pub";
+
+ /* umodes: the specific umodes this oper gets when they oper.
+ * If this is specified an oper will not be given oper_umodes
+@@ -878,7 +878,7 @@
+ *
+ * only define if servlink is not in same directory as ircd itself.
+ */
+- #servlink_path = "/usr/local/ircd/bin/servlink";
++ #servlink_path = "%%PREFIX%%/bin/servlink";
+
+ /* use egd: if your system does not have *random devices yet you
+ * want to use OpenSSL and encrypted links, enable this. Beware -
+@@ -923,8 +923,9 @@
+ /* module path: paths to search for modules specified below and
+ * in /modload.
+ */
+- path = "/usr/local/ircd/modules";
+- path = "/usr/local/ircd/modules/autoload";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/autoload/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/contrib/";
+
+ /* module: the name of a module to load on startup/rehash */
+ #module = "some_module.so";
diff --git a/irc/ircd-ratbox/files/patch-doc_example.efnet.conf b/irc/ircd-ratbox/files/patch-doc_example.efnet.conf
new file mode 100644
index 000000000000..7ab45d8ada35
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-doc_example.efnet.conf
@@ -0,0 +1,59 @@
+--- doc/example.efnet.conf.orig Sat Jun 11 22:26:01 2005
++++ doc/example.efnet.conf Fri Jan 27 06:47:05 2006
+@@ -112,16 +112,16 @@
+ * - operspylog: operspy usage
+ * - ioerrorlog: IO errors
+ */
+- fname_userlog = "logs/userlog";
+- #fname_fuserlog = "logs/fuserlog";
+- fname_operlog = "logs/operlog";
+- #fname_foperlog = "logs/foperlog";
+- fname_serverlog = "logs/serverlog";
+- fname_glinelog = "logs/glinelog";
+- #fname_klinelog = "logs/klinelog";
+- fname_killlog = "logs/killlog";
+- fname_operspylog = "logs/operspylog";
+- #fname_ioerrorlog = "logs/ioerror";
++ fname_userlog = "%%LOGDIR%%/userlog";
++ #fname_fuserlog = "%%LOGDIR%%/fuserlog";
++ fname_operlog = "%%LOGDIR%%/operlog";
++ #fname_foperlog = "%%LOGDIR%%/foperlog";
++ fname_serverlog = "%%LOGDIR%%/serverlog";
++ fname_glinelog = "%%LOGDIR%%/glinelog";
++ #fname_klinelog = "%%LOGDIR%%/klinelog";
++ fname_killlog = "%%LOGDIR%%/killlog";
++ fname_operspylog = "%%LOGDIR%%/operspylog";
++ #fname_ioerrorlog = "%%LOGDIR%%/ioerror";
+ };
+
+ /* class {}: contain information about classes for users (OLD Y:) */
+@@ -311,7 +311,7 @@
+ * A password should not be defined when this is used, see
+ * doc/challenge.txt for more information.
+ */
+- #rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
++ #rsa_public_key_file = "%%PREFIX%%/etc/ircd-ratbox/oper.pub";
+
+ /* umodes: the specific umodes this oper gets when they oper.
+ * If this is specified an oper will not be given oper_umodes
+@@ -897,7 +897,7 @@
+ *
+ * only define if servlink is not in same directory as ircd itself.
+ */
+- #servlink_path = "/usr/local/ircd/bin/servlink";
++ #servlink_path = "%%PREFIX%%/bin/servlink";
+
+ /* use egd: if your system does not have *random devices yet you
+ * want to use OpenSSL and encrypted links, enable this. Beware -
+@@ -942,8 +942,9 @@
+ /* module path: paths to search for modules specified below and
+ * in /modload.
+ */
+- path = "/usr/local/ircd/modules";
+- path = "/usr/local/ircd/modules/autoload";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/autoload/";
++ path = "%%PREFIX%%/lib/ircd-ratbox/modules/contrib/";
+
+ /* module: the name of a module to load on startup/rehash */
+ #module = "some_module.so";
diff --git a/irc/ircd-ratbox/files/patch-help_Makefile.in b/irc/ircd-ratbox/files/patch-help_Makefile.in
new file mode 100644
index 000000000000..8c7be9fe25b0
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-help_Makefile.in
@@ -0,0 +1,17 @@
+--- help/Makefile.in.orig Mon Sep 12 16:58:45 2005
++++ help/Makefile.in Mon Jan 23 23:15:32 2006
+@@ -63,14 +63,6 @@
+ rm -f opers/index.tmp
+
+ install:
+- -@if test -d $(DESTDIR)$(helpdir)-old; then \
+- rm -rf $(DESTDIR)$(helpdir)-old; \
+- fi
+- -@if test -d $(DESTDIR)$(helpdir); then \
+- echo "ircd: backing up old help files"; \
+- mv $(DESTDIR)$(helpdir) $(DESTDIR)$(helpdir)-old; \
+- fi
+-
+ @echo "ircd: setting up help directory structure"
+ @mkdir -p -m 755 $(DESTDIR)$(helpdir)
+ @mkdir -p -m 755 $(DESTDIR)$(helpdir)/opers
diff --git a/irc/ircd-ratbox/files/patch-include_config.h b/irc/ircd-ratbox/files/patch-include_config.h
new file mode 100644
index 000000000000..523b94915e00
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-include_config.h
@@ -0,0 +1,19 @@
+--- include/config.h.orig Thu Jan 20 11:04:40 2005
++++ include/config.h Fri Jan 27 02:25:37 2006
+@@ -56,6 +56,7 @@
+ #define LOGPATH LOG_DIR
+ #define UHPATH HELP_DIR "/users"
+ #define HPATH HELP_DIR "/opers"
++#define RUNPATH "%%RUNDIR%%"
+
+ /* files */
+ #define SPATH BINPATH "/ircd" /* ircd executable */
+@@ -68,7 +69,7 @@
+ #define RPATH ETCPATH "/ircd.rsa" /* ircd rsa private keyfile */
+ #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
+ #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
+-#define PPATH ETCPATH "/ircd.pid" /* pid file */
++#define PPATH RUNPATH "/ircd.pid" /* pid file */
+ #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
+
+ /* IGNORE_BOGUS_TS
diff --git a/irc/ircd-ratbox/files/patch-modules_Makefile.in b/irc/ircd-ratbox/files/patch-modules_Makefile.in
new file mode 100644
index 000000000000..09c39d6f5f7f
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-modules_Makefile.in
@@ -0,0 +1,16 @@
+--- modules/Makefile.in.orig Sun Jul 17 18:55:27 2005
++++ modules/Makefile.in Mon Jan 23 23:19:03 2006
+@@ -147,13 +147,6 @@
+ -@if test ! -d $(DESTDIR)$(moduledir); then \
+ mkdir $(DESTDIR)$(moduledir); \
+ fi
+- -@if test -d $(DESTDIR)$(moduledir)-old; then \
+- rm -rf $(DESTDIR)$(moduledir)-old; \
+- fi
+- -@if test -d $(DESTDIR)$(moduledir); then \
+- echo "ircd: backing up modules"; \
+- mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
+- fi
+
+ @mkdir -p -m 755 $(DESTDIR)$(moduledir)
+ @mkdir -p -m 755 $(DESTDIR)$(automoduledir)
diff --git a/irc/ircd-ratbox/files/patch-servlink_Makefile.in b/irc/ircd-ratbox/files/patch-servlink_Makefile.in
new file mode 100644
index 000000000000..39832cf4f987
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-servlink_Makefile.in
@@ -0,0 +1,12 @@
+--- servlink/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ servlink/Makefile.in Fri Jan 27 02:29:59 2006
+@@ -51,9 +51,6 @@
+ install: build
+ @echo "ircd: installing servlink ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done
+
diff --git a/irc/ircd-ratbox/files/patch-src_Makefile.in b/irc/ircd-ratbox/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..8c05204e83d8
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-src_Makefile.in
@@ -0,0 +1,12 @@
+--- src/Makefile.in.orig Thu Feb 24 01:48:06 2005
++++ src/Makefile.in Fri Jan 27 02:29:08 2006
+@@ -125,9 +125,6 @@
+ fi
+ @echo "ircd: installing ircd ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done
+
diff --git a/irc/ircd-ratbox/files/patch-tools_Makefile.in b/irc/ircd-ratbox/files/patch-tools_Makefile.in
new file mode 100644
index 000000000000..7d3a70444b7d
--- /dev/null
+++ b/irc/ircd-ratbox/files/patch-tools_Makefile.in
@@ -0,0 +1,12 @@
+--- tools/Makefile.in.orig Thu Jun 17 23:19:00 2004
++++ tools/Makefile.in Fri Jan 27 02:30:32 2006
+@@ -92,9 +92,6 @@
+ install: install-mkdirs build
+ @echo "ircd: installing tools ($(PROGS))"
+ @for i in $(PROGS); do \
+- if test -f $(DESTDIR)$(bindir)/$$i; then \
+- $(MV) $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.old; \
+- fi; \
+ $(INSTALL_BIN) $$i $(DESTDIR)$(bindir); \
+ done; \
+ $(RM) -f $(DESTDIR)$(bindir)/vimotd $(DESTDIR)$(bindir)/viklines
diff --git a/irc/ircd-ratbox/files/pkg-install.in b/irc/ircd-ratbox/files/pkg-install.in
new file mode 100644
index 000000000000..135cee12edb2
--- /dev/null
+++ b/irc/ircd-ratbox/files/pkg-install.in
@@ -0,0 +1,117 @@
+#!/bin/sh
+#
+# Adapted from irc/ircd-hybrid's script
+#
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+#-----------------------------------------------------------------------
+if [ "x$2" = "xPRE-INSTALL" ]; then
+#-----------------------------------------------------------------------
+
+if which -s pw ; then
+ :
+else
+ cat <<EOF
+Your system does not include the "pw" utility. You should upgrade
+to a newer version of FreeBSD. Without "pw" this script will not
+run.
+EOF
+ exit 1
+fi
+
+echo ""
+if pw groupshow ircd 2> /dev/null ; then
+ echo "You already have a group \"ircd\", so I will use it."
+else
+ if pw groupshow 72 2> /dev/null ; then
+ echo "You already have a gid \"72\". Please create a user \"ircd\""
+ echo "with a default group of \"ircd\"."
+ exit 1
+ fi
+ echo "You need a group \"ircd\"."
+ if which -s pw && yesno "Would you like me to create it" y; then
+ pw groupadd ircd -g 72 || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ if ! pw usershow ircd 2> /dev/null ; then
+ echo "While you're at it, please create a user \"ircd\""
+ echo 'too, with a default group of "ircd".'
+ fi
+ exit 1
+ fi
+fi
+
+if pw usershow ircd 2> /dev/null ; then
+ echo "You already have a user \"ircd\", so I will use it."
+else
+ if pw usershow 72 2> /dev/null ; then
+ echo "You already have a uid \"72\". Please create a user \"irc
+d\""
+ echo "with a default group of \"ircd\"."
+ exit 1
+ fi
+ echo "You need a user \"ircd\"."
+ if which -s pw && yesno "Would you like me to create it" y; then
+ pw useradd ircd -g ircd -u 72 -h - -d /nonexistent \
+ -s /nonexistent -c "IRC Daemon" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+#-----------------------------------------------------------------------
+elif [ "x$2" = "xPOST-INSTALL" ]; then
+#-----------------------------------------------------------------------
+
+mkdir -p %%LOGDIR%% \
+&& chown ircd:ircd %%LOGDIR%% \
+&& chmod 750 %%LOGDIR%%
+
+mkdir -p %%RUNDIR%% \
+&& chown ircd:ircd %%RUNDIR%% \
+&& chmod 750 %%RUNDIR%%
+
+# Secure permissions if we think this is a fresh install
+
+if [ ! -f ${PKG_PREFIX}/etc/ircd-ratbox/ircd.conf ]; then
+ chown -R ircd:ircd ${PKG_PREFIX}/etc/ircd-ratbox/
+ chmod 750 ${PKG_PREFIX}/etc/ircd-ratbox/
+ chmod 640 ${PKG_PREFIX}/etc/ircd-ratbox/*
+fi
+
+#-----------------------------------------------------------------------
+fi
+#-----------------------------------------------------------------------
+
+exit 0
diff --git a/irc/ircd-ratbox/files/pkg-message.in b/irc/ircd-ratbox/files/pkg-message.in
new file mode 100644
index 000000000000..ac96137de8c7
--- /dev/null
+++ b/irc/ircd-ratbox/files/pkg-message.in
@@ -0,0 +1,14 @@
+------------------------------------------------------------------------
+ircd-ratbox has been successfully installed.
+
+You should now copy %%PREFIX%%/etc/ircd-ratbox/ircd.conf.sample to
+%%PREFIX%%/etc/ircd-ratbox/ircd.conf, and edit it as per the ratbox
+documentation. This file is required to start the server.
+
+Once you have added ircd_ratbox_enable="YES" to /etc/rc.conf, the
+server can be started by running:
+
+ %%PREFIX%%/etc/rc.d/ircd-ratbox.sh start
+
+Be sure to check out 'ratbox-services' if you need a services package.
+------------------------------------------------------------------------
diff --git a/irc/ircd-ratbox/pkg-descr b/irc/ircd-ratbox/pkg-descr
new file mode 100644
index 000000000000..9ffd84789266
--- /dev/null
+++ b/irc/ircd-ratbox/pkg-descr
@@ -0,0 +1,7 @@
+This is a port of the ircd-ratbox IRC daemon.
+
+ircd-ratbox is the primary ircd used on EFnet; it combines the stability
+of an ircd required for a large production network together with a rich
+set of features, making it also suitable for use on smaller networks.
+
+WWW: http://www.ircd-ratbox.org/
diff --git a/irc/ircd-ratbox/pkg-plist b/irc/ircd-ratbox/pkg-plist
new file mode 100644
index 000000000000..c2f27389fee2
--- /dev/null
+++ b/irc/ircd-ratbox/pkg-plist
@@ -0,0 +1,236 @@
+bin/convertilines
+bin/convertklines
+bin/ircd
+bin/mkpasswd
+bin/servlink
+bin/viconf
+bin/viklines
+bin/vimotd
+etc/ircd-ratbox/ircd-efnet.conf.sample
+etc/ircd-ratbox/ircd.conf.sample
+etc/ircd-ratbox/ircd.motd.sample
+lib/ircd-ratbox/modules/autoload/m_accept.so
+lib/ircd-ratbox/modules/autoload/m_admin.so
+lib/ircd-ratbox/modules/autoload/m_away.so
+lib/ircd-ratbox/modules/autoload/m_cap.so
+lib/ircd-ratbox/modules/autoload/m_capab.so
+lib/ircd-ratbox/modules/autoload/m_challenge.so
+lib/ircd-ratbox/modules/autoload/m_close.so
+lib/ircd-ratbox/modules/autoload/m_cmessage.so
+lib/ircd-ratbox/modules/autoload/m_connect.so
+lib/ircd-ratbox/modules/autoload/m_dline.so
+lib/ircd-ratbox/modules/autoload/m_encap.so
+lib/ircd-ratbox/modules/autoload/m_etrace.so
+lib/ircd-ratbox/modules/autoload/m_gline.so
+lib/ircd-ratbox/modules/autoload/m_help.so
+lib/ircd-ratbox/modules/autoload/m_info.so
+lib/ircd-ratbox/modules/autoload/m_invite.so
+lib/ircd-ratbox/modules/autoload/m_ison.so
+lib/ircd-ratbox/modules/autoload/m_kline.so
+lib/ircd-ratbox/modules/autoload/m_knock.so
+lib/ircd-ratbox/modules/autoload/m_links.so
+lib/ircd-ratbox/modules/autoload/m_list.so
+lib/ircd-ratbox/modules/autoload/m_locops.so
+lib/ircd-ratbox/modules/autoload/m_lusers.so
+lib/ircd-ratbox/modules/autoload/m_map.so
+lib/ircd-ratbox/modules/autoload/m_monitor.so
+lib/ircd-ratbox/modules/autoload/m_motd.so
+lib/ircd-ratbox/modules/autoload/m_names.so
+lib/ircd-ratbox/modules/autoload/m_oper.so
+lib/ircd-ratbox/modules/autoload/m_operspy.so
+lib/ircd-ratbox/modules/autoload/m_pass.so
+lib/ircd-ratbox/modules/autoload/m_ping.so
+lib/ircd-ratbox/modules/autoload/m_pong.so
+lib/ircd-ratbox/modules/autoload/m_post.so
+lib/ircd-ratbox/modules/autoload/m_rehash.so
+lib/ircd-ratbox/modules/autoload/m_restart.so
+lib/ircd-ratbox/modules/autoload/m_resv.so
+lib/ircd-ratbox/modules/autoload/m_set.so
+lib/ircd-ratbox/modules/autoload/m_stats.so
+lib/ircd-ratbox/modules/autoload/m_svinfo.so
+lib/ircd-ratbox/modules/autoload/m_tb.so
+lib/ircd-ratbox/modules/autoload/m_testline.so
+lib/ircd-ratbox/modules/autoload/m_testmask.so
+lib/ircd-ratbox/modules/autoload/m_time.so
+lib/ircd-ratbox/modules/autoload/m_topic.so
+lib/ircd-ratbox/modules/autoload/m_trace.so
+lib/ircd-ratbox/modules/autoload/m_unreject.so
+lib/ircd-ratbox/modules/autoload/m_user.so
+lib/ircd-ratbox/modules/autoload/m_userhost.so
+lib/ircd-ratbox/modules/autoload/m_users.so
+lib/ircd-ratbox/modules/autoload/m_version.so
+lib/ircd-ratbox/modules/autoload/m_wallops.so
+lib/ircd-ratbox/modules/autoload/m_who.so
+lib/ircd-ratbox/modules/autoload/m_whois.so
+lib/ircd-ratbox/modules/autoload/m_whowas.so
+lib/ircd-ratbox/modules/autoload/m_xline.so
+lib/ircd-ratbox/modules/contrib/m_clearchan.so
+lib/ircd-ratbox/modules/contrib/m_flags.so
+lib/ircd-ratbox/modules/contrib/m_force.so
+lib/ircd-ratbox/modules/contrib/m_mkpasswd.so
+lib/ircd-ratbox/modules/contrib/m_ojoin.so
+lib/ircd-ratbox/modules/contrib/m_okick.so
+lib/ircd-ratbox/modules/contrib/m_olist.so
+lib/ircd-ratbox/modules/contrib/m_opme.so
+lib/ircd-ratbox/modules/contrib/spy_admin_notice.so
+lib/ircd-ratbox/modules/contrib/spy_info_notice.so
+lib/ircd-ratbox/modules/contrib/spy_links_notice.so
+lib/ircd-ratbox/modules/contrib/spy_motd_notice.so
+lib/ircd-ratbox/modules/contrib/spy_stats_notice.so
+lib/ircd-ratbox/modules/contrib/spy_stats_p_notice.so
+lib/ircd-ratbox/modules/contrib/spy_trace_notice.so
+lib/ircd-ratbox/modules/contrib/spy_whois_notice.so
+lib/ircd-ratbox/modules/contrib/spy_whois_notice_global.so
+lib/ircd-ratbox/modules/m_die.so
+lib/ircd-ratbox/modules/m_error.so
+lib/ircd-ratbox/modules/m_join.so
+lib/ircd-ratbox/modules/m_kick.so
+lib/ircd-ratbox/modules/m_kill.so
+lib/ircd-ratbox/modules/m_message.so
+lib/ircd-ratbox/modules/m_mode.so
+lib/ircd-ratbox/modules/m_nick.so
+lib/ircd-ratbox/modules/m_part.so
+lib/ircd-ratbox/modules/m_quit.so
+lib/ircd-ratbox/modules/m_server.so
+lib/ircd-ratbox/modules/m_sjoin.so
+lib/ircd-ratbox/modules/m_squit.so
+%%DATADIR%%/help/opers/accept
+%%DATADIR%%/help/opers/admin
+%%DATADIR%%/help/opers/away
+%%DATADIR%%/help/opers/capab
+%%DATADIR%%/help/opers/challenge
+%%DATADIR%%/help/opers/close
+%%DATADIR%%/help/opers/cmode
+%%DATADIR%%/help/opers/cnotice
+%%DATADIR%%/help/opers/connect
+%%DATADIR%%/help/opers/cprivmsg
+%%DATADIR%%/help/opers/credits
+%%DATADIR%%/help/opers/die
+%%DATADIR%%/help/opers/dline
+%%DATADIR%%/help/opers/eob
+%%DATADIR%%/help/opers/error
+%%DATADIR%%/help/opers/etrace
+%%DATADIR%%/help/opers/gline
+%%DATADIR%%/help/opers/help
+%%DATADIR%%/help/opers/index
+%%DATADIR%%/help/opers/info
+%%DATADIR%%/help/opers/invite
+%%DATADIR%%/help/opers/ison
+%%DATADIR%%/help/opers/join
+%%DATADIR%%/help/opers/kick
+%%DATADIR%%/help/opers/kill
+%%DATADIR%%/help/opers/kline
+%%DATADIR%%/help/opers/knock
+%%DATADIR%%/help/opers/links
+%%DATADIR%%/help/opers/list
+%%DATADIR%%/help/opers/locops
+%%DATADIR%%/help/opers/lusers
+%%DATADIR%%/help/opers/map
+%%DATADIR%%/help/opers/modlist
+%%DATADIR%%/help/opers/modload
+%%DATADIR%%/help/opers/modrestart
+%%DATADIR%%/help/opers/modunload
+%%DATADIR%%/help/opers/motd
+%%DATADIR%%/help/opers/names
+%%DATADIR%%/help/opers/nick
+%%DATADIR%%/help/opers/notice
+%%DATADIR%%/help/opers/oper
+%%DATADIR%%/help/opers/operspy
+%%DATADIR%%/help/opers/operwall
+%%DATADIR%%/help/opers/part
+%%DATADIR%%/help/opers/pass
+%%DATADIR%%/help/opers/ping
+%%DATADIR%%/help/opers/pong
+%%DATADIR%%/help/opers/post
+%%DATADIR%%/help/opers/privmsg
+%%DATADIR%%/help/opers/quit
+%%DATADIR%%/help/opers/rehash
+%%DATADIR%%/help/opers/restart
+%%DATADIR%%/help/opers/resv
+%%DATADIR%%/help/opers/server
+%%DATADIR%%/help/opers/set
+%%DATADIR%%/help/opers/sjoin
+%%DATADIR%%/help/opers/squit
+%%DATADIR%%/help/opers/stats
+%%DATADIR%%/help/opers/svinfo
+%%DATADIR%%/help/opers/testgecos
+%%DATADIR%%/help/opers/testline
+%%DATADIR%%/help/opers/testmask
+%%DATADIR%%/help/opers/time
+%%DATADIR%%/help/opers/topic
+%%DATADIR%%/help/opers/trace
+%%DATADIR%%/help/opers/uhelp
+%%DATADIR%%/help/opers/umode
+%%DATADIR%%/help/opers/undline
+%%DATADIR%%/help/opers/ungline
+%%DATADIR%%/help/opers/unkline
+%%DATADIR%%/help/opers/unresv
+%%DATADIR%%/help/opers/unxline
+%%DATADIR%%/help/opers/user
+%%DATADIR%%/help/opers/userhost
+%%DATADIR%%/help/opers/users
+%%DATADIR%%/help/opers/version
+%%DATADIR%%/help/opers/wallops
+%%DATADIR%%/help/opers/who
+%%DATADIR%%/help/opers/whois
+%%DATADIR%%/help/opers/whowas
+%%DATADIR%%/help/opers/xline
+%%DATADIR%%/help/users/accept
+%%DATADIR%%/help/users/admin
+%%DATADIR%%/help/users/away
+%%DATADIR%%/help/users/challenge
+%%DATADIR%%/help/users/cmode
+%%DATADIR%%/help/users/cnotice
+%%DATADIR%%/help/users/cprivmsg
+%%DATADIR%%/help/users/credits
+%%DATADIR%%/help/users/error
+%%DATADIR%%/help/users/help
+%%DATADIR%%/help/users/index
+%%DATADIR%%/help/users/info
+%%DATADIR%%/help/users/invite
+%%DATADIR%%/help/users/ison
+%%DATADIR%%/help/users/join
+%%DATADIR%%/help/users/kick
+%%DATADIR%%/help/users/knock
+%%DATADIR%%/help/users/links
+%%DATADIR%%/help/users/list
+%%DATADIR%%/help/users/lusers
+%%DATADIR%%/help/users/map
+%%DATADIR%%/help/users/motd
+%%DATADIR%%/help/users/names
+%%DATADIR%%/help/users/nick
+%%DATADIR%%/help/users/notice
+%%DATADIR%%/help/users/oper
+%%DATADIR%%/help/users/part
+%%DATADIR%%/help/users/pass
+%%DATADIR%%/help/users/ping
+%%DATADIR%%/help/users/pong
+%%DATADIR%%/help/users/privmsg
+%%DATADIR%%/help/users/quit
+%%DATADIR%%/help/users/stats
+%%DATADIR%%/help/users/time
+%%DATADIR%%/help/users/topic
+%%DATADIR%%/help/users/trace
+%%DATADIR%%/help/users/umode
+%%DATADIR%%/help/users/user
+%%DATADIR%%/help/users/userhost
+%%DATADIR%%/help/users/users
+%%DATADIR%%/help/users/version
+%%DATADIR%%/help/users/who
+%%DATADIR%%/help/users/whois
+%%DATADIR%%/help/users/whowas
+@dirrm lib/ircd-ratbox/modules/autoload
+@dirrm lib/ircd-ratbox/modules/contrib
+@dirrm lib/ircd-ratbox/modules
+@dirrm lib/ircd-ratbox
+@dirrm %%DATADIR%%/help/users
+@dirrm %%DATADIR%%/help/opers
+@dirrm %%DATADIR%%/help
+@dirrm %%DATADIR%%
+@unexec f="%D/etc/ircd-ratbox/dline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/kline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/resv.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@unexec f="%D/etc/ircd-ratbox/xline.conf"; if [ ! -s "$f" ]; then rm -f "$f"; fi
+@dirrmtry etc/ircd-ratbox
+@unexec rmdir %%LOGDIR%% 2>/dev/null || true
+@unexec rmdir %%RUNDIR%% 2>/dev/null || true