aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-08-28 17:51:11 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-08-28 17:51:11 +0000
commit4846fa666ad69d99d0b12e58ae180b542adfee46 (patch)
tree05450fbabd2880e6c66dffca8ea2fab685f57b59
parentcbd6fd50564b6fbe3bddb163261b2ab3eb2f397a (diff)
downloadports-4846fa666ad69d99d0b12e58ae180b542adfee46.tar.gz
ports-4846fa666ad69d99d0b12e58ae180b542adfee46.zip
Notes
-rw-r--r--irc/ircproxy/Makefile14
-rw-r--r--irc/ircproxy/distinfo6
-rw-r--r--irc/ircproxy/pkg-deinstall91
-rw-r--r--irc/ircproxy/pkg-descr4
-rw-r--r--irc/ircproxy/pkg-install43
-rw-r--r--irc/ircproxy/pkg-plist12
6 files changed, 78 insertions, 92 deletions
diff --git a/irc/ircproxy/Makefile b/irc/ircproxy/Makefile
index f3fbb44f1226..25789043169a 100644
--- a/irc/ircproxy/Makefile
+++ b/irc/ircproxy/Makefile
@@ -6,15 +6,14 @@
#
PORTNAME= ircproxy
-PORTVERSION= 1.2.41
+DISTVERSION= 1.2.42d.pre2
CATEGORIES= irc
-MASTER_SITES= ftp://ftp.night-light.net/pub/unix/ircproxy/
-DISTNAME= ircproxy-1.2.41d.pl2
+MASTER_SITES= http://www.ircproxy.night-light.net/files/
-MAINTAINER= jonaski@night-light.net
-COMMENT= An IRC proxy server
+MAINTAINER= jonas@night-light.net
+COMMENT= An IRC proxy/bouncer daemon
-GNU_CONFIGURE= yes
+GNU_CONFIGURE= yes
CONFIGURE_WRKSRC= ${WRKSRC}/config
#
@@ -33,7 +32,4 @@ pre-build:
${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1
${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1
-post-configure:
- @${REINPLACE_CMD} -e 's+^MAIL=+MAIL="/bin/true"+' ${WRKSRC}/sendreport.sh
-
.include <bsd.port.mk>
diff --git a/irc/ircproxy/distinfo b/irc/ircproxy/distinfo
index 3cd4f309953a..8ec10840bc6e 100644
--- a/irc/ircproxy/distinfo
+++ b/irc/ircproxy/distinfo
@@ -1,3 +1,3 @@
-MD5 (ircproxy-1.2.41d.pl2.tar.gz) = 0fda244dd742e2e7ee848e96b6ec04c2
-SHA256 (ircproxy-1.2.41d.pl2.tar.gz) = 57f3e12855eb08348fce676d45147bdee3f6090fbbd77f6fb4d4e5b832f9400f
-SIZE (ircproxy-1.2.41d.pl2.tar.gz) = 227032
+MD5 (ircproxy-1.2.42d.pre2.tar.gz) = f3b5d9800b78ebda3346b137a5489671
+SHA256 (ircproxy-1.2.42d.pre2.tar.gz) = c8d1370db589cc1778f581e60a5107defe3d1eed3ada46c40544f4f9ca968f58
+SIZE (ircproxy-1.2.42d.pre2.tar.gz) = 239968
diff --git a/irc/ircproxy/pkg-deinstall b/irc/ircproxy/pkg-deinstall
index 0b0c3915ebe3..3c56cc3144d4 100644
--- a/irc/ircproxy/pkg-deinstall
+++ b/irc/ircproxy/pkg-deinstall
@@ -4,107 +4,52 @@
# Deinstallation script for FreeBSD ports
# Written by Jonas Kvinge
#
-# Last modified: Jonas Kvinge (10.07.2003)
+# Last modified: Jonas Kvinge (26.08.2006)
#
-c=''
-n=''
-if [ "`eval echo -n 'a'`" = "-n a" ] ; then
- c='\c'
-else
- n='-n'
-fi
-
-EGROUP="ircproxy"
+BINFILE=ircproxyd
+PIDFILE="/var/run/ircproxyd.pid"
EUSER="ircproxy"
-PIDFILEPATH="$PKG_PREFIX/ircproxy/ircproxy.pid"
+EGROUP="ircproxy"
if [ "$2" = "DEINSTALL" ]; then
- echo "*-----------------------------------------------------------------------------"
- echo "* Night Light IRC Proxy FreeBSD de-installation script"
- echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
- echo "*-----------------------------------------------------------------------------"
-
- echo $n "Checking to see whether ircproxy is installed in crontab... $c"
- grep -q "^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
+ grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
if [ $? -eq 0 ]; then
- echo "YES"
- echo $n "Removing ircproxy from crontab... $c"
- sed -e "s:^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh::" -e '/^$/d' /etc/crontab >/tmp/crontab || exit 1
- mv /tmp/crontab /etc/crontab || exit
- chmod 644 /etc/crontab || exit
- echo "OK"
- else
- echo "NO"
+ sed -i -e "s:^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh::" /etc/crontab
+ sed -i -e '/^$/d' /etc/crontab
+ rm -f /etc/crontab-e
fi
- echo $n "Checking to see whether ircproxy is running... $c"
- if [ -f $PIDFILEPATH ] ; then
- if [ ! -r $PIDFILEPATH ] ; then
- echo "ERROR"
- echo "Error: Cannot read PID file $PIDFILEPATH!"
- exit 1
- fi
- PID=`cat "$PIDFILEPATH"`
- if ps -p "$PID" >/dev/null 2>&1 ; then
- echo "YES"
+
+ if [ -f $PIDFILE ] && [ -r $PIDFILE ] ; then
+ PID=`cat "$PIDFILE"`
+ ps -p "$PID" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
for count in 1 2 3 4 5 6 7 8 9 10; do
if [ $count -ge 5 ]; then
- echo $n "Sending KILL signal to ircproxy... $c"
kill -KILL "$PID" || break
- echo "OK"
break
fi
- echo $n "Sending TERM signal to ircproxy and waiting two seconds... $c"
kill -TERM "$PID" || break
sleep 2
- if ps -p `cat "$PIDFILEPATH"` >/dev/null 2>&1 ; then
- echo "Still Running!"
- else
- echo "Successfully terminated!"
- break
+ ps -p "$PID" >/dev/null 2>&1
+ if [ ! $? -eq 0 ]; then
+ break;
fi
done
- else
- echo "NO"
fi
- else
- echo "NO"
fi
fi
if [ "$2" = "POST-DEINSTALL" ]; then
- echo "*-----------------------------------------------------------------------------"
- echo "* Night Light IRC Proxy FreeBSD post de-installation script"
- echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
- echo "*-----------------------------------------------------------------------------"
-
- echo $n "Checking if $PKG_PREFIX/ircproxy exist... $c"
- if [ -d "$PKG_PREFIX/ircproxy" ]; then
- echo "YES"
- echo $n "Removing $PKG_PREFIX/ircproxy... $c"
- rm -R -f "$PKG_PREFIX/ircproxy" && echo "OK" || exit 1
- else
- echo "NO"
- fi
- echo $n "Checking if $EGROUP group exist... $c"
pw group show ${EGROUP} >/dev/null 2>&1
if [ $? -eq 0 ] ; then
- echo "YES"
- echo $n "Removing the $EGROUP group from the system... $c"
- pw groupdel -n "$EGROUP" && echo "OK" || exit 1
- else
- echo "NO"
+ pw groupdel -n "$EGROUP"
fi
- echo $n "Checking if $EUSER user account exist... $c"
pw user show ${EUSER} >/dev/null 2>&1
if [ $? -eq 0 ] ; then
- echo "YES"
- echo $n "Removing the $EUSER user account from the system... $c"
- pw userdel -n "$EUSER" && echo "OK" || exit 1
- else
- echo "NO"
+ pw userdel -n "$EUSER"
fi
fi
diff --git a/irc/ircproxy/pkg-descr b/irc/ircproxy/pkg-descr
index 67d24a55ccca..6826cf723d41 100644
--- a/irc/ircproxy/pkg-descr
+++ b/irc/ircproxy/pkg-descr
@@ -1,6 +1,6 @@
-This is a port of ircproxy, it is an Internet Relay Chat Proxy.
+This is a port of ircproxy, it is an IRC proxy/bouncer.
WWW: http://www.ircproxy.night-light.net/
- Jonas Kvinge
-jonas@jonas.night-light.net
+jonas@night-light.net
diff --git a/irc/ircproxy/pkg-install b/irc/ircproxy/pkg-install
new file mode 100644
index 000000000000..504668ff776d
--- /dev/null
+++ b/irc/ircproxy/pkg-install
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Night Light IRC Proxy
+# Installation script for FreeBSD ports
+# Written by Jonas Kvinge
+#
+# Last modified: Jonas Kvinge (26.08.2006)
+#
+
+BINFILE="ircproxyd"
+PIDFILE="/var/run/ircproxyd.pid"
+EUSER="ircproxy"
+EGROUP="ircproxy"
+UID="118"
+GID="118"
+
+if [ "$2" = "POST-INSTALL" ]; then
+
+ pw group show ${EGROUP} >/dev/null 2>&1
+ if [ ! $? -eq 0 ]; then
+ pw groupadd ${EGROUP} -g ${GID}
+ fi
+
+ pw user show ${EUSER} >/dev/null 2>&1
+ if [ ! $? -eq 0 ]; then
+ pw useradd ${EUSER} -u ${UID} -g ${EGROUP} -s /nonexistent -c "Night Light IRC Proxy"
+ fi
+
+ sed -i -e "s:^IRCPROXYBINFILE=.*:IRCPROXYBINFILE=${PKG_PREFIX}/sbin/${BINFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
+ sed -i -e "s:^IRCPROXYPIDFILE=.*:IRCPROXYPIDFILE=${PIDFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
+ rm -f ${PKG_PREFIX}/sbin/ircproxy.sh-e
+
+ grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
+ if [ ! $? -eq 0 ] ; then
+ cat <<EOF >>/etc/crontab || exit 1
+*/5 * * * * root $PKG_PREFIX/sbin/ircproxy.sh
+EOF
+ fi
+fi
+
+
+exit 0
+
diff --git a/irc/ircproxy/pkg-plist b/irc/ircproxy/pkg-plist
index 075ac0ab612e..43bdaf57428d 100644
--- a/irc/ircproxy/pkg-plist
+++ b/irc/ircproxy/pkg-plist
@@ -1,5 +1,7 @@
-ircproxy/ircproxy
-ircproxy/mkpasswd
-ircproxy/data/listen.conf
-ircproxy/data/access.conf
-ircproxy/data/conn.conf
+sbin/ircproxyd
+sbin/mkpasswd
+sbin/ircproxy.sh
+etc/ircproxy/ircproxy-listen.conf
+etc/ircproxy/ircproxy-access.conf
+etc/ircproxy/ircproxy-conn.conf
+@dirrm etc/ircproxy