aboutsummaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-08-06 07:46:51 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-08-06 07:46:51 +0000
commitd46c5b1fc55dd720c4eb9d61f31629cddbae5ffd (patch)
treed1998394424e3f1280a4cebc4bbc69417d93d6b7 /irc
parent9d11b20f6ff4ed887f1105f8d7a53c382210a584 (diff)
downloadports-d46c5b1fc55dd720c4eb9d61f31629cddbae5ffd.tar.gz
ports-d46c5b1fc55dd720c4eb9d61f31629cddbae5ffd.zip
Add bopm 3.1.2,
bopm is an open-source open proxy monitor, designed for use with hybrid-based ircds, although it can be used with slight modification on any server which has +c to show connects to opers and that supports KLINEs in order to K-LINE incoming connects from open proxies. PR: ports/70065 Submitted by: Evgueni V. Gavrilov <aquatique@rusunix.org>
Notes
Notes: svn path=/head/; revision=115496
Diffstat (limited to 'irc')
-rw-r--r--irc/Makefile1
-rw-r--r--irc/bopm/Makefile35
-rw-r--r--irc/bopm/distinfo2
-rw-r--r--irc/bopm/files/bopm.sh.sample24
-rw-r--r--irc/bopm/pkg-deinstall54
-rw-r--r--irc/bopm/pkg-descr7
-rw-r--r--irc/bopm/pkg-install68
-rw-r--r--irc/bopm/pkg-message17
-rw-r--r--irc/bopm/pkg-plist14
9 files changed, 222 insertions, 0 deletions
diff --git a/irc/Makefile b/irc/Makefile
index 197c39985bd3..ea6e5d1c3136 100644
--- a/irc/Makefile
+++ b/irc/Makefile
@@ -9,6 +9,7 @@
SUBDIR += blackened
SUBDIR += bnc
SUBDIR += bobot++
+ SUBDIR += bopm
SUBDIR += ctrlproxy
SUBDIR += dancer
SUBDIR += dancer-ircd
diff --git a/irc/bopm/Makefile b/irc/bopm/Makefile
new file mode 100644
index 000000000000..d94f88180110
--- /dev/null
+++ b/irc/bopm/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: bopm
+# Date Created: 2004.08.06
+# Whom: Evgueni V. Gavrilov <aquatique@rusunix.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= bopm
+PORTVERSION= 3.1.2
+CATEGORIES= irc
+MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
+ ftp://rusunix.org/pub/FreeBSD/distfiles/
+
+MAINTAINER= aquatique-ports@rambler.ru
+COMMENT= Open proxy monitor and blocker, designed for use with ircds
+
+USE_REINPLACE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc
+
+INSTALLS_SHLIB= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,^[[:space:]]*$$(mkinstalldirs) $$(localstatedir),,' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's,= bopm.conf.sample,= ,' ${WRKSRC}/Makefile.in
+
+pre-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${INSTALL_SCRIPT} -m 555 ${FILESDIR}/bopm.sh.sample ${PREFIX}/etc/rc.d
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/irc/bopm/distinfo b/irc/bopm/distinfo
new file mode 100644
index 000000000000..36469353e1c3
--- /dev/null
+++ b/irc/bopm/distinfo
@@ -0,0 +1,2 @@
+MD5 (bopm-3.1.2.tar.gz) = ab1b7494c4242eef957b5fca61c92b18
+SIZE (bopm-3.1.2.tar.gz) = 608855
diff --git a/irc/bopm/files/bopm.sh.sample b/irc/bopm/files/bopm.sh.sample
new file mode 100644
index 000000000000..5a2adbea0208
--- /dev/null
+++ b/irc/bopm/files/bopm.sh.sample
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PREFIX=$(expr $0 : "\(/.*/\)etc/rc\.d/$(basename $0)\$")
+
+BOPM=${PREFIX}bin/bopm
+
+case "$1" in
+start)
+ if [ -x $BOPM ]; then
+ su bopm -c $BOPM -d >/dev/null 2>&1
+ echo -n ' bopm'
+ fi
+ ;;
+stop)
+# kill `cat ${PREFIX}/etc/ircd-hybrid-ru/ircd.pid` >/dev/null 2>&1
+ killall bopm >/dev/null 2>&1
+ echo -n ' bopm'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/irc/bopm/pkg-deinstall b/irc/bopm/pkg-deinstall
new file mode 100644
index 000000000000..9c309af31bbc
--- /dev/null
+++ b/irc/bopm/pkg-deinstall
@@ -0,0 +1,54 @@
+#! /bin/sh
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+delete_account() {
+ local u
+
+ u=$1
+ if yesno "Do you want me to remove user \"${u}\"" n; then
+ pw userdel -n ${u}
+ echo "Done."
+ fi
+}
+
+case $2 in
+
+DEINSTALL)
+ if ps -axc | grep -qw bopm; then
+ if yesno "bopm is still running. Shall I stop it?" y; then
+ killall bopm
+ sleep 2
+ else
+ echo "OK ... I hope you know what you are doing."
+ fi
+ fi
+
+ delete_account bopm
+ ;;
+
+esac
diff --git a/irc/bopm/pkg-descr b/irc/bopm/pkg-descr
new file mode 100644
index 000000000000..a5a5d961513a
--- /dev/null
+++ b/irc/bopm/pkg-descr
@@ -0,0 +1,7 @@
+ bopm is an open-source open proxy monitor, designed for use
+ with hybrid-based ircds, although it can be used with slight
+ modification on any server which has +c to show connects to
+ opers and that supports KLINEs in order to K-LINE incoming
+ connects from open proxies
+
+WWW: http://blitzed.org/bopm/
diff --git a/irc/bopm/pkg-install b/irc/bopm/pkg-install
new file mode 100644
index 000000000000..0bbc7de7346e
--- /dev/null
+++ b/irc/bopm/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# This script is a modified copy of the pkg-install script
+# from the ircd-hybrid-ru port.
+
+if [ "x$2" != "xPRE-INSTALL" ]; then
+ exit 0;
+fi
+
+
+if ! which -s pw ; then
+ cat <<EOF
+Your system does not include the "pw" utility. You should upgrade
+to a newer version of FreeBSD. Without "pw" this script will not
+run.
+EOF
+ exit 1
+fi
+
+uid=717
+user=bopm
+gid=$uid
+group=$user
+gecos="Blitzed Open Proxy Monitor"
+shell="/bin/sh"
+home="/nonexistent"
+
+echo ""
+if pw groupshow $group 2> /dev/null ; then
+ echo "You already have a group \"$group\", so I will use it."
+else
+ if pw groupshow $gid 2> /dev/null ; then
+ echo "You already have a gid \"$gid\". Please create a user \"$group\""
+ echo "with a default group of \"$group\"."
+ exit 1
+ fi
+ echo "You need a group \"$group\"."
+ if which -s pw ; then
+ pw groupadd $group -g $gid || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ if ! pw usershow $user 2> /dev/null ; then
+ echo "While you're at it, please create a user \"$user\""
+ echo 'too, with a default group of "$group".'
+ fi
+ exit 1
+ fi
+fi
+
+if pw usershow $user 2> /dev/null ; then
+ echo "You already have a user \"$user\", so I will use it."
+else
+ if pw usershow $uid 2> /dev/null ; then
+ echo "You already have a uid \"$uid\". Please create a user \"$user\""
+ echo "with a default group of \"$group\"."
+ exit 1
+ fi
+ echo "You need a user \"$user\"."
+ if which -s pw; then
+ pw useradd $user -g $group -u $uid -h - -d $home \
+ -s "$shell" -c "$gecos" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
diff --git a/irc/bopm/pkg-message b/irc/bopm/pkg-message
new file mode 100644
index 000000000000..2afc1b09d46b
--- /dev/null
+++ b/irc/bopm/pkg-message
@@ -0,0 +1,17 @@
+
+----------------------------------------------------
+
+This port uses now UID/GID - 717
+
+bopm has been installed.
+
+This port create user bopm and group bopm
+
+You should now edit bopm.conf it to suit your needs.
+
+You may then start the bopm by running:
+ cd /usr/local/etc/rc.d/ && \
+ cp bopm.sh.sample bopm.sh && \
+ /usr/local/etc/rc.d/bopm.sh start
+
+----------------------------------------------------
diff --git a/irc/bopm/pkg-plist b/irc/bopm/pkg-plist
new file mode 100644
index 000000000000..e8f6fb58accf
--- /dev/null
+++ b/irc/bopm/pkg-plist
@@ -0,0 +1,14 @@
+bin/bopm
+etc/bopm.conf
+etc/rc.d/bopm.sh.sample
+include/opm.h
+include/opm_error.h
+include/opm_types.h
+include/opm_common.h
+lib/libopm.so.0
+lib/libopm.so
+lib/libopm.la
+lib/libopm.a
+@exec mkdir -m 755 /var/log/bopm
+@exec chown bopm:bopm /var/log/bopm
+@unexec rmdir %D/var/log/bopm 2>/dev/null || true