View | Details | Raw Unified | Return to bug 102615
Collapse All | Expand All

(-)ircproxy/Makefile (-39 / +37 lines)
Lines 1-39 Link Here
1
# New ports collection makefile for:   ircproxy
1
# New ports collection makefile for:   ircproxy
2
# Date created:        10 July 2003
2
# Date created:        10 July 2003
3
# Whom:                Jonas Kvinge <jonas@night-light.net>
3
# Whom:                Jonas Kvinge <jonas@night-light.net>
4
#
4
#
5
# $FreeBSD: ports/irc/ircproxy/Makefile,v 1.5 2006/02/08 16:00:35 vs Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	ircproxy
8
PORTNAME=	ircproxy
9
PORTVERSION=	1.2.41
9
PORTVERSION=	1.2.42d.pre2
10
CATEGORIES=	irc
10
CATEGORIES=	irc
11
MASTER_SITES=	ftp://ftp.night-light.net/pub/unix/ircproxy/
11
MASTER_SITES=	http://www.ircproxy.night-light.net/files/
12
DISTNAME=	ircproxy-1.2.41d.pl2
12
DISTNAME=	ircproxy-1.2.42d.pre2
13
13
14
MAINTAINER=	jonaski@night-light.net
14
MAINTAINER=	jonas@night-light.net
15
COMMENT=	An IRC proxy server
15
COMMENT=	An IRC proxy/bouncer daemon
16
16
17
GNU_CONFIGURE=	yes
17
GNU_CONFIGURE=		yes
18
CONFIGURE_WRKSRC=	${WRKSRC}/config
18
#CONFIGURE_ARGS=	--prefix=${LOCALBASE}
19
19
CONFIGURE_WRKSRC=	${WRKSRC}/config
20
#
20
21
# Copy the freebsd port setup file to automatically generate setup.h
21
#
22
# So we dont need to do make config, I think this might be the best
22
# Copy the freebsd port setup file to automatically generate setup.h
23
# solution.
23
# So we dont need to do make config, I think this might be the best
24
#
24
# solution.
25
pre-build:
25
#
26
	@if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \
26
pre-build:
27
		if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \
27
	@if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \
28
		${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \
28
		if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \
29
		cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \
29
		${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \
30
		cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \
30
		cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \
31
	) \
31
		cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \
32
	fi;
32
	) \
