summaryrefslogtreecommitdiff
path: root/community/unrealircd
diff options
context:
space:
mode:
Diffstat (limited to 'community/unrealircd')
-rw-r--r--community/unrealircd/PKGBUILD14
-rw-r--r--community/unrealircd/arch-fixes.patch75
-rw-r--r--community/unrealircd/unrealircd.install8
-rw-r--r--community/unrealircd/unrealircd.service2
-rw-r--r--community/unrealircd/unrealircd.tmpfiles.d1
5 files changed, 37 insertions, 63 deletions
diff --git a/community/unrealircd/PKGBUILD b/community/unrealircd/PKGBUILD
index 883e1f088..0d4b45bee 100644
--- a/community/unrealircd/PKGBUILD
+++ b/community/unrealircd/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 101548 2013-11-27 16:02:52Z spupykin $
+# $Id: PKGBUILD 104840 2014-01-27 10:46:48Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Zerial <fernando@zerial.org>
pkgname=unrealircd
pkgver=3.2.10.2
-pkgrel=1
+pkgrel=2
pkgdesc="Open Source IRC Server"
arch=('i686' 'x86_64')
url="http://unrealircd.com"
@@ -16,10 +16,12 @@ backup=('etc/unrealircd/unrealircd.conf')
install=unrealircd.install
source=(http://www.unrealircd.com/downloads/Unreal$pkgver.tar.gz
unrealircd.service
+ unrealircd.tmpfiles.d
arch-fixes.patch)
md5sums=('21c460dc04d221b401a1701ca96e9e58'
- '93276a1cd426e4a811c072c35fc31e94'
- '77807313c4578f2c30286b9f9e3fb21c')
+ '677d8de0bae770488a2c1730f9475a51'
+ '3ec519ea7dbe99696eb6c51dfc0d382a'
+ '5f4bf9f99f6c78bc9e6ee4ec66b021fa')
prepare() {
cd $srcdir/Unreal$pkgver
@@ -68,5 +70,7 @@ package() {
find $pkgdir/usr -type f -exec chmod ugo+r {} \;
find $pkgdir/usr -type d -exec chmod ugo+rx {} \;
- install -Dm0644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
+ rm -f $pkgdir/etc/unrealircd/unreal
+ install -Dm0644 $srcdir/unrealircd.service $pkgdir/usr/lib/systemd/system/unrealircd.service
+ install -Dm0644 $srcdir/unrealircd.tmpfiles.d $pkgdir/usr/lib/tmpfiles.d/unrealircd.conf
}
diff --git a/community/unrealircd/arch-fixes.patch b/community/unrealircd/arch-fixes.patch
index a1741968d..2f89647bc 100644
--- a/community/unrealircd/arch-fixes.patch
+++ b/community/unrealircd/arch-fixes.patch
@@ -1,6 +1,6 @@
-diff -wbBur Unreal3.2.org/doc/example.conf Unreal3.2/doc/example.conf
---- Unreal3.2.org/doc/example.conf 2009-04-13 15:03:55.000000000 +0400
-+++ Unreal3.2/doc/example.conf 2011-08-29 13:39:25.000000000 +0400
+diff -wbBur Unreal3.2.10.2.org/doc/example.conf Unreal3.2.10.2/doc/example.conf
+--- Unreal3.2.10.2.org/doc/example.conf 2013-11-24 23:24:26.000000000 +0400
++++ Unreal3.2.10.2/doc/example.conf 2014-01-27 14:38:16.669081776 +0400
@@ -33,8 +33,8 @@
*/
@@ -12,10 +12,22 @@ diff -wbBur Unreal3.2.org/doc/example.conf Unreal3.2/doc/example.conf
/* FOR Windows, uncomment the following 2 lines: */
//loadmodule "modules/commands.dll";
-diff -wbBur Unreal3.2.org/src/ircd.c Unreal3.2/src/ircd.c
---- Unreal3.2.org/src/ircd.c 2009-03-01 21:37:58.000000000 +0300
-+++ Unreal3.2/src/ircd.c 2011-08-29 13:39:25.000000000 +0400
-@@ -844,7 +844,7 @@
+diff -wbBur Unreal3.2.10.2.org/include/config.h Unreal3.2.10.2/include/config.h
+--- Unreal3.2.10.2.org/include/config.h 2013-11-24 23:24:26.000000000 +0400
++++ Unreal3.2.10.2/include/config.h 2014-01-27 14:38:53.349081379 +0400
+@@ -248,7 +248,7 @@
+ #define RPATH "ircd.rules" /* server rules file */
+ #define OPATH "oper.motd" /* Operators MOTD file */
+ #define LPATH "debug.log" /* Where the debug file lives, if DEBUGMODE */
+-#define PPATH "ircd.pid" /* file for server pid */
++#define PPATH "/run/unrealircd/ircd.pid" /* file for server pid */
+ #define VPATH "ircd.svsmotd" /* Services MOTD append. */
+ #define BPATH "bot.motd" /* Bot MOTD */
+ #define IRCDTUNE "ircd.tune" /* tuning .. */
+diff -wbBur Unreal3.2.10.2.org/src/ircd.c Unreal3.2.10.2/src/ircd.c
+--- Unreal3.2.10.2.org/src/ircd.c 2013-11-24 23:24:26.000000000 +0400
++++ Unreal3.2.10.2/src/ircd.c 2014-01-27 14:38:16.669081776 +0400
+@@ -840,7 +840,7 @@
const char *compiledfor, *runtime;
int error = 0;
@@ -24,7 +36,7 @@ diff -wbBur Unreal3.2.org/src/ircd.c Unreal3.2/src/ircd.c
compiledfor = OPENSSL_VERSION_TEXT;
runtime = SSLeay_version(SSLEAY_VERSION);
if (strcasecmp(compiledfor, runtime))
-@@ -854,7 +854,7 @@
+@@ -850,7 +850,7 @@
error=1;
}
#endif
@@ -33,7 +45,7 @@ diff -wbBur Unreal3.2.org/src/ircd.c Unreal3.2/src/ircd.c
runtime = zlibVersion();
compiledfor = ZLIB_VERSION;
if (*compiledfor != *runtime)
-@@ -864,7 +864,7 @@
+@@ -860,7 +860,7 @@
error = 1;
}
#endif
@@ -42,48 +54,3 @@ diff -wbBur Unreal3.2.org/src/ircd.c Unreal3.2/src/ircd.c
/* Perhaps someone should tell them to do this a bit more easy ;)
* problem is runtime output is like: 'libcurl/7.11.1 zlib/1.2.1 c-ares/1.2.0'
* while header output is like: '7.11.1'.
-diff -wbBur Unreal3.2.org/unreal.in Unreal3.2/unreal.in
---- Unreal3.2.org/unreal.in 2009-03-01 21:37:55.000000000 +0300
-+++ Unreal3.2/unreal.in 2011-08-29 13:39:37.000000000 +0400
-@@ -7,7 +7,7 @@
- if [ -r $PID_FILE ] ; then
- mv -f $PID_FILE $PID_BACKUP
- fi
-- @BINDIR@
-+ @BINDIR@/ircd
- sleep 1
- if [ ! -r $PID_FILE ] ; then
- echo "Possible error encountered (IRCd seemingly not started)"
-@@ -31,11 +31,11 @@
- echo "Restarting UnrealIRCd"
- kill -2 `cat $PID_FILE`
- elif [ "$1" = "mkpasswd" ] ; then
-- @BINDIR@ -P $2 $3
-+ @BINDIR@/ircd -P $2 $3
- elif [ "$1" = "version" ] ; then
-- @BINDIR@ -v
-+ @BINDIR@/ircd -v
- elif [ "$1" = "gencloak" ] ; then
-- @BINDIR@ -k
-+ @BINDIR@/ircd -k
- elif [ "$1" = "backtrace" ] ; then
- cd @IRCDDIR@
-
-@@ -90,7 +90,7 @@
- fi
-
- # Some ugly prepare work -- ignore errors
-- (echo quit|gdb @BINDIR@ $corefile 2>&1)|\
-+ (echo quit|gdb @BINDIR@/ircd $corefile 2>&1)|\
- grep -i 'no such file'|\
- awk -F ':' '{ print $1 }'|sort|uniq|\
- awk -F '.' "{ system(\"ln -s ../$modpath/\" \$2 \".so \" \$0) }"
-@@ -110,7 +110,7 @@
- quit
- __EOF__
-
-- gdb -batch -x gdb.commands @BINDIR@ $corefile
-+ gdb -batch -x gdb.commands @BINDIR@/ircd $corefile
- rm -f gdb.commands
- echo "GCC: `gcc -v 2>&1|tail -n 1`"
- echo "UNAME: `uname -a`"
diff --git a/community/unrealircd/unrealircd.install b/community/unrealircd/unrealircd.install
index 274d8b13f..0eca0c2a8 100644
--- a/community/unrealircd/unrealircd.install
+++ b/community/unrealircd/unrealircd.install
@@ -1,7 +1,9 @@
post_install() {
- echo "Create ircd user and chown /etc/unrealircd and /var/log/unrealircd recursively"
+ getent passwd ircd >/dev/null || useradd -r ircd
+ chown -R ircd etc/unrealircd var/log/unrealircd
+ systemd-tmpfiles --create unrealircd.conf
echo "SSL is enabled by default, so you need to create pem files"
- echo "Also unrealircd.conf needs adjustments"
+ echo "unrealircd.conf needs adjustments"
echo "See also: https://wiki.archlinux.org/index.php/UnrealIRCd"
}
@@ -10,5 +12,5 @@ post_upgrade() {
}
post_remove() {
- echo "Don't forget to remove ircd user"
+ userdel ircd
}
diff --git a/community/unrealircd/unrealircd.service b/community/unrealircd/unrealircd.service
index a81419f2a..7550ebe15 100644
--- a/community/unrealircd/unrealircd.service
+++ b/community/unrealircd/unrealircd.service
@@ -5,7 +5,7 @@ After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
User=ircd
-PIDFile=/var/run/unrealircd.pid
+PIDFile=/run/unrealircd/ircd.pid
ExecStart=/usr/bin/unrealircd
[Install]
diff --git a/community/unrealircd/unrealircd.tmpfiles.d b/community/unrealircd/unrealircd.tmpfiles.d
new file mode 100644
index 000000000..137431233
--- /dev/null
+++ b/community/unrealircd/unrealircd.tmpfiles.d
@@ -0,0 +1 @@
+d /run/unrealircd 0755 ircd root -