diff options
Diffstat (limited to 'community/ultimate-ircd')
-rw-r--r-- | community/ultimate-ircd/PKGBUILD | 61 | ||||
-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.service | 12 | ||||
-rw-r--r-- | community/ultimate-ircd/ultimate-ircd.tmpfiles | 1 |
5 files changed, 130 insertions, 0 deletions
diff --git a/community/ultimate-ircd/PKGBUILD b/community/ultimate-ircd/PKGBUILD new file mode 100644 index 000000000..4a3f0c2da --- /dev/null +++ b/community/ultimate-ircd/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 90729 2013-05-13 14:39:21Z 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=7 +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.service + ultimate-ircd.tmpfiles + conf-fix.patch) +md5sums=('8bc14b97d22a3ce3415cc0540ae459f6' + '526fd78018b9b011787e4e9012437116' + 'e51723ab29e7a3ddc3589846815de0c9' + '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 +} + +package() { + cd $srcdir/Ultimate$pkgver + 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 $pkgdir/var/lib/ircd + install -Dm0644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service + install -Dm0644 $srcdir/$pkgname.tmpfiles $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf +} 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.service b/community/ultimate-ircd/ultimate-ircd.service new file mode 100644 index 000000000..4b79c371d --- /dev/null +++ b/community/ultimate-ircd/ultimate-ircd.service @@ -0,0 +1,12 @@ +[Unit] +Description=IRC daemon +After=network.target remote-fs.target nss-lookup.target + +[Service] +Type=forking +User=ircd +PIDFile=/var/run/ircd/ircd.pid +ExecStart=/usr/bin/ircd -f /etc/ircd/ircd.conf + +[Install] +WantedBy=multi-user.target diff --git a/community/ultimate-ircd/ultimate-ircd.tmpfiles b/community/ultimate-ircd/ultimate-ircd.tmpfiles new file mode 100644 index 000000000..c9a9c98e3 --- /dev/null +++ b/community/ultimate-ircd/ultimate-ircd.tmpfiles @@ -0,0 +1 @@ +d /run/ircd 0755 ircd irc - |