33
	${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1
33
	fi;
34
	${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1
34
	${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1
35
35
	${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1
36
post-configure:
36
37
	@${REINPLACE_CMD} -e 's+^MAIL=+MAIL="/bin/true"+' ${WRKSRC}/sendreport.sh
37
.include "bsd.port.mk"
38
39
.include <bsd.port.mk>
(-)ircproxy/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (ircproxy-1.2.41d.pl2.tar.gz) = 0fda244dd742e2e7ee848e96b6ec04c2
1
MD5 (ircproxy-1.2.42d.pre2.tar.gz) = f3b5d9800b78ebda3346b137a5489671
2
SHA256 (ircproxy-1.2.41d.pl2.tar.gz) = 57f3e12855eb08348fce676d45147bdee3f6090fbbd77f6fb4d4e5b832f9400f
2
SHA256 (ircproxy-1.2.42d.pre2.tar.gz) = c8d1370db589cc1778f581e60a5107defe3d1eed3ada46c40544f4f9ca968f58
3
SIZE (ircproxy-1.2.41d.pl2.tar.gz) = 227032
3
SIZE (ircproxy-1.2.42d.pre2.tar.gz) = 239968
(-)ircproxy/pkg-deinstall (-111 / +56 lines)
Lines 1-111 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# Night Light IRC Proxy
3
# Night Light IRC Proxy
4
# Deinstallation script for FreeBSD ports
4
# Deinstallation script for FreeBSD ports
5
# Written by Jonas Kvinge
5
# Written by Jonas Kvinge
6
#
6
#
7
# Last modified: Jonas Kvinge (10.07.2003)
7
# Last modified: Jonas Kvinge (26.08.2006)
8
#
8
#
9
9
10
c=''
10
BINFILE=ircproxyd
11
n=''
11
PIDFILE="/var/run/ircproxyd.pid"
12
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
12
EUSER="ircproxy"
13
 c='\c'
13
EGROUP="ircproxy"
14
else
14
15
 n='-n'
15
if [ "$2" = "DEINSTALL" ]; then
16
fi
16
17
17
  grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
18
EGROUP="ircproxy"
18
  if [ $? -eq 0 ]; then
19
EUSER="ircproxy"
19
    sed -i -e "s:^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh::" /etc/crontab
20
PIDFILEPATH="$PKG_PREFIX/ircproxy/ircproxy.pid"
20
    sed -i -e '/^$/d' /etc/crontab
21
21
    rm -f /etc/crontab-e
22
if [ "$2" = "DEINSTALL" ]; then
22
  fi
23
23
24
  echo "*-----------------------------------------------------------------------------"
24
  if [ -f $PIDFILE ] && [ -r $PIDFILE ] ; then
25
  echo "* Night Light IRC Proxy FreeBSD de-installation script"
25
    PID=`cat "$PIDFILE"`
26
  echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
26
    ps -p "$PID" >/dev/null 2>&1
27
  echo "*-----------------------------------------------------------------------------"
27
    if [ $? -eq 0 ]; then
28
28
      for count in 1 2 3 4 5 6 7 8 9 10; do
29
  echo $n "Checking to see whether ircproxy is installed in crontab... $c"
29
        if [ $count -ge 5 ]; then
30
  grep -q "^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
30
          kill -KILL "$PID" || break
31
  if [ $? -eq 0 ]; then
31
          break
32
    echo "YES"
32
        fi
33
    echo $n "Removing ircproxy from crontab... $c"
33
        kill -TERM "$PID" || break
34
    sed -e "s:^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh::" -e '/^$/d' /etc/crontab >/tmp/crontab || exit 1
34
        sleep 2
35
    mv /tmp/crontab /etc/crontab || exit
35
        ps -p "$PID" >/dev/null 2>&1
36
    chmod 644 /etc/crontab || exit
36
        if [ ! $? -eq 0 ]; then
37
    echo "OK"
37
          break;
38
  else
38
        fi
39
    echo "NO"
39
      done
40
  fi
40
    fi
41
  echo $n "Checking to see whether ircproxy is running... $c"
41
  fi
42
  if [ -f $PIDFILEPATH ] ; then
42
fi
43
    if [ ! -r $PIDFILEPATH ] ; then
43
44
      echo "ERROR"
44
if [ "$2" = "POST-DEINSTALL" ]; then
45
      echo "Error: Cannot read PID file $PIDFILEPATH!"
45
46
      exit 1
46
  pw group show ${EGROUP} >/dev/null 2>&1
47
    fi
47
  if [ $? -eq 0 ] ; then
48
    PID=`cat "$PIDFILEPATH"`
48
    pw groupdel -n "$EGROUP"
49
    if ps -p "$PID" >/dev/null 2>&1 ; then
49
  fi
50
      echo "YES"
50
  pw user show ${EUSER} >/dev/null 2>&1
51
      for count in 1 2 3 4 5 6 7 8 9 10; do
51
  if [ $? -eq 0 ] ; then
52
        if [ $count -ge 5 ]; then
52
    pw userdel -n "$EUSER"
53
          echo $n "Sending KILL signal to ircproxy... $c"
53
  fi
54
          kill -KILL "$PID" || break
54
fi
55
          echo "OK"
55
56
          break
56
exit 0
57
        fi
58
        echo $n "Sending TERM signal to ircproxy and waiting two seconds... $c"
59
        kill -TERM "$PID" || break
60
        sleep 2
61
        if ps -p `cat "$PIDFILEPATH"` >/dev/null 2>&1 ; then
62
           echo "Still Running!"
63
        else
64
          echo "Successfully terminated!"
65
          break
66
        fi
67
      done
68
    else
69
      echo "NO"
70
    fi
71
  else
72
    echo "NO"
73
  fi
74
fi
75
76
if [ "$2" = "POST-DEINSTALL" ]; then
77
78
  echo "*-----------------------------------------------------------------------------"
79
  echo "* Night Light IRC Proxy FreeBSD post de-installation script"
80
  echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved."
81
  echo "*-----------------------------------------------------------------------------"
82
83
  echo $n "Checking if $PKG_PREFIX/ircproxy exist... $c"
84
  if [ -d "$PKG_PREFIX/ircproxy" ]; then
85
    echo "YES"
86
    echo $n "Removing $PKG_PREFIX/ircproxy... $c"
87
    rm -R -f "$PKG_PREFIX/ircproxy" && echo "OK" || exit 1
88
  else
89
    echo "NO"
90
  fi
91
  echo $n "Checking if $EGROUP group exist... $c"
92
  pw group show ${EGROUP} >/dev/null 2>&1
93
  if [ $? -eq 0 ] ; then
94
    echo "YES"
95
    echo $n "Removing the $EGROUP group from the system... $c"
96
    pw groupdel -n "$EGROUP" && echo "OK" || exit 1
97
  else
98
    echo "NO"
99
  fi
100
  echo $n "Checking if $EUSER user account exist... $c"
101
  pw user show ${EUSER} >/dev/null 2>&1
102
  if [ $? -eq 0 ] ; then
103
    echo "YES"
104
    echo $n "Removing the $EUSER user account from the system... $c"
105
    pw userdel -n "$EUSER" && echo "OK" || exit 1
106
  else
107
    echo "NO"
108
  fi
109
fi
110
111
exit 0
(-)ircproxy/pkg-descr (-6 / +6 lines)
Lines 1-6 Link Here
1
This is a port of ircproxy, it is an Internet Relay Chat Proxy.
1
This is a port of ircproxy, it is an IRC proxy/bouncer.
2
2
3
WWW: http://www.ircproxy.night-light.net/
3
WWW: http://www.ircproxy.night-light.net/
4
4
5
- Jonas Kvinge
5
- Jonas Kvinge
6
jonas@jonas.night-light.net
6
jonas@night-light.net
(-)ircproxy/pkg-install (+41 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# Night Light IRC Proxy
4
# Installation script for FreeBSD ports
5
# Written by Jonas Kvinge
6
#
7
# Last modified: Jonas Kvinge (26.08.2006)
8
#
9
10
BINFILE="ircproxyd"
11
PIDFILE="/var/run/ircproxyd.pid"
12
EUSER="ircproxy"
13
EGROUP="ircproxy"
14
15
if [ "$2" = "POST-INSTALL" ]; then
16
17
  pw group show ${EGROUP} >/dev/null 2>&1
18
  if [ ! $? -eq 0 ]; then
19
    pw groupadd ${EGROUP}
20
  fi
21
22
  pw user show ${EUSER} >/dev/null 2>&1
23
  if [ ! $? -eq 0 ]; then
24
    pw useradd ${EUSER} -g ${EGROUP} -s /nonexistent -c "Night Light IRC Proxy"
25
  fi
26
27
  sed -i -e "s:^IRCPROXYBINFILE=.*:IRCPROXYBINFILE=${PKG_PREFIX}/sbin/${BINFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
28
  sed -i -e "s:^IRCPROXYPIDFILE=.*:IRCPROXYPIDFILE=${PIDFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
29
  rm -f ${PKG_PREFIX}/sbin/ircproxy.sh-e
30
31
  grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
32
  if [ ! $? -eq 0 ] ; then
33
    cat <<EOF >>/etc/crontab || exit 1
34
*/5     *       *       *       *       root   $PKG_PREFIX/sbin/ircproxy.sh
35
EOF
36
  fi
37
fi
38
39
40
exit 0
41
(-)ircproxy/pkg-plist (-5 / +7 lines)
Lines 1-5 Link Here
1
ircproxy/ircproxy
1
sbin/ircproxyd
2
ircproxy/mkpasswd
2
sbin/mkpasswd
3
ircproxy/data/listen.conf
3
sbin/ircproxy.sh
4
ircproxy/data/access.conf
4
etc/ircproxy/ircproxy-listen.conf
5
ircproxy/data/conn.conf
5
etc/ircproxy/ircproxy-access.conf
6
etc/ircproxy/ircproxy-conn.conf
7
@dirrm etc/ircproxy

Return to bug 102615