summaryrefslogtreecommitdiff
path: root/community/unrealircd
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/unrealircd
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/unrealircd')
-rw-r--r--community/unrealircd/PKGBUILD70
-rwxr-xr-xcommunity/unrealircd/unrealircd.rc61
2 files changed, 131 insertions, 0 deletions
diff --git a/community/unrealircd/PKGBUILD b/community/unrealircd/PKGBUILD
new file mode 100644
index 000000000..3ad0f297a
--- /dev/null
+++ b/community/unrealircd/PKGBUILD
@@ -0,0 +1,70 @@
+# $Id: PKGBUILD 33887 2010-11-29 08:54:01Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Zerial <fernando@zerial.org>
+
+pkgname=unrealircd
+pkgver=3.2.8.1
+pkgrel=6
+pkgdesc="Open Source IRC Server."
+arch=('i686' 'x86_64')
+url="http://unrealircd.com"
+license=('GPL2')
+depends=(openssl curl)
+conflicts=(ircd)
+provides=(ircd)
+backup=(etc/unrealircd/unrealircd.conf)
+source=(http://www.unrealircd.com/downloads/Unreal$pkgver.tar.gz
+ unrealircd.rc)
+md5sums=('7b741e94e867c0a7370553fd01506c66'
+ '0d728240132a97a2cef61be9558750b1')
+
+build() {
+ mkdir -p $pkgdir/etc/unrealircd
+ mkdir -p $pkgdir/usr/bin
+ cd $srcdir/Unreal3.2
+
+ patch src/ircd.c <<EOF
+847c847
+< #ifdef USE_SSL
+---
+> #if 0
+857c857
+< #ifdef ZIP_LINKS
+---
+> #if 0
+867c867
+< #ifdef USE_LIBCURL
+---
+> #if 0
+EOF
+
+ ./configure --with-showlistmodes \
+ --enable-hub --enable-prefixaq --with-listen=5 \
+ --with-dpath=/etc/unrealircd \
+ --with-spath=/usr/bin \
+ --with-nick-history=2000 --with-sendq=3000000 \
+ --with-bufferpool=18 --with-hostname=archlinux \
+ --with-permissions=0600 --with-fd-setsize=1024 \
+ --enable-dynamic-linking \
+ --enable-ziplinks \
+ --enable-ssl \
+ --enable-libcurl=/usr
+
+ make
+ make IRCDDIR=$pkgdir/etc/unrealircd BINDIR=$pkgdir/usr/bin install
+
+ mv $srcdir/Unreal3.2/src/ircd $pkgdir/usr/bin/unrealircd
+ mv $srcdir/Unreal3.2/doc/example.conf $pkgdir/etc/unrealircd/unrealircd.conf
+ mkdir -p $pkgdir/usr/lib/unrealircd
+ mv $pkgdir/etc/unrealircd/modules $pkgdir/usr/lib/unrealircd/
+ ln -s /usr/lib/unrealircd/modules $pkgdir/etc/unrealircd/modules
+ install -D -m0755 $srcdir/unrealircd.rc $pkgdir/etc/rc.d/unrealircd
+
+ # log
+ mkdir -p $pkgdir/var/log/unrealircd/
+ touch $pkgdir/var/log/unrealircd/ircd.log
+ ln -s /var/log/unrealircd/ircd.log $pkgdir/etc/unrealircd/ircd.log
+
+ find $pkgdir/usr -type f -exec chmod ugo+r {} \;
+ find $pkgdir/usr -type d -exec chmod ugo+rx {} \;
+}
diff --git a/community/unrealircd/unrealircd.rc b/community/unrealircd/unrealircd.rc
new file mode 100755
index 000000000..551781760
--- /dev/null
+++ b/community/unrealircd/unrealircd.rc
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+daemon_name=unrealircd
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+get_pid() {
+ pidof ircd unrealircd
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=`get_pid`
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ export PID_FILE="/var/run/unrealircd.pid"
+ /usr/bin/unrealircd 1>>/var/log/unrealircd/ircd.log 2>>/var/log/unrealircd/ircd.log
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo `get_pid` > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=`get_pid`
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0