ports/102543: ircproxy

Jonas Kvinge jonas at night-light.net
Sat Aug 26 18:20:20 UTC 2006


>Number:         102543
>Category:       ports
>Synopsis:       ircproxy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 26 18:20:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jonas Kvinge
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD emptyglass.night-light.net 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat Jul 15 21:58:50 CEST 2006 drowned at emptyglass.night-light.net:/usr/obj/usr/src/sys/EMPTYGLASS i386


	
>Description:
	Update port to new release, 1.2.42d.pre1 	
>How-To-Repeat:
	
>Fix:

	

--- ircproxy.diff begins here ---
diff -ruN ircproxy.old/Makefile ircproxy/Makefile
--- ircproxy.old/Makefile	Sat Aug 26 19:50:03 2006
+++ ircproxy/Makefile	Sat Aug 26 19:50:02 2006
@@ -1,39 +1,37 @@
-# New ports collection makefile for:   ircproxy
-# Date created:        10 July 2003
-# Whom:                Jonas Kvinge <jonas at night-light.net>
-#
-# $FreeBSD: ports/irc/ircproxy/Makefile,v 1.5 2006/02/08 16:00:35 vs Exp $
-#
-
-PORTNAME=	ircproxy
-PORTVERSION=	1.2.41
-CATEGORIES=	irc
-MASTER_SITES=	ftp://ftp.night-light.net/pub/unix/ircproxy/
-DISTNAME=	ircproxy-1.2.41d.pl2
-
-MAINTAINER=	jonaski at night-light.net
-COMMENT=	An IRC proxy server
-
-GNU_CONFIGURE=	yes
-CONFIGURE_WRKSRC=	${WRKSRC}/config
-
-#
-# Copy the freebsd port setup file to automatically generate setup.h
-# So we dont need to do make config, I think this might be the best
-# solution.
-#
-pre-build:
-	@if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \
-		if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \
-		${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \
-		cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \
-		cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \
-	) \
-	fi;
-	${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>
+# New ports collection makefile for:   ircproxy
+# Date created:        10 July 2003
+# Whom:                Jonas Kvinge <jonas at night-light.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME=	ircproxy
+PORTVERSION=	1.2.42d.pre1
+CATEGORIES=	irc
+MASTER_SITES=	http://www.ircproxy.night-light.net/files/
+DISTNAME=	ircproxy-1.2.42d.pre1
+
+MAINTAINER=	jonas at night-light.net
+COMMENT=	An IRC proxy/bouncer daemon
+
+GNU_CONFIGURE=		yes
+#CONFIGURE_ARGS=	--prefix=${LOCALBASE}
+CONFIGURE_WRKSRC=	${WRKSRC}/config
+
+#
+# Copy the freebsd port setup file to automatically generate setup.h
+# So we dont need to do make config, I think this might be the best
+# solution.
+#
+pre-build:
+	@if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \
+		if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \
+		${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \
+		cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \
+		cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \
+	) \
+	fi;
+	${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1
+	${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1
+
+.include "bsd.port.mk"
diff -ruN ircproxy.old/distinfo ircproxy/distinfo
--- ircproxy.old/distinfo	Sat Aug 26 19:50:03 2006
+++ ircproxy/distinfo	Sat Aug 26 19:50:02 2006
@@ -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.pre1.tar.gz) = d04482f50d984c600a950eea72b35911
+SHA256 (ircproxy-1.2.42d.pre1.tar.gz) = c2acf9a4c7e2213bb0ecfa828725d85eae61abbf43a42f5dad0b7700034359ee
+SIZE (ircproxy-1.2.42d.pre1.tar.gz) = 239329
diff -ruN ircproxy.old/pkg-deinstall ircproxy/pkg-deinstall
--- ircproxy.old/pkg-deinstall	Sat Aug 26 19:50:02 2006
+++ ircproxy/pkg-deinstall	Sat Aug 26 19:50:02 2006
@@ -1,111 +1,55 @@
-#!/bin/sh
-#
-# Night Light IRC Proxy
-# Deinstallation script for FreeBSD ports
-# Written by Jonas Kvinge
-#
-# Last modified: Jonas Kvinge (10.07.2003)
-#
-
-c=''
-n=''
-if [ "`eval echo -n 'a'`" = "-n a" ] ; then
- c='\c'
-else
- n='-n'
-fi
-
-EGROUP="ircproxy"
-EUSER="ircproxy"
-PIDFILEPATH="$PKG_PREFIX/ircproxy/ircproxy.pid"
-
-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
-  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"
-  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"
-      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
-        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"
-  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"
-  fi
-fi
-
-exit 0
+#!/bin/sh
+#
+# Night Light IRC Proxy
+# Deinstallation 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"
+
+if [ "$2" = "DEINSTALL" ]; then
+
+  grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
+  if [ $? -eq 0 ]; then
+    sed -i -e "s:^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh::" /etc/crontab
+    sed -i -e '/^$/d' /etc/crontab
+  fi
+
+  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
+          kill -KILL "$PID" || break
+          break
+        fi
+        kill -TERM "$PID" || break
+        sleep 2
+        ps -p "$PID" >/dev/null 2>&1
+        if [ ! $? -eq 0 ]; then
+          break;
+        fi
+      done
+    fi
+  fi
+fi
+
+if [ "$2" = "POST-DEINSTALL" ]; then
+
+  pw group show ${EGROUP} >/dev/null 2>&1
+  if [ $? -eq 0 ] ; then
+    pw groupdel -n "$EGROUP"
+  fi
+  pw user show ${EUSER} >/dev/null 2>&1
+  if [ $? -eq 0 ] ; then
+    pw userdel -n "$EUSER"
+  fi
+fi
+
+exit 0
diff -ruN ircproxy.old/pkg-descr ircproxy/pkg-descr
--- ircproxy.old/pkg-descr	Sat Aug 26 19:50:03 2006
+++ ircproxy/pkg-descr	Sat Aug 26 19:50:03 2006
@@ -1,6 +1,6 @@
-This is a port of ircproxy, it is an Internet Relay Chat Proxy.
-
-WWW: http://www.ircproxy.night-light.net/
-
-- Jonas Kvinge
-jonas at jonas.night-light.net
+This is a port of ircproxy, it is an IRC proxy/bouncer.
+
+WWW: http://www.ircproxy.night-light.net/
+
+- Jonas Kvinge
+jonas at night-light.net
diff -ruN ircproxy.old/pkg-install ircproxy/pkg-install
--- ircproxy.old/pkg-install	Thu Jan  1 01:00:00 1970
+++ ircproxy/pkg-install	Sat Aug 26 19:50:02 2006
@@ -0,0 +1,40 @@
+#!/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"
+
+if [ "$2" = "POST-INSTALL" ]; then
+
+  pw group show ${EGROUP} >/dev/null 2>&1
+  if [ ! $? -eq 0 ]; then
+    pw groupadd ${EGROUP}
+  fi
+
+  pw user show ${EUSER} >/dev/null 2>&1
+  if [ ! $? -eq 0 ]; then
+    pw useradd ${EUSER} -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
+
+  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 -ruN ircproxy.old/pkg-plist ircproxy/pkg-plist
--- ircproxy.old/pkg-plist	Sat Aug 26 19:50:03 2006
+++ ircproxy/pkg-plist	Sat Aug 26 19:50:02 2006
@@ -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
+ at dirrm etc/ircproxy
--- ircproxy.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list