summaryrefslogtreecommitdiff
path: root/chat/ircd-hybrid
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2001-10-21 21:26:51 +0000
committerseb <seb@pkgsrc.org>2001-10-21 21:26:51 +0000
commitbbe8e2dce24ae58a4914880dbbc7f21eda109801 (patch)
treef41c98ee9a3290611b1423f1e76165e79211a604 /chat/ircd-hybrid
parent9a50e2ff611887348dba55d0b8cd4856b067461a (diff)
downloadpkgsrc-bbe8e2dce24ae58a4914880dbbc7f21eda109801.tar.gz
Added ircd-hybrid version 6.2, an IRC daemon.
Diffstat (limited to 'chat/ircd-hybrid')
-rw-r--r--chat/ircd-hybrid/Makefile186
-rw-r--r--chat/ircd-hybrid/distinfo11
-rw-r--r--chat/ircd-hybrid/files/ircd-hybrid60
-rw-r--r--chat/ircd-hybrid/files/pkg-setup.txt28
-rw-r--r--chat/ircd-hybrid/patches/patch-aa44
-rw-r--r--chat/ircd-hybrid/patches/patch-ab171
-rw-r--r--chat/ircd-hybrid/patches/patch-ac27
-rw-r--r--chat/ircd-hybrid/patches/patch-ad14
-rw-r--r--chat/ircd-hybrid/patches/patch-ae89
-rw-r--r--chat/ircd-hybrid/patches/patch-af24
-rw-r--r--chat/ircd-hybrid/patches/patch-ag36
-rw-r--r--chat/ircd-hybrid/pkg/DEINSTALL45
-rw-r--r--chat/ircd-hybrid/pkg/DESCR3
-rw-r--r--chat/ircd-hybrid/pkg/INSTALL48
-rw-r--r--chat/ircd-hybrid/pkg/MESSAGE7
-rw-r--r--chat/ircd-hybrid/pkg/PLIST17
16 files changed, 810 insertions, 0 deletions
diff --git a/chat/ircd-hybrid/Makefile b/chat/ircd-hybrid/Makefile
new file mode 100644
index 00000000000..9f6e87c572b
--- /dev/null
+++ b/chat/ircd-hybrid/Makefile
@@ -0,0 +1,186 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/10/21 21:26:51 seb Exp $
+#
+
+DISTNAME= ircd-hybrid-6.2
+CATEGORIES= chat
+MASTER_SITES= http://prdownloads.sourceforge.net/ircd-hybrid/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= seb@pbox.org
+HOMEPAGE= http://www.ircd-hybrid.net/
+COMMENT= Irc server with many options
+
+GNU_CONFIGURE= YES
+
+USE_BUILDLINK_ONLY= # defined
+
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
+.include "../../mk/bsd.prefs.mk"
+
+.if (${IRCD_HYBRID_SMALL_NET} == "YES")
+IRCD_HYBRID_LINK_PREALLOCATE?= 64
+IRCD_HYBRID_CLIENTS_PREALLOCATE?= 64
+IRCD_HYBRID_USERS_PREALLOCATE?= 64
+IRCD_HYBRID_NICKNAMEHISTORYLENGTH?= 1000
+IRCD_HYBRID_MAXSENDQLENGTH?= 500000
+IRCD_HYBRID_INITIAL_DBUFS?= 300
+IRCD_HYBRID_HARD_FDLIMIT_?= 90
+IRCD_HYBRID_INIT_MAXCLIENTS?= 40
+.endif
+
+# this is not supposed to be changed
+IRCD_HYBRID_SPATH= ${PREFIX}/sbin/ircd-hybrid
+IRCD_HYBRID_SDIR= ${IRCD_HYBRID_SPATH:C|/[^/]*$||}
+
+# throw all the settings in _DEFS
+.for def in \
+ IRCD_HYBRID_LINK_PREALLOCATE IRCD_HYBRID_CLIENTS_PREALLOCATE \
+ IRCD_HYBRID_USERS_PREALLOCATE IRCD_HYBRID_NICKNAMEHISTORYLENGTH \
+ IRCD_HYBRID_MAXSENDQLENGTH IRCD_HYBRID_INITIAL_DBUFS \
+ IRCD_HYBRID_HARD_FDLIMIT_ IRCD_HYBRID_INIT_MAXCLIENTS
+. ifdef ${def}
+_DEFS+= -D${def:S|^IRCD_HYBRID_||}=${${def}}
+. endif
+.endfor
+.for def in \
+ IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC
+. ifdef ${def}
+_DEFS+= -D${def:S|^IRCD_HYBRID_||}=\"${${def}:Q}\"
+. endif
+.endfor
+.for def in \
+ IRCD_HYBRID_DPATH IRCD_HYBRID_SPATH \
+ IRCD_HYBRID_FNAME_USERLOG IRCD_HYBRID_FNAME_OPERLOG IRCD_HYBRID_PPATH \
+ IRCD_HYBRID_IRC_USER IRCD_HYBRID_IRC_GROUP
+_DEFS+= -D${def:S|^IRCD_HYBRID_||}=\"${${def}}\"
+.endfor
+.if (${IRCD_HYBRID_USE_SYSLOG} == "YES")
+_DEFS+= -DUSE_SYSLOG=1
+_DEFS+= -DLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY}
+.endif
+.if (${IRCD_HYBRID_USE_LOGFILE} == "YES")
+_DEFS+= -DUSE_LOGFILE=1
+_DEFS+= -DLPATH=\"${IRCD_HYBRID_LPATH}\"
+.endif
+_DEFS+= -DINIT_LOG_LEVEL=${IRCD_HYBRID_INIT_LOG_LEVEL}
+
+# and pass then down to make as DEFS
+MAKE_FLAGS+= DEFS='${_DEFS}'
+
+# and few other things for install target
+MAKE_FLAGS+= SPATH=${IRCD_HYBRID_SPATH} SDIR=${IRCD_HYBRID_SDIR}
+MAKE_FLAGS+= PREFIX=${PREFIX} DESTDIR=${DESTDIR}
+
+# for the records
+.for def in \
+ IRCD_HYBRID_LINK_PREALLOCATE IRCD_HYBRID_CLIENTS_PREALLOCATE \
+ IRCD_HYBRID_USERS_PREALLOCATE IRCD_HYBRID_NICKNAMEHISTORYLENGTH \
+ IRCD_HYBRID_MAXSENDQLENGTH IRCD_HYBRID_INITIAL_DBUFS \
+ IRCD_HYBRID_HARD_FDLIMIT_ IRCD_HYBRID_INIT_MAXCLIENTS \
+ IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC IRCD_HYBRID_DPATH \
+ IRCD_HYBRID_FNAME_OPERLOG IRCD_HYBRID_PPATH \
+ IRCD_HYBRID_IRC_USER IRCD_HYBRID_IRC_GROUP
+. ifdef ${def}
+BUILD_DEFS+= ${def}
+. endif
+.endfor
+.ifdef ${IRCD_HYBRID_USE_SYSLOG} == "YES"
+BUILD_DEFS+= IRCD_HYBRID_USE_SYSLOG
+BUILD_DEFS+= IRCD_HYBRID_SYSLOG_FACILITY
+.else
+BUILD_DEFS+= IRCD_HYBRID_FNAME_USERLOG
+.endif
+.if (${IRCD_HYBRID_USE_LOGFILE} == "YES")
+BUILD_DEFS+= IRCD_HYBRID_USE_LOGFILE
+BUILD_DEFS+= IRCD_HYBRID_LPATH
+.endif
+
+# to handle user and group creation...
+.if ${OPSYS} == "NetBSD"
+.if exists(/usr/sbin/user)
+ADDUSER= /usr/sbin/useradd
+ADDGROUP= /usr/sbin/groupadd
+.else
+DEPENDS+= user>=20000313:../../sysutils/user
+ADDUSER= ${LOCALBASE}/sbin/useradd
+ADDGROUP= ${LOCALBASE}/sbin/groupadd
+.endif
+.elif ${OPSYS} == "SunOS"
+ADDUSER= useradd
+ADDGROUP= groupadd
+.endif
+
+# tuning of INSTALL and DEINSTALL scripts
+INSTALL_SUBST+= USER=${IRCD_HYBRID_IRC_USER}
+INSTALL_SUBST+= GROUP=${IRCD_HYBRID_IRC_GROUP}
+INSTALL_SUBST+= DPATH=${IRCD_HYBRID_DPATH}
+INSTALL_SUBST+= LPATH=${IRCD_HYBRID_LPATH}
+INSTALL_SUBST+= USERLOG=${IRCD_HYBRID_FNAME_USERLOG}
+INSTALL_SUBST+= OPERLOG=${IRCD_HYBRID_FNAME_OPERLOG}
+
+INSTALL_SUBST+= ADDUSER=${ADDUSER:Q}
+INSTALL_SUBST+= ADDGROUP=${ADDGROUP:Q}
+INSTALL_SUBST+= CAT=${CAT:Q}
+INSTALL_SUBST+= CHGRP=${CHGRP:Q}
+INSTALL_SUBST+= ID=${ID:Q}
+INSTALL_SUBST+= RM=${RM:Q}
+INSTALL_SUBST+= TOUCH=${TOUCH:Q}
+
+INSTALL_SUBST_SED= ${INSTALL_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+
+# tuning of "etc script"
+SCRIPT_SUBST+= PPATH=${IRCD_HYBRID_PPATH:Q}
+SCRIPT_SUBST+= SPATH=${IRCD_HYBRID_SPATH:Q}
+SCRIPT_SUBST+= USER=${IRCD_HYBRID_IRC_USER:Q}
+SCRIPT_SUBST+= DPATH=${IRCD_HYBRID_DPATH:Q}
+
+SCRIPT_SUBST+= TOUCH=${TOUCH:Q}
+SCRIPT_SUBST+= CHOWN=${CHOWN:Q}
+SCRIPT_SUBST+= CHMOD=${CHMOD:Q}
+
+SCRIPT_SUBST_SED= ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+
+# tuning of document file
+DOC_SUBST= PREFIX=${PREFIX}
+DOC_SUBST+= USER=${IRCD_HYBRID_IRC_USER}
+DOC_SUBST+= GROUP=${IRCD_HYBRID_IRC_GROUP}
+DOC_SUBST+= DPATH=${IRCD_HYBRID_DPATH}
+DOC_SUBST+= LPATH=${IRCD_HYBRID_LPATH}
+DOC_SUBST+= OPERLOG=${IRCD_HYBRID_FNAME_OPERLOG}
+DOC_SUBST+= USERLOG=${IRCD_HYBRID_FNAME_USERLOG}
+DOC_SUBST+= SYSLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY}
+
+post-build:
+ ${SED} ${SCRIPT_SUBST_SED} ${FILESDIR}/ircd-hybrid > ${WRKDIR}/ircd-hybrid
+ ${CP} ${FILESDIR}/pkg-setup.txt ${WRKDIR}/pkg-setup.txt
+.if (${IRCD_HYBRID_USE_LOGFILE} != "YES")
+ ${MV} ${WRKDIR}/pkg-setup.txt ${WRKDIR}/.pkg-setup.txt
+ ${SED} -e '/LPATH/d' -e '/USERLOG/d' ${WRKDIR}/.pkg-setup.txt > ${WRKDIR}/pkg-setup.txt
+ cp ${WRKDIR}/pkg-setup.txt ${WRKDIR}/pkg-setup.txt.1
+.endif
+.if (${IRCD_HYBRID_USE_SYSLOG} != "YES")
+ ${MV} ${WRKDIR}/pkg-setup.txt ${WRKDIR}/.pkg-setup.txt
+ ${SED} -e '/SYSLOG_FACILITY/d' ${WRKDIR}/.pkg-setup.txt > ${WRKDIR}/pkg-setup.txt
+ cp ${WRKDIR}/pkg-setup.txt ${WRKDIR}/pkg-setup.txt.2
+.endif
+ ${MV} ${WRKDIR}/pkg-setup.txt ${WRKDIR}/.pkg-setup.txt
+ ${SED} ${DOC_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}\
+ ${WRKDIR}/.pkg-setup.txt > ${WRKDIR}/pkg-setup.txt
+
+pre-install:
+ ${SED} ${INSTALL_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} ${INSTALL_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/ircd-hybrid ${PREFIX}/etc/rc.d/ircd-hybrid
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ircd-hybrid
+ ${INSTALL_DATA} ${WRKDIR}/pkg-setup.txt ${PREFIX}/share/doc/ircd-hybrid/pkg-setup.txt
+ for f in operguide.txt opermyth.txt; do \
+ ${INSTALL_DATA} ${WRKDIR}/ircd-hybrid-6.2/doc/$$f ${PREFIX}/share/doc/ircd-hybrid/$$f ; \
+ done
+
+.include "../../devel/zlib/buildlink.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/chat/ircd-hybrid/distinfo b/chat/ircd-hybrid/distinfo
new file mode 100644
index 00000000000..037fca6cb98
--- /dev/null
+++ b/chat/ircd-hybrid/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2001/10/21 21:26:51 seb Exp $
+
+SHA1 (ircd-hybrid-6.2.tgz) = 5ca86d7986d43cd3fc63943fc6100041d7d35aaf
+Size (ircd-hybrid-6.2.tgz) = 638589 bytes
+SHA1 (patch-aa) = 7b4ac6f55779fb698569c6d03bd6de00135f8a31
+SHA1 (patch-ab) = 9c1419f74ec617ecf669880613a0053022c0def8
+SHA1 (patch-ac) = 5025c8e5a1892d09cfd7f48ebb46bec33d502327
+SHA1 (patch-ad) = 6377ecb0b803e6eb0d0af4d95cbeaefbb61b3bf5
+SHA1 (patch-ae) = 4853fc2ece303121b12adcb513992e739a8e5d56
+SHA1 (patch-af) = 1d2b125a1e9eabb108aef398d6bd8ff2db2455a1
+SHA1 (patch-ag) = b66c0151713dd268d43f77305bb09ce5390973ec
diff --git a/chat/ircd-hybrid/files/ircd-hybrid b/chat/ircd-hybrid/files/ircd-hybrid
new file mode 100644
index 00000000000..8923c6d0c7d
--- /dev/null
+++ b/chat/ircd-hybrid/files/ircd-hybrid
@@ -0,0 +1,60 @@
+#! /bin/sh
+#
+# $NetBSD: ircd-hybrid,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+#
+# PROVIDE: ircdhybrid
+# REQUIRE: DAEMON
+
+name="ircdhybrid"
+pidfile="@PPATH@"
+command="@SPATH@"
+conffile="@DPATH@ircd.conf"
+required_files="$conffile"
+start_precmd=set_pid_file
+
+set_pid_file () {
+ @TOUCH@ $pidfile && @CHOWN@ @USER@ $pidfile && @CHMOD@ 600 $pidfile
+}
+
+if [ -d /etc/rc.d ]; then :; else
+ command=${1:-start}
+
+ case ${command} in
+ start)
+ if [ -x @SPATH@ -a -f "$conffile" ]
+ then
+ echo "Starting ${name}."
+ set_pid_file || exit 1
+ exec @SPATH@
+ fi
+ ;;
+ stop)
+ if [ -f ${pidfile} ]; then
+ pid=`head -1 ${pidfile}`
+ echo "Stopping ${name}."
+ kill -TERM ${pid}
+ else
+ echo "${name} not running?"
+ fi
+ ;;
+ restart)
+ ( $0 stop )
+ sleep 1
+ $0 start
+ ;;
+ status)
+ if [ -f ${pidfile} ]; then
+ pid=`head -1 ${pidfile}`
+ echo "${name} is running as pid ${pid}."
+ else
+ echo "${name} is not running."
+ fi
+ ;;
+ esac
+ exit 0
+fi
+
+. /etc/rc.subr
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/chat/ircd-hybrid/files/pkg-setup.txt b/chat/ircd-hybrid/files/pkg-setup.txt
new file mode 100644
index 00000000000..08ac2ac2d59
--- /dev/null
+++ b/chat/ircd-hybrid/files/pkg-setup.txt
@@ -0,0 +1,28 @@
+======================================================================
+$NetBSD: pkg-setup.txt,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+If you want to use Hybrid ircd...
+* Create the daemon configuration file:
+ `${DPATH}ircd.conf'
+ To aid you in this see the example file:
+ `${PREFIX}/share/examples/ircd-hybrid/ircd.conf'.
+ Or you can use the generator script:
+ `${PREFIX}/sbin/ircd-hybrid-mkconf'.
+* Copy
+ `${PREFIX}/share/examples/ircd-hybrid/opers.txt'
+ as
+ `${DPATH}opers.txt'.
+* Create an empty file writeable by user `${USER}' group `${GROUP}' named
+ `${DPATH}kline.conf'.
+* Create MOTD files:
+ `${DPATH}ircd.motd',
+ `${DPATH}opers.motd'.
+* Create logfile(s) writeable by user `${USER}' group `${GROUP}':
+ optional: `${OPERLOG}'
+ mandatory: `${LPATH}'
+ optional: `${USERLOG}'
+* Handle syslog facility ${SYSLOG_FACILITY} as you see fit
+
+You should use `${PREFIX}/etc/rc.d/ircd-hybrid' to start/stop/... ircd
+
+======================================================================
diff --git a/chat/ircd-hybrid/patches/patch-aa b/chat/ircd-hybrid/patches/patch-aa
new file mode 100644
index 00000000000..c3740d818b5
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-aa
@@ -0,0 +1,44 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- Makefile.in.orig Wed Jul 4 22:07:28 2001
++++ Makefile.in
+@@ -76,10 +76,17 @@
+ #IRCDLIBS=-lsocket -lnsl -lucb
+ #IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
+
+-
++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
++INSTALL_PROGRAM_DIR = $(BSD_INSTALL_PROGRAM_DIR)
++INSTALL_DATA = $(BSD_INSTALL_DATA)
++INSTALL_DATA_DIR = $(BSD_INSTALL_DATA_DIR)
++INSTALL_MAN_DIR = $(BSD_INSTALL_MAN_DIR)
++INSTALL_MAN = $(BSD_INSTALL_MAN)
++INSTALL_SCRIPT_DIR = $(BSD_INSTALL_SCRIPT_DIR)
++INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT)
+
+ SHELL=/bin/sh
+-SUBDIRS=zlib src tools
++SUBDIRS=src tools
+ # ZSUBDIRS=zlib $(SUBDIRS)
+
+ MAKE = make ${MFLAGS} 'CFLAGS=${CFLAGS}' 'INSTALL=${INSTALL}' 'LDFLAGS=${LDFLAGS}'
+@@ -137,5 +144,17 @@
+ done
+
+ install: all
+- @./tools/install_ircd
+-
++ $(INSTALL_PROGRAM_DIR) $(DESTDIR)$(SDIR)
++ $(INSTALL_PROGRAM) src/ircd $(DESTDIR)$(SPATH)
++ $(INSTALL_PROGRAM) tools/mkpasswd $(DESTDIR)$(SDIR)/ircd-hybrid-mkpasswd
++ $(INSTALL_PROGRAM) tools/viconf $(DESTDIR)$(SDIR)/ircd-hybrid-viconf
++ ln $(DESTDIR)$(SDIR)/ircd-hybrid-viconf $(DESTDIR)$(SDIR)/ircd-hybrid-viklines
++ ln $(DESTDIR)$(SDIR)/ircd-hybrid-viconf $(DESTDIR)$(SDIR)/ircd-hybrid-vimotd
++ $(INSTALL_PROGRAM) tools/fixklines $(DESTDIR)$(SDIR)/ircd-hybrid-fixklines
++ $(INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid
++ $(INSTALL_DATA) doc/example.conf $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid/ircd.conf
++ $(INSTALL_MAN_DIR) $(DESTDIR)$(PREFIX)/man/man8
++ $(INSTALL_MAN) doc/ircd.8 $(DESTDIR)$(PREFIX)/man/man8/ircd-hybrid.8
++ $(INSTALL_DATA) opers.txt $(DESTDIR)$(PREFIX)/share/examples/ircd-hybrid/opers.txt
++ $(INSTALL_SCRIPT_DIR) $(DESTDIR)$(PREFIX)/sbin
++ $(INSTALL_SCRIPT) tools/mkconf $(DESTDIR)$(PREFIX)/sbin/ircd-hybrid-mkconf
diff --git a/chat/ircd-hybrid/patches/patch-ab b/chat/ircd-hybrid/patches/patch-ab
new file mode 100644
index 00000000000..d946d98b664
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ab
@@ -0,0 +1,171 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- include/config.h.orig Wed Sep 26 05:04:02 2001
++++ include/config.h
+@@ -51,8 +51,12 @@
+ * system limits. If you know what you are doing, increase them now
+ */
+
++#ifndef HARD_FDLIMIT_
+ #define HARD_FDLIMIT_ 256
++#endif
++#ifndef INIT_MAXCLIENTS
+ #define INIT_MAXCLIENTS 180
++#endif
+
+ /*
+ * This is how many 'buffer connections' we allow...
+@@ -77,7 +81,9 @@
+ * will be preallocated for the entire whowas array when ircd is started.
+ * You will want to crank this down if you are on a small net.
+ */
++#ifndef NICKNAMEHISTORYLENGTH
+ #define NICKNAMEHISTORYLENGTH 15000
++#endif
+
+ /* Don't change this... */
+ #define HARD_FDLIMIT (HARD_FDLIMIT_ - 10)
+@@ -109,14 +115,22 @@
+ *
+ */
+
++#ifndef DPATH
+ #define DPATH "/usr/local/ircd/"
++#endif
++#ifndef SPATH
+ #define SPATH "/usr/local/ircd/ircd"
++#endif
+ #define CPATH "ircd.conf"
+ #define KPATH "kline.conf"
+ #define DLPATH "kline.conf"
+ #define MPATH "ircd.motd"
++#ifndef LPATH
+ #define LPATH "ircd.log"
++#endif
++#ifndef PPATH
+ #define PPATH "ircd.pid"
++#endif
+ #define HPATH "opers.txt"
+ #define OPATH "opers.motd"
+
+@@ -151,12 +165,16 @@
+ /* NETWORK_NAME
+ * Displayed in place of the servername when SERVERHIDE is enabled
+ */
++#ifndef NETWORK_NAME
+ #define NETWORK_NAME "EFnet"
++#endif
+
+ /* NETWORK_DESC
+ * Displayed in place of the server info when SERVERHIDE is enabled
+ */
++#ifndef NETWORK_DESC
+ #define NETWORK_DESC "Eris Free Network"
++#endif
+
+
+ /* TS_MAX_DELTA and TS_WARN_DELTA - allowed delta for TS when another
+@@ -208,8 +226,12 @@
+ *
+ * These need to be defined if you want to use SYSLOG logging, too.
+ */
++#ifndef FNAME_USERLOG
+ #define FNAME_USERLOG "/usr/local/ircd/users"
++#endif
++#ifndef FNAME_OPERLOG
+ #define FNAME_OPERLOG "/usr/local/ircd/opers"
++#endif
+
+ /* RFC1035_ANAL
+ * Defining this causes ircd to reject hostnames with non-compliant chars.
+@@ -487,13 +509,15 @@
+ * options are:
+ * L_CRIT, L_ERROR, L_WARN, L_NOTICE, L_TRACE, L_INFO, L_DEBUG
+ */
++#ifndef INIT_LOG_LEVEL
+ #define INIT_LOG_LEVEL L_NOTICE
++#endif
+
+ /* USE_LOGFILE - log errors and such to LPATH
+ * If you wish to have the server send 'vital' messages about server
+ * to a logfile, define USE_LOGFILE.
+ */
+-#define USE_LOGFILE
++/* #define USE_LOGFILE */
+
+ /* USE_SYSLOG - log errors and such to syslog()
+ * If you wish to have the server send 'vital' messages about server
+@@ -503,25 +527,27 @@
+ * this option is used unless you tell the system administrator beforehand
+ * and obtain their permission to send messages to the system log files.
+ */
+-#undef USE_SYSLOG
++/* #undef USE_SYSLOG */
+
+ #ifdef USE_SYSLOG
+ /* SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER
+ * If you use syslog above, you may want to turn some (none) of the
+ * spurious log messages for KILL,SQUIT,etc off.
+ */
+-#undef SYSLOG_KILL /* log all operator kills to syslog */
+-#undef SYSLOG_SQUIT /* log all remote squits for all servers to syslog */
+-#undef SYSLOG_CONNECT /* log remote connect messages for other all servs */
+-#undef SYSLOG_USERS /* send userlog stuff to syslog */
+-#undef SYSLOG_OPER /* log all users who successfully become an Op */
++#define SYSLOG_KILL /* log all operator kills to syslog */
++#define SYSLOG_SQUIT /* log all remote squits for all servers to syslog */
++#define SYSLOG_CONNECT /* log remote connect messages for other all servs */
++#define SYSLOG_USERS /* send userlog stuff to syslog */
++#define SYSLOG_OPER /* log all users who successfully become an Op */
+ #undef SYSLOG_BLOCK_ALLOCATOR /* debug block allocator */
+
+ /* LOG_FACILITY - facility to use for syslog()
+ * Define the facility you want to use for syslog(). Ask your
+ * sysadmin which one you should use.
+ */
++#ifndef LOG_FACILITY
+ #define LOG_FACILITY LOG_LOCAL4
++#endif
+
+ #endif /* USE_SYSLOG */
+
+@@ -549,7 +575,9 @@
+ /* MAXSENDQLENGTH - Max amount of internal send buffering
+ * Max amount of internal send buffering when socket is stuck (bytes)
+ */
++#ifndef MAXSENDQLENGTH
+ #define MAXSENDQLENGTH 9000000 /* Recommended value: 9000000 for EFnet */
++#endif
+
+ /* BUFFERPOOL - the maximum size of the total of all sendq's.
+ * Recommended value is 4 times MAXSENDQLENGTH.
+@@ -561,8 +589,8 @@
+ * define IRC_UID to that UID. This should only be defined if you are running
+ * as root and even then perhaps not.
+ */
+-#define IRC_UID 1001
+-#define IRC_GID 31
++#undef IRC_UID
++#undef IRC_GID
+
+ /* CLIENT_FLOOD - client excess flood threshold
+ * this controls the number of bytes the server will allow a client to
+@@ -589,7 +617,7 @@
+ * if there are no servers presently connected to this server
+ * opers are not affected.
+ */
+-#undef NO_CHANOPS_ON_SPLIT
++#undef NO_CHANOPS_ON_SPLIT
+
+ /* NO_JOIN_ON_SPLIT
+ *
+@@ -776,7 +804,9 @@
+
+ /* INITIAL_DBUFS - how many dbufs to preallocate
+ */
++#ifndef INITIAL_DBUFS
+ #define INITIAL_DBUFS 4000 /* preallocate 16 megs of dbufs */
++#endif
+
+ /* MAXBUFFERS - increase socket buffers
+ *
diff --git a/chat/ircd-hybrid/patches/patch-ac b/chat/ircd-hybrid/patches/patch-ac
new file mode 100644
index 00000000000..ade678e0a3f
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/Makefile.in.orig Thu Aug 30 03:54:46 2001
++++ src/Makefile.in
+@@ -6,10 +6,11 @@
+ RM = @RM@
+ MKDEP = ${CC} -MM
+
+-IRCDLIBS = @LIBS@ ../zlib/libz.a
++IRCDLIBS = @LIBS@ -lz
+
+-INCLUDES = -I../include -I../zlib
+-CPPFLAGS = ${INCLUDES} @CPPFLAGS@
++INCLUDES = -I../include
++CPPFLAGS = ${INCLUDES} @CPPFLAGS@ $(DEFS)
++LDFLAGS= @LDFLAGS@
+
+ # For developers
+ # CFLAGS= -g -O2 -Wall
+@@ -187,7 +188,6 @@
+
+ ircd: ${OBJS} version.o
+ ${CC} ${LDFLAGS} -o $@ ${OBJS} version.o ${IRCDLIBS}
+- mv version.c version.c.last
+
+ install: build
+ @echo "Please do a make install from the top level directory"
diff --git a/chat/ircd-hybrid/patches/patch-ad b/chat/ircd-hybrid/patches/patch-ad
new file mode 100644
index 00000000000..a325b858a35
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/client.c.orig Fri Aug 3 17:12:56 2001
++++ src/client.c
+@@ -64,7 +64,9 @@
+ * This means you call MyMalloc 30 some odd times,
+ * rather than 30k times -Dianora
+ */
++#ifndef CLIENTS_PREALLOCATE
+ #define CLIENTS_PREALLOCATE 1024
++#endif
+
+ /*
+ * for Wohali's block allocator
diff --git a/chat/ircd-hybrid/patches/patch-ae b/chat/ircd-hybrid/patches/patch-ae
new file mode 100644
index 00000000000..3a7c1f990c3
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ae
@@ -0,0 +1,89 @@
+$NetBSD: patch-ae,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/ircd.c.orig Wed Jul 18 04:15:26 2001
++++ src/ircd.c
+@@ -58,6 +58,7 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <pwd.h>
++#include <grp.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/file.h>
+@@ -656,15 +657,16 @@
+ int fd;
+ char buff[20];
+ pid_t pidfromfile;
++ ssize_t n;
+
+ if ((fd = open(PPATH, O_RDONLY)) >= 0 )
+ {
+- if (read(fd, buff, sizeof(buff)) == -1)
++ n = read(fd, buff, sizeof(buff));
++ if (n == -1)
+ {
+ /* printf("NOTICE: problem reading from %s (%s)\n", PPATH,
+ strerror(errno)); */
+- }
+- else
++ } else if ( n != 0 )
+ {
+ pidfromfile = atoi(buff);
+ if (pidfromfile != (int)getpid() && !kill(pidfromfile, 0))
+@@ -675,10 +677,6 @@
+ }
+ close(fd);
+ }
+- else
+- {
+- printf("WARNING: problem opening %s: %s\n", PPATH, strerror(errno));
+- }
+ }
+
+ /*
+@@ -835,7 +833,7 @@
+ }
+ #endif
+
+-#if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID))
++#if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID)) || (defined(IRC_USER) && defined(IRC_GROUP))
+
+ setuid(euid);
+
+@@ -862,6 +860,36 @@
+ exit(-1);
+ }
+
++#elif defined(IRC_USER) && defined(IRC_GROUP)
++ {
++ struct passwd *pe;
++ struct group *ge;
++
++ /* run as a specified user and group */
++ fprintf(stderr,"WARNING: running ircd as user %s\n", IRC_USER);
++ fprintf(stderr," and as group %s.\n",IRC_GROUP);
++
++ if ((pe = getpwnam(IRC_USER)) == NULL) {
++ fprintf(stderr,"could not get definition of user " IRC_USER "\n");
++ exit(1);
++ }
++ if ((ge = getgrnam(IRC_GROUP)) == NULL) {
++ fprintf(stderr,"could not get definition of group " IRC_GROUP "\n");
++ exit(1);
++ }
++
++ if (setgid(ge->gr_gid) < 0)
++ {
++ fprintf(stderr,"ERROR: can't setgid(%d)\n", ge->gr_gid);
++ exit(-1);
++ }
++
++ if(setuid(pe->pw_uid) < 0)
++ {
++ fprintf(stderr,"ERROR: can't setuid(%d)\n", pe->pw_uid);
++ exit(-1);
++ }
++ }
+ #else
+ /* check for setuid root as usual */
+ fprintf(stderr,
diff --git a/chat/ircd-hybrid/patches/patch-af b/chat/ircd-hybrid/patches/patch-af
new file mode 100644
index 00000000000..d9012f78b77
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- src/list.c.orig Wed Jul 18 04:15:27 2001
++++ src/list.c
+@@ -53,7 +53,9 @@
+ for smaller nets who knows? -Dianora
+ */
+
++#ifndef LINK_PREALLOCATE
+ #define LINK_PREALLOCATE 1024
++#endif
+
+ /* Number of aClient structures to preallocate at a time
+ for Efnet 1024 is reasonable
+@@ -64,7 +66,9 @@
+ rather than 30k times -Dianora
+ */
+
++#ifndef USERS_PREALLOCATE
+ #define USERS_PREALLOCATE 1024
++#endif
+
+ void outofmemory(void);
+
diff --git a/chat/ircd-hybrid/patches/patch-ag b/chat/ircd-hybrid/patches/patch-ag
new file mode 100644
index 00000000000..e1ea63296d9
--- /dev/null
+++ b/chat/ircd-hybrid/patches/patch-ag
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+--- tools/Makefile.in.orig Tue Jul 10 14:40:38 2001
++++ tools/Makefile.in
+@@ -3,8 +3,9 @@
+ CC=@CC@
+ RM=@RM@
+
+-IRCDLIBS = @LIBS@
+-INCLUDEDIR = -I../include -I../zlib
++IRCDLIBS = @LIBS@ -lz
++CPPFLAGS = -I../include @CPPFLAGS@ $(DEFS)
++LDFLAGS = @LDFLAGS@
+
+ mkpasswd_SOURCES = mkpasswd.c
+ mkpasswd_OBJECTS = mkpasswd.o
+@@ -36,7 +37,7 @@
+ $(RM) -f Makefile
+
+ .c.o:
+- $(CC) $(CFLAGS) $(INCLUDEDIR) -c $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+
+ install: build
+ @echo "Please do a make install from the top level directory"
+@@ -46,10 +47,3 @@
+ lint:
+ lint -aacgprxhH $(INCLUDEDIR) $(mkpasswd_SOURCES) $(viconf_SOURCES) $(fixklines_SOURCES) >>../lint.out
+ @echo done
+-
+-# DO NOT DELETE
+-
+-mkpasswd.o: ../include/setup.h ../zlib/zlib.h
+-mkpasswd.o: ../zlib/zconf.h
+-viconf.o: ../include/config.h ../include/setup.h
+-viconf.o: ../zlib/zlib.h ../zlib/zconf.h
diff --git a/chat/ircd-hybrid/pkg/DEINSTALL b/chat/ircd-hybrid/pkg/DEINSTALL
new file mode 100644
index 00000000000..ff6a2ccbc4f
--- /dev/null
+++ b/chat/ircd-hybrid/pkg/DEINSTALL
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+#
+
+PKGNAME=$1
+STAGE=$2
+
+USER=@USER@
+GROUP=@GROUP@
+DPATH=@DPATH@
+LPATH=@LPATH@
+USERLOG=@USERLOG@
+OPERLOG=@OPERLOG@
+
+CAT="@CAT@"
+
+case ${STAGE} in
+DEINSTALL)
+ :;;
+
+POST-DEINSTALL)
+
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove:
+
+ * the \`${USER}' user
+ * the \`${GROUP}' group
+ * the \`${DPATH}' directory and its content
+ * various logfiles if they exist:
+ \`${LPATH}
+ \`${USERLOG}'
+ \`${OPERLOG}
+
+===========================================================================
+EOF
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/chat/ircd-hybrid/pkg/DESCR b/chat/ircd-hybrid/pkg/DESCR
new file mode 100644
index 00000000000..904838ece26
--- /dev/null
+++ b/chat/ircd-hybrid/pkg/DESCR
@@ -0,0 +1,3 @@
+IRC (Internet Relay Chat) provides a way of communicating in real time with
+people. Generally, the user runs a client program to a server running a
+IRC server software. Hybrid ircd is such a server.
diff --git a/chat/ircd-hybrid/pkg/INSTALL b/chat/ircd-hybrid/pkg/INSTALL
new file mode 100644
index 00000000000..2b85b4722c7
--- /dev/null
+++ b/chat/ircd-hybrid/pkg/INSTALL
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+USER=@USER@
+GROUP=@GROUP@
+ADDUSER=@ADDUSER@
+ADDGROUP=@ADDGROUP@
+CHGRP="@CHGRP@"
+ID="@ID@"
+RM="@RM@"
+TOUCH="@TOUCH@"
+
+case ${STAGE} in
+PRE-INSTALL)
+ ${TOUCH} "/tmp/grouptestirc.$$"
+ ${CHGRP} ${GROUP} "/tmp/grouptestirc.$$" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Group '${GROUP}' already exists...proceeding."
+ else
+ echo "Creating '${GROUP}' group..."
+ ${ADDGROUP} ${GROUP}
+ echo "Done."
+ fi
+ ${RM} -f "/tmp/grouptestirc.$$"
+
+ ${ID} ${USER} >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "User '${USER}' already exists...proceeding."
+ else
+ echo "Creating '${USER}' user..."
+ ${ADDUSER} -c "IRC User" -g ${GROUP} -s /sbin/nologin ${USER}
+ echo "Done."
+ fi
+ ;;
+
+POST-INSTALL)
+ :;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/chat/ircd-hybrid/pkg/MESSAGE b/chat/ircd-hybrid/pkg/MESSAGE
new file mode 100644
index 00000000000..dc431afb454
--- /dev/null
+++ b/chat/ircd-hybrid/pkg/MESSAGE
@@ -0,0 +1,7 @@
+======================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
+
+If you want to use Hybrid ircd see
+`${PREFIX}/share/doc/ircd-hybrid/pkg-setup.txt'
+
+======================================================================
diff --git a/chat/ircd-hybrid/pkg/PLIST b/chat/ircd-hybrid/pkg/PLIST
new file mode 100644
index 00000000000..d1dfe8ccf0f
--- /dev/null
+++ b/chat/ircd-hybrid/pkg/PLIST
@@ -0,0 +1,17 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/10/21 21:26:51 seb Exp $
+etc/rc.d/ircd-hybrid
+man/man8/ircd-hybrid.8
+sbin/ircd-hybrid
+sbin/ircd-hybrid-fixklines
+sbin/ircd-hybrid-mkconf
+sbin/ircd-hybrid-mkpasswd
+sbin/ircd-hybrid-viconf
+sbin/ircd-hybrid-viklines
+sbin/ircd-hybrid-vimotd
+share/doc/ircd-hybrid/operguide.txt
+share/doc/ircd-hybrid/opermyth.txt
+share/doc/ircd-hybrid/pkg-setup.txt
+share/examples/ircd-hybrid/ircd.conf
+share/examples/ircd-hybrid/opers.txt
+@dirrm share/examples/ircd-hybrid
+@dirrm share/doc/ircd-hybrid