diff options
Diffstat (limited to 'irc')
-rw-r--r-- | irc/undernet-ircu/Makefile | 106 | ||||
-rw-r--r-- | irc/undernet-ircu/distinfo | 6 | ||||
-rw-r--r-- | irc/undernet-ircu/files/patch-ircd-Makefile.in | 28 | ||||
-rw-r--r-- | irc/undernet-ircu/files/patch-ircd_ircd__log.c | 25 | ||||
-rw-r--r-- | irc/undernet-ircu/files/patch-ircd_send.c | 26 | ||||
-rw-r--r-- | irc/undernet-ircu/files/undernet.sh.in | 33 | ||||
-rw-r--r-- | irc/undernet-ircu/pkg-install | 40 |
7 files changed, 140 insertions, 124 deletions
diff --git a/irc/undernet-ircu/Makefile b/irc/undernet-ircu/Makefile index 73d4e02baf1d..3e88a6eb839d 100644 --- a/irc/undernet-ircu/Makefile +++ b/irc/undernet-ircu/Makefile @@ -5,7 +5,7 @@ # $FreeBSD$ PORTNAME= undernet-ircu -PORTVERSION= 2.10.11.06 +PORTVERSION= 2.10.12.12 CATEGORIES= irc net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= undernet-ircu @@ -17,98 +17,92 @@ COMMENT= Undernet IRCU irc daemon CONFLICTS= ircd-hybrid* GNU_CONFIGURE= yes +USE_RC_SUBR= undernet.sh CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --with-dpath=${PREFIX}/etc --with-symlink=no +CONFIGURE_ARGS= --with-dpath=${PREFIX}/etc/ --with-symlink=no -PLIST_FILES= bin/chkconf bin/ircd etc/ircd.conf.example +PLIST_FILES= bin/ircd bin/umkpasswd bin/convert-conf +.if exists(${PREFIX}/etc/ircd.conf.example}) +PLIST_FILES+= etc/ircd.conf.example +.endif MAN8= ircd.8 -.include <bsd.port.pre.mk> +OPTIONS= IPV6 "Disable IPv6 support (default is autodetect)" off \ + POLL "Force poll to be used even if not a sys call" off \ + DEBUG "Turn on debugging mode" off \ + ASSERTS "Disable assertion checking" off \ + PROFILE "Enable profiling support" off \ + PEDANTIC "Enable pedantic warnings" off \ + WARNINGS "Enable warnings (add -Wall to CFLAGS)" off \ + INLINES "Disable inlining for a few critical functions" off \ + DEVPOLL "Disable the /dev/poll-based engine" off \ + KQUEUE "Disable the kqueue-based engine" off \ + EPOLL "Disable the epoll-based engine" off \ + LEAKDETECT "Turn on the leak detector (reqs patched boehm)" off -pre-everything:: +.include <bsd.port.pre.mk> - @${ECHO} "" - @${ECHO} "Here is a list of possible configuration options:" - @${ECHO} "(Note that options already selected will not be shown)" - @${ECHO} "" +.if defined(WITH_IPV6) +CONFIGURE_ARGS+= --without-ipv6 +.endif -.if defined(ENABLE_POLL) +.if defined(WITH_POLL) CONFIGURE_ARGS+= --enable-poll -.else - @${ECHO} " ENABLE_POLL: Force poll to be used regardless of whether or not" - @${ECHO} " it is a system call." .endif -.if defined(ENABLE_DEBUG) +.if defined(WITH_DEBUG) CONFIGURE_ARGS+= --enable-debug -.else - @${ECHO} " ENABLE_DEBUG: Turn on debugging mode." .endif -.if defined(DISABLE_ASSERTS) +.if defined(WITH_ASSERTS) CONFIGURE_ARGS+= --disable-asserts -.else - @${ECHO} " DISABLE_ASSERTS: Disable assertion checking." -.endif - -.if defined(DISABLE_SYMBOLS) -CONFIGURE_ARGS+= --disable-symbols -.else - @${ECHO} " DISABLE_SYMBOLS: Disable debugging symbols (remove -g from CFLAGS)." .endif -.if defined(ENABLE_PROFILE) +.if defined(WITH_PROFILE) CONFIGURE_ARGS+= --enable-profile -.else - @${ECHO} " ENABLE_PROFILE: Enable profiling support (add -pg to CFLAGS)." .endif -.if defined(ENABLE_PEDANTIC) +.if defined(WITH_PEDANTIC) CONFIGURE_ARGS+= --enable-pedantic -.else - @${ECHO} " ENABLE_PEDANTIC: Enable pedantic warnings (add -pedantic to CFLAGS)." .endif -.if defined(ENABLE_WARNINGS) +.if defined(WITH_WARNINGS) CONFIGURE_ARGS+= --enable-warnings -.else - @${ECHO} " ENABLE_WARNINGS: Enable warnings (add -Wall to CFLAGS)." .endif -.if defined(DISABLE_INLINES) +.if defined(WITH_INLINES) CONFIGURE_ARGS+= --disable-inlines -.else - @${ECHO} " DISABLE_INLINES: Disable inlining for a few critical functions." .endif -.if defined(DISABLE_DEVPOLL) +.if defined(WITH_DEVPOLL) CONFIGURE_ARGS+= --disable-devpoll -.else - @${ECHO} " DISABLE_DEVPOLL: Disable the /dev/poll-based engine." .endif -.if defined(DISABLE_KQUEUE) +.if defined(WITH_KQUEUE) CONFIGURE_ARGS+= --disable-kqueue -.else - @${ECHO} " DISABLE_KQUEUE: Disable the kqueue-based engine." .endif -.if defined(DISABLE_EPOLL) +.if defined(WITH_EPOLL) CONFIGURE_ARGS+= --disable-epoll -.else - @${ECHO} " DISABLE_EPOLL: Disable the epoll-based engine." .endif - @${ECHO} "" - @${ECHO} "To select any of these options CTRL+C now! Then, for example: " - @${ECHO} " 'make ENABLE_OPTION=1'." - @${ECHO} "" + +.if defined(WITH_LEAKDETECT) +CONFIGURE_ARGS+= --with-leak-detect +.endif + +pre-install: + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + post-install: - @ ${ECHO} "" - @ ${ECHO} " PLEASE NOTE:" - @ ${ECHO} " When you 'make deinstall', a binary file will remain in ${PREFIX}/bin" - @ ${ECHO} " with the name ircd.YEAR-MONTH-DAY-HOUR-MINUTE (of install). This file" - @ ${ECHO} " must be removed manually." - @ ${ECHO} "" + @${ECHO_MSG} "" + @${ECHO_MSG} " To run undernet ircu you must add 'undernet_enable=\"YES\" to" + @${ECHO_MSG} " \"/etc/rc.conf\" . It can then be started with" + @${ECHO_MSG} " \"${PREFIX}/etc/rc.d/undernet start\"" + @${ECHO_MSG} "" + @${ECHO_MSG} " You must also copy \"${PREFIX}/etc/ircd.conf.example\" to" + @${ECHO_MSG} " \"${PREFIX}/etc/ircd.conf\" and modify its settings according to" + @${ECHO_MSG} " your needs. See documentation at http://coder-com.undernet.org." + @${ECHO_MSG} "" .include <bsd.port.post.mk> diff --git a/irc/undernet-ircu/distinfo b/irc/undernet-ircu/distinfo index 6f883ba37a96..e6c5727002c9 100644 --- a/irc/undernet-ircu/distinfo +++ b/irc/undernet-ircu/distinfo @@ -1,3 +1,3 @@ -MD5 (ircu2.10.11.06.tar.gz) = b1863d044eaae96ccef8d3dba6725346 -SHA256 (ircu2.10.11.06.tar.gz) = bd268ae20a31a1b40475228dcb80de16794ad41606d9487be034ecdc8973a374 -SIZE (ircu2.10.11.06.tar.gz) = 833888 +MD5 (ircu2.10.12.12.tar.gz) = 911a6e2441a8b089712ad4a0708cc846 +SHA256 (ircu2.10.12.12.tar.gz) = 2af01cde1f09b99638aaaf0f2d82e2b2e2f78ef2e110b34a7e3391c45b1a6988 +SIZE (ircu2.10.12.12.tar.gz) = 1013342 diff --git a/irc/undernet-ircu/files/patch-ircd-Makefile.in b/irc/undernet-ircu/files/patch-ircd-Makefile.in index cceec6f10d77..17b888b67415 100644 --- a/irc/undernet-ircu/files/patch-ircd-Makefile.in +++ b/irc/undernet-ircu/files/patch-ircd-Makefile.in @@ -1,20 +1,20 @@ ---- ircd/Makefile.in Sat Nov 1 05:19:09 2003 -+++ ircd/Makefile.in Wed Feb 18 01:45:08 2004 -@@ -273,7 +273,7 @@ - ${LN_S} ircd.`cat /tmp/ircd.tag` ${SYMLINK}; ) +--- ircd/Makefile.in 2007-10-29 21:16:57.000000000 -0400 ++++ ircd/Makefile.in 2008-04-12 21:30:24.000000000 -0400 +@@ -288,7 +288,7 @@ @${RM} /tmp/ircd.tag - ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} chkconf ${BINDIR} + ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} umkpasswd ${BINDIR} + ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} convert-conf ${BINDIR} - ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ${top_srcdir}/doc/example.conf ${DPATH} + ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ${top_srcdir}/doc/example.conf ${DPATH}/ircd.conf.example - # ( cd ${DPATH}; \ - # ${TOUCH} ${MPATH}; \ - # ${TOUCH} ${RPATH}; \ -@@ -291,7 +291,7 @@ - @echo "Installing new ircd as ${BINDIR}/ircd :" + + install-no-symlink: build mkbindir + @if [ ! -d ${DPATH} -a ! -f ${DPATH} ]; then \ +@@ -302,7 +302,7 @@ ${INSTALL} -m ${IRCDMODE} -o ${IRCDOWN} -g ${IRCDGRP} ircd ${BINDIR}/ircd - ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} chkconf ${BINDIR} + ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} umkpasswd ${BINDIR} + ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} convert-conf ${BINDIR} - ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ${top_srcdir}/doc/example.conf ${DPATH} + ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ${top_srcdir}/doc/example.conf ${DPATH}/ircd.conf.example - # ( cd ${DPATH}; \ - # ${TOUCH} ${MPATH}; \ - # ${TOUCH} ${RPATH}; \ + + uninstall: + @if [ "${BINDIR}" != "${DPATH}" ]; then \ diff --git a/irc/undernet-ircu/files/patch-ircd_ircd__log.c b/irc/undernet-ircu/files/patch-ircd_ircd__log.c deleted file mode 100644 index 6c30d97d23f1..000000000000 --- a/irc/undernet-ircu/files/patch-ircd_ircd__log.c +++ /dev/null @@ -1,25 +0,0 @@ - -$FreeBSD$ - ---- ircd/ircd_log.c.orig -+++ ircd/ircd_log.c -@@ -49,6 +49,7 @@ - #include <syslog.h> - #include <time.h> - #include <unistd.h> -+#include <osreldate.h> - - #define LOG_BUFSIZE 2048 - -@@ -395,7 +396,11 @@ - - /* Build the basic log string */ - vd.vd_format = fmt; -+ #if __FreeBSD_version > 500000 && defined(__amd64__) -+ va_copy(vd.vd_args, vl); -+ #else - vd.vd_args = vl; -+ #endif - - /* save the length for writev */ - /* Log format: "SYSTEM [SEVERITY]: log message" */ diff --git a/irc/undernet-ircu/files/patch-ircd_send.c b/irc/undernet-ircu/files/patch-ircd_send.c deleted file mode 100644 index a5299acc4969..000000000000 --- a/irc/undernet-ircu/files/patch-ircd_send.c +++ /dev/null @@ -1,26 +0,0 @@ - -$FreeBSD$ - ---- ircd/send.c.orig -+++ ircd/send.c -@@ -44,7 +44,7 @@ - #include <assert.h> - #include <stdio.h> - #include <string.h> -- -+#include <osreldate.h> - - static int sentalong[MAXCONNECTIONS]; - static int sentalong_marker; -@@ -697,7 +697,11 @@ - * this is ok... - */ - vd.vd_format = pattern; -+ #if __FreeBSD_version > 500000 && defined(__amd64__) -+ va_copy(vd.vd_args, vl); -+ #else - vd.vd_args = vl; -+ #endif - mb = msgq_make(0, ":%s " MSG_NOTICE " * :*** Notice -- %v", cli_name(&me), - &vd); - diff --git a/irc/undernet-ircu/files/undernet.sh.in b/irc/undernet-ircu/files/undernet.sh.in new file mode 100644 index 000000000000..b95cbda59032 --- /dev/null +++ b/irc/undernet-ircu/files/undernet.sh.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# PROVIDE: undernet +# REQUIRE: LOGIN +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# undernet_enable (bool): Set to NO by default. +# Set it to YES to enable undernet-ircu. +# undernet_config (path): Set to %%PREFIX%%/etc/ircd.conf +# by default. + +. %%RC_SUBR%% + +name=undernet +rcvar=`set_rcvar` + +load_rc_config ${name} + +: ${undernet_enable="NO"} +: ${undernet_config="%%PREFIX%%/etc/ircd.conf"} +undernet_user="undernet" +undernet_group="undernet" + +command="%%PREFIX%%/bin/ircd" +pidfile="undernet.pid" +piddir="/var/log/" +required_files="${undernet_config}" + +command_args="-f ${undernet_config}" + +run_rc_command "$1" diff --git a/irc/undernet-ircu/pkg-install b/irc/undernet-ircu/pkg-install new file mode 100644 index 000000000000..e8a1dce16a3e --- /dev/null +++ b/irc/undernet-ircu/pkg-install @@ -0,0 +1,40 @@ +#!/bin/sh + +if [ "x$2" != "xPRE-INSTALL" ]; then + exit 0; +fi + + USER=undernet + GROUP=${USER} + UID=134 + GID=${UID} + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + if pw usermod ${USER} -d "/nonexistant" + then + echo "Changed home directory of \"${USER}\" to \"${NONEXISTENT}\"" + else + echo "Changing home directory of \"${USER}\" to \"${NONEXISTENT}\" failed..." + exit 1 + fi + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d "/nonexistant" -s "/sbin/nologin" -c "Undernet ircu Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi |