summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD42
-rw-r--r--dont-import-psyco.patch14
-rw-r--r--pyrss.service12
4 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..515e5521730
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = pyrss
+ pkgdesc = jabber rss transport
+ pkgver = 0.9.9.1
+ pkgrel = 13
+ url = https://code.google.com/archive/p/pyrss/
+ arch = any
+ license = GPL
+ depends = python2
+ depends = python2-pyxmpp
+ depends = python2-feedparser
+ depends = mysql-python
+ backup = etc/ejabberd/pyrss.xml
+ source = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pyrss/pyrss-0.9.9.1.tar.bz2
+ source = pyrss.service
+ source = dont-import-psyco.patch
+ md5sums = 3f48f3b7f36c2c588b8d55a5841482ab
+ md5sums = 1fbbcc50f4b8ca5d8db1d3adffb5e42e
+ md5sums = a9b8e3e3f1524d852b270acef5cd27f6
+
+pkgname = pyrss
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..22e029c865f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 276082 2017-12-26 02:22:10Z eschwartz $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=pyrss
+pkgver=0.9.9.1
+pkgrel=13
+pkgdesc="jabber rss transport"
+arch=(any)
+url="https://code.google.com/archive/p/pyrss/"
+license=("GPL")
+depends=(python2 python2-pyxmpp python2-feedparser mysql-python)
+backup=(etc/ejabberd/pyrss.xml)
+source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pyrss/pyrss-$pkgver.tar.bz2
+ pyrss.service
+ dont-import-psyco.patch)
+md5sums=('3f48f3b7f36c2c588b8d55a5841482ab'
+ '1fbbcc50f4b8ca5d8db1d3adffb5e42e'
+ 'a9b8e3e3f1524d852b270acef5cd27f6')
+
+package() {
+ cd "$srcdir"
+
+ # python2 fix
+ for file in $(find . -name '*.py' -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+ done
+ sed -i 's|python pyrss.py|python2 pyrss.py|g' $pkgname-$pkgver/start.py
+ patch $pkgname-$pkgver/pyrss.py < dont-import-psyco.patch
+
+ install -d -m0755 "$pkgdir"/usr/lib
+ cp -r $pkgname-$pkgver "$pkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/$pkgname-$pkgver "$pkgdir"/usr/lib/$pkgname
+
+ install -d -m0755 "$pkgdir"/etc/ejabberd
+ mv "$pkgdir"/usr/lib/$pkgname/pyrss.xml "$pkgdir"/etc/ejabberd/pyrss.xml
+ sed -i 's#/etc/jabber/pyrss.xml#/etc/ejabberd/pyrss.xml#' "$pkgdir"/usr/lib/$pkgname/contrib/auth.py
+ sed -i 's#/etc/jabber/pyrss.xml#/etc/ejabberd/pyrss.xml#' "$pkgdir"/usr/lib/$pkgname/pyrss.py
+
+ install -Dm0644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
+}
diff --git a/dont-import-psyco.patch b/dont-import-psyco.patch
new file mode 100644
index 00000000000..cd93ada4872
--- /dev/null
+++ b/dont-import-psyco.patch
@@ -0,0 +1,14 @@
+--- pyrss.py.org 2005-08-30 23:54:40.000000000 +0400
++++ pyrss.py 2012-05-03 17:08:39.000000000 +0400
+@@ -10,11 +10,6 @@
+
+ # Added by St. Hermann <sh@sourcecode.de>
+
+-try:
+- import psyco
+- psyco.full()
+-finally:
+- pass
+ from optparse import OptionParser
+ import sys
+ import logging
diff --git a/pyrss.service b/pyrss.service
new file mode 100644
index 00000000000..49f47b65dba
--- /dev/null
+++ b/pyrss.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=RSS jabber service
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/pyrss.pid
+ExecStart=/usr/bin/python2 start.py
+WorkingDirectory=/usr/lib/pyrss
+
+[Install]
+WantedBy=multi-user.target