summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Kaspar Rudert (mortzu)2015-05-21 16:19:11 +0200
committerMoritz Kaspar Rudert (mortzu)2015-05-21 16:19:11 +0200
commitdc602133bfeafb03c9f4a03085828f766cf83e30 (patch)
tree34d74d8c2fd263342c3ff850f8215c897f565967
downloadaur-dc602133bfeafb03c9f4a03085828f766cf83e30.tar.gz
fixed package
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD42
-rw-r--r--config.xml78
-rw-r--r--pyirct.install9
-rw-r--r--pyirct.service12
-rw-r--r--pyirct.tmpfiles1
6 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2e0fcc808bf7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = pyirct
+ pkgdesc = IRC transport for Jabber
+ pkgver = 0.4
+ pkgrel = 6
+ url = http://xmpppy.sourceforge.net/irc/
+ install = pyirct.install
+ arch = any
+ license = GPL
+ depends = python2-irc
+ depends = xmpppy
+ depends = python2-dnspython
+ source = http://downloads.sourceforge.net/project/xmpppy/PyIRCt/0.4/irc-transport-0.4.tar.gz
+ source = pyirct.service
+ source = pyirct.tmpfiles
+ source = config.xml
+ md5sums = 414411cc20a1cfd3559d1ff546dfd424
+ md5sums = b88b73469f8a609edfe0997a4ea536db
+ md5sums = 627964de07a39c472a6d9e188b900ede
+ md5sums = 9c7f68595294ff6e567fd395b1711a67
+
+pkgname = pyirct
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e41158967dcd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+pkgname=pyirct
+_pkgname=irc-transport
+pkgver=0.4
+pkgrel=6
+pkgdesc='IRC transport for Jabber'
+arch=('any')
+url='http://xmpppy.sourceforge.net/irc/'
+license=('GPL')
+depends=('python2-irc' 'xmpppy' 'python2-dnspython')
+source=("http://downloads.sourceforge.net/project/xmpppy/PyIRCt/0.4/irc-transport-$pkgver.tar.gz"
+ pyirct.service
+ pyirct.tmpfiles
+ config.xml)
+md5sums=('414411cc20a1cfd3559d1ff546dfd424'
+ 'b88b73469f8a609edfe0997a4ea536db'
+ '627964de07a39c472a6d9e188b900ede'
+ '9c7f68595294ff6e567fd395b1711a67')
+install='pyirct.install'
+
+package() {
+ cd "irc-transport-$pkgver"
+
+ # python2 fix
+ for FILE in $(find . -name '*.py' -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/env python2_' "$FILE"
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' "$FILE"
+ done
+
+ # make directory
+ install -d -m755 "$pkgdir/usr/lib"
+
+ # copy files
+ install -d -m0755 "$pkgdir/var/spool/pyirct"
+ install -Dm0644 "$srcdir/config.xml" "$pkgdir/etc/ejabberd/pyirc.xml"
+ mv "$srcdir/${_pkgname}-${pkgver}/config_example.xml" "$pkgdir/etc/ejabberd/pyirc_example.xml"
+ cp -r . "$pkgdir/usr/lib/$pkgname"
+ ln -s ../../../etc/ejabberd/pyirc.xml "$pkgdir/usr/lib/$pkgname/config.xml"
+
+ # systemd
+ 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/config.xml b/config.xml
new file mode 100644
index 000000000000..9d392f92fac0
--- /dev/null
+++ b/config.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" ?>
+<pyirct>
+ <!-- This file contains options to be configured by the server administrator. -->
+ <!-- Please read through all the options in this file -->
+
+ <!-- The JabberID of the transport -->
+ <jid>irc.localhost</jid>
+
+ <!-- The component JID of the transport. Unless you're doing clustering, leave this alone -->
+ <!-- <compjid>irc1</compjid> -->
+
+ <!-- The public IP or DNS name of the machine the transport is running on -->
+ <!-- This is used to select the outgoing IP address used to connect to IRC networks -->
+ <!-- otherwise known as the vanity address, it's safe to leave it commented -->
+ <!--<host>vanity.host.example.net</host>-->
+
+ <!-- The name of the transport in the service discovery list. -->
+ <!-- <discoName>IRC Transport</discoName> -->
+
+ <!-- The location of the spool file.. if relative, relative to the PyIRCt dir. -->
+ <!-- Include the jid of the transport, if running multiple copies of the same transport -->
+ <spoolFile>/var/spool/pyirct/ircuser.dbm</spoolFile>
+
+ <!-- The location of the PID file, relative to the PyIRCt directory -->
+ <!-- Comment out if you do not want a PID file -->
+ <pid>/var/run/pyirct/pyirct.pid</pid>
+
+ <!-- The IP address or DNS name of the main Jabber server -->
+ <mainServer>127.0.0.1</mainServer>
+
+ <!-- The JID of the main Jabber server -->
+ <mainServerJID>jabber.localhost</mainServerJID>
+
+ <!-- The TCP port to connect to the Jabber server on (this is the default for Jabberd2) -->
+ <port>5347</port>
+
+ <!-- The authentication token to use when connecting to the Jabber server -->
+ <secret>secret</secret>
+
+ <!-- SASL username used to bind to Jabber server. -->
+ <!-- secret, above, is used for sasl password -->
+ <!--<saslUsername>username-for-jabberd2-connection</saslUsername>-->
+
+ <!-- Allow users to register with this transport -->
+ <allowRegister/>
+
+ <!-- Require users to be registered before allowing them to join a room -->
+ <!-- <requireRegister/> -->
+
+ <!-- Send activity messages to users (for clients that don't support MUC) -->
+ <activityMessages/>
+
+ <!-- Use external component binding. -->
+ <!-- This dodges the need to manually configure all jids that talk to this transport. -->
+ <!-- Jabberd2 requires saslUsername and useRouteWrap for this to work. -->
+ <!-- Wildfire as of 2.6.0 requires just this. -->
+ <!--<useComponentBinding/>-->
+
+ <!-- Wrap stanzas in <route> stanza. -->
+ <!-- Jabberd2 requires this for useComponentBinding. -->
+ <!--<useRouteWrap/>-->
+
+ <!-- You can choose which users you wish to have as administrators. These users can perform some tasks with Ad-Hoc commands that others cannot -->
+ <!--<admins>
+ <jid>romeo@montague.net</jid>
+ <jid>juliet@capulet.com</jid>
+ </admins>-->
+
+ <!-- The file to log to. Leave this disabled for stdout only -->
+ <debugFile>ircerror.log</debugFile>
+
+ <!-- Show the raw data being sent and received from the xmpp and irc servers -->
+ <!--<dumpProtocol/>-->
+
+ <!-- The default charset to use for the transport, if not supplied by the user when registering -->
+ <!-- <charset>utf-8</charset> -->
+
+</pyirct>
diff --git a/pyirct.install b/pyirct.install
new file mode 100644
index 000000000000..319e7fb130c8
--- /dev/null
+++ b/pyirct.install
@@ -0,0 +1,9 @@
+post_install() {
+ if [[ ! -d run/pyirct ]]; then
+ usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/pyirct.conf
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/pyirct.service b/pyirct.service
new file mode 100644
index 000000000000..69c5261e11d4
--- /dev/null
+++ b/pyirct.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=IRC transport for Jabber
+
+[Service]
+Type=simple
+PIDFile=/var/run/pyirct/pyirct.pid
+ExecStart=/usr/bin/python2 /usr/lib/pyirct/irc.py
+WorkingDirectory=/usr/lib/pyirct
+
+[Install]
+WantedBy=multi-user.target
+StandardOutput=syslog
diff --git a/pyirct.tmpfiles b/pyirct.tmpfiles
new file mode 100644
index 000000000000..214c02f36d07
--- /dev/null
+++ b/pyirct.tmpfiles
@@ -0,0 +1 @@
+d /var/run/pyirct 0755 root root -