diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-01-27 06:09:27 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-01-27 06:09:27 +0000 |
commit | 4019b070f6746eb2a0556fd6ac002eb6dce8ec70 (patch) | |
tree | d24afa98baa95e0b695620c127d103e5c2b0483f /irc/ircd-ratbox/files | |
parent | 95dda47e21daa72f6bd8ce5c35bb2736ffceedc4 (diff) | |
download | ports-4019b070f6746eb2a0556fd6ac002eb6dce8ec70.tar.gz ports-4019b070f6746eb2a0556fd6ac002eb6dce8ec70.zip |
Notes
Diffstat (limited to 'irc/ircd-ratbox/files')
-rw-r--r-- | irc/ircd-ratbox/files/ircd-ratbox.sh.in | 35 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-contrib_Makefile.in | 12 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-doc_Makefile.in | 32 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-doc_example.conf | 59 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-doc_example.efnet.conf | 59 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-help_Makefile.in | 17 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-include_config.h | 19 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-modules_Makefile.in | 16 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-servlink_Makefile.in | 12 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-src_Makefile.in | 12 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/patch-tools_Makefile.in | 12 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/pkg-install.in | 117 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/pkg-message.in | 14 |
14 files changed, 427 insertions, 0 deletions
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. +------------------------------------------------------------------------ |