diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/ultimate-ircd |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/ultimate-ircd')
-rw-r--r-- | community/ultimate-ircd/PKGBUILD | 55 | ||||
-rw-r--r-- | community/ultimate-ircd/conf-fix.patch | 25 | ||||
-rw-r--r-- | community/ultimate-ircd/ircd.install | 31 | ||||
-rw-r--r-- | community/ultimate-ircd/ultimate-ircd | 54 |
4 files changed, 165 insertions, 0 deletions
diff --git a/community/ultimate-ircd/PKGBUILD b/community/ultimate-ircd/PKGBUILD new file mode 100644 index 000000000..98c88e7a7 --- /dev/null +++ b/community/ultimate-ircd/PKGBUILD @@ -0,0 +1,55 @@ +# $Id: PKGBUILD 44022 2011-04-01 16:49:24Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=ultimate-ircd +pkgver=3.0.2 +pkgrel=3 +pkgdesc="ultimate irc server" +arch=(i686 x86_64) +url="http://www.shadow-realm.org/" +license=("GPL") +depends=(glibc) +makedepends=(patch) +conflicts=(ircd) +provides=(ircd) +backup=() +install=ircd.install +source=(http://downloads.sourceforge.net/sourceforge/ultimate/Ultimate$pkgver.tar.bz2 \ + ultimate-ircd \ + conf-fix.patch) +md5sums=('8bc14b97d22a3ce3415cc0540ae459f6' + 'cf6ab14d8dd8805342b70a9beb01c9af' + '5e0f2a02e12675ac070a148c3234e111') + +build() { + cd $srcdir/Ultimate$pkgver + ./configure --prefix=/usr --enable-chinese-nick + + for i in `find -type f -name Makefile`; do + echo Patching $i... + sed -i "s#prefix = /usr#prefix = $pkgdir/usr#" $i + sed -i "s#libexecdir = \${bindir}#libexecdir = $pkgdir/usr/lib/ircd#" $i + sed -i "s#sysconfdir = \${prefix}/etc#sysconfdir = $pkgdir/etc/ircd#" $i + sed -i "s#localstatedir = \${prefix}#localstatedir = $pkgdir/var#" $i + sed -i "s#networksubdir = \${prefix}/etc/networks#networksubdir = $pkgdir/etc/ircd/networks#" $i + sed -i "s#\$(localstatedir)/logs#\$(localstatedir)/log/ircd#" $i + done + + cd include && patch -N <../../conf-fix.patch && cd .. + make || return 1 + + mkdir -p $pkgdir/usr/bin + mkdir -p $pkgdir/var/log/ircd + mkdir -p $pkgdir/etc/ircd/networks + make install + rm -f $pkgdir/usr/ircd + rm -f $pkgdir/usr/kill + rm -f $pkgdir/usr/rehash + cd $pkgdir/usr/bin + mv mkpasswd irc-mkpasswd + mv ssl-cert.sh irc-ssl-cert.sh + mv ssl-search.sh irc-ssl-search.sh + install -D -m 0755 $srcdir/ultimate-ircd $pkgdir/etc/rc.d/ultimate-ircd + install -d -m 0755 $pkgdir/var/lib/ircd +} diff --git a/community/ultimate-ircd/conf-fix.patch b/community/ultimate-ircd/conf-fix.patch new file mode 100644 index 000000000..735d8120c --- /dev/null +++ b/community/ultimate-ircd/conf-fix.patch @@ -0,0 +1,25 @@ +--- ./config.h.org 2005-04-11 10:30:55.000000000 -0700 ++++ ./config.h 2006-04-26 17:42:04.000000000 -0700 +@@ -110,10 +110,12 @@ + /* dirs */ + #define DPATH IRCD_PREFIX + #define BINPATH IRCD_PREFIX "/bin/" +-#define ETCPATH IRCD_PREFIX "/etc" +-#define LOGPATH IRCD_PREFIX "/logs" ++#define ETCPATH "/etc/ircd" ++#define LOGPATH "/var/log/ircd" + + /* files */ ++#define PPATH "/var/run/ircd/ircd.pid" ++ + #define SPATH BINPATH "/ircd" /* ircd executable */ + + #define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */ +@@ -125,7 +127,6 @@ + #define SMPATH ETCPATH "/ircd.smotd" /* Short Message Of The Day */ + #define OMPATH ETCPATH "/ircd.opermotd" /* Operator Message Of The Day */ + #define RPATH ETCPATH "/ircd.rules" /* Rules File */ +-#define PPATH ETCPATH "/ircd.pid" /* IRCd PID */ + #define IRCDSSL_CPATH ETCPATH "/ircd.crt" /* Client SSL */ + #define IRCDSSL_KPATH ETCPATH "/ircd.key" /* Client SSL */ + diff --git a/community/ultimate-ircd/ircd.install b/community/ultimate-ircd/ircd.install new file mode 100644 index 000000000..19b76da80 --- /dev/null +++ b/community/ultimate-ircd/ircd.install @@ -0,0 +1,31 @@ +pre_install() { + /bin/true +} + +post_install() { + groupadd irc + useradd -G irc -d /var/lib/ircd ircd + chown -R ircd.irc /var/log/ircd + chown -R ircd.irc /var/lib/ircd + chown -R ircd.irc /var/run/ircd +} + +pre_upgrade() { + /bin/true +} + +post_upgrade() { + chown -R ircd.irc /var/log/ircd + chown -R ircd.irc /var/lib/ircd + chown -R ircd.irc /var/run/ircd +} + +pre_remove() { + /bin/true +} + +post_remove() { + userdel ircd + groupdel irc +} + diff --git a/community/ultimate-ircd/ultimate-ircd b/community/ultimate-ircd/ultimate-ircd new file mode 100644 index 000000000..df73d7389 --- /dev/null +++ b/community/ultimate-ircd/ultimate-ircd @@ -0,0 +1,54 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +get_pid() { + pidof /usr/bin/ircd +} + +case "$1" in + start) + stat_busy "Starting Ultimate IRCd" + + [ -d /var/run/ircd ] || mkdir -p /var/run/ircd + [ -f /var/run/ircd/ircd.pid ] && rm -f /var/run/ircd/ircd.pid + PID=`get_pid` + if [ -z "$PID" ]; then + su -c '/usr/bin/ircd -f /etc/ircd/ircd.conf' ircd 1>>/var/log/ircd/stdout.log 2>>/var/log/ircd/sterr.log + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + add_daemon ultimate-ircd + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping Ultimate IRCd" + PID=`get_pid` + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/ircd/ircd.pid &> /dev/null + rm_daemon ultimate-ircd + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |