ports/55682: New Port

Jonas Kvinge jonas at brokenarrow.night-light.net
Sun Aug 17 20:50:23 UTC 2003


>Number:         55682
>Category:       ports
>Synopsis:       New Port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 17 13:50:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonas Kvinge
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
Night Light Project
>Environment:
System: FreeBSD brokenarrow.night-light.net 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Tue Dec 10 18:32:05 CET 2002 jonas at brokenarrow.night
-light.net:/usr/src/sys/compile/BROKENARROW i386


        
>Description:
        Night Light IRC Proxy is a multi-user IRC (Internet Relay Chat) proxy written in C.

        An IRC proxy (or bouncer) is a program that run on a machine between your IRC client and the IRC server. The ircproxy connect to the IRC server, then you connect to the ircproxy with your IRC client. The ircproxy program will forward data sent by the IRC server to one or more IRC clients connected to the ircproxy and will forward data sent from the IRC clients to the IRC server.

>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./ircproxy-freebsd-port/Makefile
#	./ircproxy-freebsd-port/distinfo
#	./ircproxy-freebsd-port/pkg-comment
#	./ircproxy-freebsd-port/pkg-deinstall
#	./ircproxy-freebsd-port/pkg-descr
#	./ircproxy-freebsd-port/pkg-plist
#
echo x - ./ircproxy-freebsd-port/Makefile
sed 's/^X//' >./ircproxy-freebsd-port/Makefile << 'END-of-./ircproxy-freebsd-port/Makefile'
X# New ports collection makefile for:   ircproxy
X# Date created:        10 July 2003
X# Whom:                jonas
X#
X# $FreeBSD$
X#
X
XPORTNAME=      ircproxy
XPORTVERSION=   1.2.41d.pl2
XCATEGORIES=    irc
XMASTER_SITES=  ftp://ftp.night-light.net/pub/unix/ircproxy/
XMAINTAINER=    jonas at jonas.night-light.net
X
XGNU_CONFIGURE= yes
X
X#
X# Copy the freebsd port setup file to automatically generate setup.h
X# So we dont need to do make config, I think this might be the best
X# solution.
X#
Xpre-build:
X	@if [ -f ${WRKSRC}/config/.setup ]; then ( rm -f ${WRKSRC}/config/.setup; ) fi;
X	@if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( echo "Missing the setup-freebsd file!"; exit 1; ) fi;
X	@cp ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1
X	@cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SHELL} ./setup || exit 1
X	cd ${WRKSRC}/setup; ${SHELL} ./setup-makefile || exit 1
X	chmod u+x ${WRKSRC}/pkg-install || exit 1
X	chmod u+x ${WRKSRC}/pkg-deinstall || exit 1
X
X
X.include "bsd.port.mk"
X
END-of-./ircproxy-freebsd-port/Makefile
echo x - ./ircproxy-freebsd-port/distinfo
sed 's/^X//' >./ircproxy-freebsd-port/distinfo << 'END-of-./ircproxy-freebsd-port/distinfo'
XMD5 (ircproxy-1.2.41d.pl2.tar.gz) = 0fda244dd742e2e7ee848e96b6ec04c2
END-of-./ircproxy-freebsd-port/distinfo
echo x - ./ircproxy-freebsd-port/pkg-comment
sed 's/^X//' >./ircproxy-freebsd-port/pkg-comment << 'END-of-./ircproxy-freebsd-port/pkg-comment'
XTest
X
END-of-./ircproxy-freebsd-port/pkg-comment
echo x - ./ircproxy-freebsd-port/pkg-deinstall
sed 's/^X//' >./ircproxy-freebsd-port/pkg-deinstall << 'END-of-./ircproxy-freebsd-port/pkg-deinstall'
X#!/bin/sh
X#
X# Night Light IRC Proxy
X# Deinstallation script for FreeBSD ports
X# Written by Jonas Kvinge
X#
X# Last modified: Jonas Kvinge (10.07.2003)
X#
X
Xc=''
Xn=''
Xif [ "`eval echo -n 'a'`" = "-n a" ] ; then
X c='\c'
Xelse
X n='-n'
Xfi
X
XEGROUP="ircproxy"
XEUSER="ircproxy"
XPIDFILEPATH="$PKG_PREFIX/ircproxy/ircproxy.pid"
X
Xif [ "$2" = "DEINSTALL" ]; then
X
X  echo "*-----------------------------------------------------------------------------"
X  echo "* Night Light IRC Proxy FreeBSD de-installation script"
X  echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
X  echo "*-----------------------------------------------------------------------------"
X
X  echo $n "Checking to see whether ircproxy is installed in crontab... $c"
X  grep -q "^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
X  if [ $? -eq 0 ]; then
X    echo "YES"
X    echo $n "Removing ircproxy from crontab... $c"
X    sed -e "s:^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh::" -e '/^$/d' /etc/crontab >/tmp/crontab || exit 1
X    mv /tmp/crontab /etc/crontab || exit
X    chmod 644 /etc/crontab || exit
X    echo "OK"
X  else
X    echo "NO"
X  fi
X  echo $n "Checking to see whether ircproxy is running... $c"
X  if [ -f $PIDFILEPATH ] ; then
X    if [ ! -r $PIDFILEPATH ] ; then
X      echo "ERROR"
X      echo "Error: Cannot read PID file $PIDFILEPATH!"
X      exit 1
X    fi
X    PID=`cat "$PIDFILEPATH"`
X    if ps -p "$PID" >/dev/null 2>&1 ; then
X      echo "YES"
X      for count in 1 2 3 4 5 6 7 8 9 10; do
X        if [ $count -ge 5 ]; then
X          echo $n "Sending KILL signal to ircproxy... $c"
X          kill -KILL "$PID" || break
X          echo "OK"
X          break
X        fi
X        echo $n "Sending TERM signal to ircproxy and waiting two seconds... $c"
X        kill -TERM "$PID" || break
X        sleep 2
X        if ps -p `cat "$PIDFILEPATH"` >/dev/null 2>&1 ; then
X           echo "Still Running!"
X        else
X          echo "Successfully terminated!"
X          break
X        fi
X      done
X    else
X      echo "NO"
X    fi
X  else
X    echo "NO"
X  fi
Xfi
X
Xif [ "$2" = "POST-DEINSTALL" ]; then
X
X  echo "*-----------------------------------------------------------------------------"
X  echo "* Night Light IRC Proxy FreeBSD post de-installation script"
X  echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
X  echo "*-----------------------------------------------------------------------------"
X
X  echo $n "Checking if $PKG_PREFIX/ircproxy exist... $c"
X  if [ -d "$PKG_PREFIX/ircproxy" ]; then
X    echo "YES"
X    echo $n "Removing $PKG_PREFIX/ircproxy... $c"
X    rm -R -f "$PKG_PREFIX/ircproxy" && echo "OK" || exit 1
X  else
X    echo "NO"
X  fi
X  echo $n "Checking if $EGROUP group exist... $c"
X  pw group show ${EGROUP} >/dev/null 2>&1
X  if [ $? -eq 0 ] ; then
X    echo "YES"
X    echo $n "Removing the $EGROUP group from the system... $c"
X    pw groupdel -n "$EGROUP" && echo "OK" || exit 1
X  else
X    echo "NO"
X  fi
X  echo $n "Checking if $EUSER user account exist... $c"
X  pw user show ${EUSER} >/dev/null 2>&1
X  if [ $? -eq 0 ] ; then
X    echo "YES"
X    echo $n "Removing the $EUSER user account from the system... $c"
X    pw userdel -n "$EUSER" && echo "OK" || exit 1
X  else
X    echo "NO"
X  fi
Xfi
X
Xexit 0
END-of-./ircproxy-freebsd-port/pkg-deinstall
echo x - ./ircproxy-freebsd-port/pkg-descr
sed 's/^X//' >./ircproxy-freebsd-port/pkg-descr << 'END-of-./ircproxy-freebsd-port/pkg-descr'
XThis is a port of ircproxy, it is an Internet Relay Chat Proxy.
X
XWWW: http://www.ircproxy.night-light.net/
X
X- Jonas Kvinge
Xjonas at jonas.night-light.net
X
END-of-./ircproxy-freebsd-port/pkg-descr
echo x - ./ircproxy-freebsd-port/pkg-plist
sed 's/^X//' >./ircproxy-freebsd-port/pkg-plist << 'END-of-./ircproxy-freebsd-port/pkg-plist'
Xircproxy/ircproxy
Xircproxy/data/listen.conf
Xircproxy/data/access.conf
Xircproxy/data/conn.conf
END-of-./ircproxy-freebsd-port/pkg-plist
exit

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



More information about the freebsd-ports-bugs mailing list