summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/libpurple-minimal/PKGBUILD46
-rw-r--r--pcr/poco/PKGBUILD44
-rw-r--r--pcr/spectrum/PKGBUILD81
-rw-r--r--pcr/spectrum/gcc47.patch97
-rw-r--r--pcr/spectrum/logrotate.spectrum10
-rw-r--r--pcr/spectrum/spectrum.install45
-rw-r--r--pcr/spectrum/spectrum.tmpfiles1
-rw-r--r--pcr/spectrum/spectrum@.service14
8 files changed, 338 insertions, 0 deletions
diff --git a/pcr/libpurple-minimal/PKGBUILD b/pcr/libpurple-minimal/PKGBUILD
new file mode 100644
index 000000000..5526879d1
--- /dev/null
+++ b/pcr/libpurple-minimal/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Magicking <syllaur@gmail.com>
+# Contributors: wzff BluePeppers n0nsense
+pkgname=libpurple-minimal
+pkgver=2.10.0
+pkgrel=3
+pkgdesc="minimal build of the pidgin IM library (no gstreamer, perl and X11 dependencies)"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://developer.pidgin.im/wiki/WhatIsLibpurple"
+license=('GPL')
+depends=('glib2' 'gnutls' 'libxml2' 'libidn' 'nss' 'avahi')
+makedepends=('make' 'intltool')
+conflicts=('libpurple')
+provides=("libpurple=${pkgver}")
+source="http://downloads.sourceforge.net/pidgin/pidgin-${pkgver}.tar.gz"
+md5sums=('b92f83f6f075d9cd814d3ccff9fd6cac')
+
+build(){
+ cd $srcdir/pidgin-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-perl \
+ --disable-gtkui \
+ --disable-consoleui \
+ --disable-sm \
+ --disable-gestures \
+ --disable-screensaver \
+ --disable-startup-notification \
+ --disable-schemas-install \
+ --disable-tcl \
+ --disable-tk \
+ --disable-nls \
+ --without-x \
+ --disable-vv \
+ --disable-gstreamer \
+ --disable-meanwhile \
+ --disable-dbus \
+ --disable-doxygen \
+ --with-system-ssl-certs=/etc/ssl/certs
+ make -C libpurple
+}
+
+package() {
+ cd $srcdir/pidgin-${pkgver}
+ make -C libpurple DESTDIR=$pkgdir install
+}
+
diff --git a/pcr/poco/PKGBUILD b/pcr/poco/PKGBUILD
new file mode 100644
index 000000000..dad4788d1
--- /dev/null
+++ b/pcr/poco/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Rodrigo Grumiche Silva <grumiche at integrityit dot com dot br>
+# Contributor: nozog
+# Contributor: davidhjelm
+# Contributor: Ray Kohler <ataraxia937 at gmail dot com>
+# Contributor: Nathan Owe < ndowens04 at gmail dot com>
+
+pkgname=poco
+pkgver=1.4.2p1
+pkgrel=2
+pkgdesc="C++ class libraries for network-centric, portable applications,
+complete edition"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.pocoproject.org/"
+license=('custom:boost')
+depends=('unixodbc' 'libmysqlclient' 'openssl')
+makedepends=('gcc' 'make' 'unixodbc' 'libmysqlclient' 'openssl' 'chrpath')
+options=()
+source=(http://downloads.sourceforge.net/poco/$pkgname-$pkgver-all.tar.bz2)
+
+build() {
+ cd $srcdir/$pkgname-$pkgver-all
+ ./configure --prefix=/usr --no-samples --no-tests
+ make
+}
+
+
+package() {
+ cd $srcdir/$pkgname-$pkgver-all
+
+ make DESTDIR=$pkgdir install
+
+ install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+
+ #removing rpath information from binaries
+ chrpath -d $pkgdir/usr/bin/cpspc
+ chrpath -d $pkgdir/usr/bin/cpspcd
+ chrpath -d $pkgdir/usr/bin/f2cpspd
+ chrpath -d $pkgdir/usr/bin/f2cpsp
+
+ #removing debugging libraries
+ rm $pkgdir/usr/lib/libPoco*d.so*
+}
+
+md5sums=('752e5f5545377be24ee7c7b6b479fbbe')
diff --git a/pcr/spectrum/PKGBUILD b/pcr/spectrum/PKGBUILD
new file mode 100644
index 000000000..250840fb7
--- /dev/null
+++ b/pcr/spectrum/PKGBUILD
@@ -0,0 +1,81 @@
+# Maintainer: Clément Démoulins <clement@archivel.fr>
+# Contributor: Sonny Piers <sonny.piers@gmail.com>
+# Contributor: Tim Besard <tim.besard@gmail.com>
+# Contributor: miniature <miniature@archlinux.us>
+
+pkgname=spectrum
+pkgver=1.4.8
+pkgrel=4
+pkgdesc="XMPP libpurple transport/gateway."
+arch=('i686' 'x86_64' 'mips64el')
+url="http://spectrum.im"
+license=('GPL')
+depends=('gloox' 'libpurple-minimal' 'poco' 'python2' libev)
+replaces=('spectrum-git')
+makedepends=('cmake' 'gettext')
+optdepends=('mysql: MySQL database backend support'
+ 'postgresql-libs: PostgreSQL database backend support'
+ 'sqlite3: SQLite database backend support'
+ 'libevent: support for libevent'
+ 'imagemagick: support for avatars synchronization with legacy networks'
+
+ # Protocols plugins
+ 'mbpurple-svn: microblogging services support like Twitter or identi.ca/StatusNet'
+ 'msn-pecan: a different implementation of the MSN protocol for libpurple'
+ 'pidgin-facebookchat: Facebook support, with more features than Facebook XMPP server'
+ 'pidgin-sipe: SIPE protocol support'
+)
+backup=('etc/conf.d/spectrum')
+install='spectrum.install'
+
+source=('https://github.com/downloads/hanzz/libtransport/spectrum-1.4.8.tar.gz'
+ 'logrotate.spectrum'
+ 'gcc47.patch'
+ 'spectrum@.service'
+ 'spectrum.tmpfiles')
+md5sums=('edd88e1e70f86fe9aa4b43d787529a47'
+ '4f9cbfe3878fe5f4137d1bb5acc9e850'
+ '7a3de7e91d581b6c9119965ac34b9510'
+ '8abfd4926fec074847c4d28465af22bb'
+ '21dc715b3b2fb90c5349a12966277bc6')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ msg "Starting make..."
+
+ sed -i -e 's/${PYTHON_EXECUTABLE}/python2/g' CMakeLists.txt
+ patch -p1 < ../gcc47.patch
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
+ make
+
+ cd spectrumctl
+ python2 setup.py build
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Various needed folders -- correct permissions are set in spectrum.install
+ install -d "${pkgdir}/etc/spectrum"
+ install -d "${pkgdir}/var/log/spectrum"
+ install -d "${pkgdir}/var/lib/spectrum"
+
+ # Install binaries and Python control script
+ make DESTDIR="${pkgdir}" install
+
+ cd spectrumctl
+ python2 setup.py install --root="${pkgdir}"
+
+ # Install initscript and logrotate config
+ install -Dm755 "${srcdir}/${pkgname}-${pkgver}/initscripts/archlinux/spectrum-rc.d" "${pkgdir}/etc/rc.d/spectrum"
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/initscripts/archlinux/spectrum-conf.d" "${pkgdir}/etc/conf.d/spectrum"
+ install -Dm644 "${srcdir}/logrotate.spectrum" "${pkgdir}/etc/logrotate.d/spectrum"
+
+ # Install systemd related files
+ install -Dm644 "${srcdir}/spectrum@.service" "${pkgdir}/usr/lib/systemd/system/spectrum@.service"
+ install -Dm644 "${srcdir}/spectrum.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/spectrum.conf"
+
+ # Patch to use python2
+ sed -i -e "s|#!/usr/bin/env python|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/spectrumctl"
+}
diff --git a/pcr/spectrum/gcc47.patch b/pcr/spectrum/gcc47.patch
new file mode 100644
index 000000000..82cc58677
--- /dev/null
+++ b/pcr/spectrum/gcc47.patch
@@ -0,0 +1,97 @@
+diff -rupN spectrum-1.4.8/src/configinterface.cpp spectrum-1.4.8_gcc47/src/configinterface.cpp
+--- spectrum-1.4.8/src/configinterface.cpp 2011-06-11 15:17:44.000000000 +0200
++++ spectrum-1.4.8_gcc47/src/configinterface.cpp 2012-04-14 18:27:14.000000000 +0200
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ */
+
++#include <unistd.h>
+ #include "configinterface.h"
+ #include "sys/un.h"
+ #include "sys/socket.h"
+diff -rupN spectrum-1.4.8/src/spectrum_util.cpp spectrum-1.4.8_gcc47/src/spectrum_util.cpp
+--- spectrum-1.4.8/src/spectrum_util.cpp 2011-06-11 15:17:44.000000000 +0200
++++ spectrum-1.4.8_gcc47/src/spectrum_util.cpp 2012-04-14 18:26:33.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include "protocols/abstractprotocol.h"
+ #include "transport.h"
+ #include <sys/param.h>
++#include <unistd.h>
+ #ifdef BSD
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+diff -rupN spectrum-1.4.8/src/utf8/checked.h spectrum-1.4.8_gcc47/src/utf8/checked.h
+--- spectrum-1.4.8/src/utf8/checked.h 2010-10-08 09:15:22.000000000 +0200
++++ spectrum-1.4.8_gcc47/src/utf8/checked.h 2012-04-14 18:26:31.000000000 +0200
+@@ -65,6 +65,35 @@ namespace utf8
+
+ /// The library API - functions intended to be called by the users
+
++ template <typename octet_iterator>
++ octet_iterator append(uint32_t cp, octet_iterator result)
++ {
++ if (!internal::is_code_point_valid(cp))
++ throw invalid_code_point(cp);
++
++ if (cp < 0x80) // one octet
++ *(result++) = static_cast<uint8_t>(cp);
++ else if (cp < 0x800) { // two octets
++ *(result++) = static_cast<uint8_t>((cp >> 6) | 0xc0);
++ *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
++ }
++ else if (cp < 0x10000) { // three octets
++ *(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
++ *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
++ *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
++ }
++ else if (cp <= internal::CODE_POINT_MAX) { // four octets
++ *(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
++ *(result++) = static_cast<uint8_t>(((cp >> 12)& 0x3f) | 0x80);
++ *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
++ *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
++ }
++ else
++ throw invalid_code_point(cp);
++
++ return result;
++ }
++
+ template <typename octet_iterator, typename output_iterator>
+ output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement)
+ {
+@@ -104,35 +133,6 @@ namespace utf8
+ }
+
+ template <typename octet_iterator>
+- octet_iterator append(uint32_t cp, octet_iterator result)
+- {
+- if (!internal::is_code_point_valid(cp))
+- throw invalid_code_point(cp);
+-
+- if (cp < 0x80) // one octet
+- *(result++) = static_cast<uint8_t>(cp);
+- else if (cp < 0x800) { // two octets
+- *(result++) = static_cast<uint8_t>((cp >> 6) | 0xc0);
+- *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
+- }
+- else if (cp < 0x10000) { // three octets
+- *(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
+- *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
+- *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
+- }
+- else if (cp <= internal::CODE_POINT_MAX) { // four octets
+- *(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
+- *(result++) = static_cast<uint8_t>(((cp >> 12)& 0x3f) | 0x80);
+- *(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
+- *(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
+- }
+- else
+- throw invalid_code_point(cp);
+-
+- return result;
+- }
+-
+- template <typename octet_iterator>
+ uint32_t next(octet_iterator& it, octet_iterator end)
+ {
+ uint32_t cp = 0;
diff --git a/pcr/spectrum/logrotate.spectrum b/pcr/spectrum/logrotate.spectrum
new file mode 100644
index 000000000..ae52ff156
--- /dev/null
+++ b/pcr/spectrum/logrotate.spectrum
@@ -0,0 +1,10 @@
+/var/log/spectrum/*.log {
+ notifempty
+ missingok
+ sharedscripts
+ postrotate
+ for P in /var/run/spectrum/*.pid; do
+ /bin/kill -HUP `cat "$P" 2>/dev/null` 2>/dev/null || true
+ done
+ endscript
+}
diff --git a/pcr/spectrum/spectrum.install b/pcr/spectrum/spectrum.install
new file mode 100644
index 000000000..d3e0449fc
--- /dev/null
+++ b/pcr/spectrum/spectrum.install
@@ -0,0 +1,45 @@
+# arg 1: the new package version
+post_install() {
+ if [ -z "`grep '^spectrum:' /etc/group`" ]; then
+ groupadd -g 417 spectrum
+ fi
+ if [ -z "`grep '^spectrum:' /etc/passwd`" ]; then
+ useradd -u 417 -d /etc/spectrum -g spectrum -s /bin/false spectrum
+ fi
+
+ chown spectrum:spectrum var/lib/spectrum
+ chown spectrum:spectrum var/log/spectrum
+
+cat << EOF
+
+==> Documentation: http://spectrum.im/
+
+==> You must now customize the configuration file located in /etc/spectrum/. Copy and reconfigure for each seperate protocol.
+
+EOF
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ userdel spectrum
+
+ paths=(/etc/spectrum /var/lib/spectrum /var/log/spectrum)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ echo "==> Leftover Paths:"
+ fi
+ echo "==> $path"
+ fi
+ done
+}
diff --git a/pcr/spectrum/spectrum.tmpfiles b/pcr/spectrum/spectrum.tmpfiles
new file mode 100644
index 000000000..cabe97bc5
--- /dev/null
+++ b/pcr/spectrum/spectrum.tmpfiles
@@ -0,0 +1 @@
+d /run/spectrum 0750 spectrum spectrum -
diff --git a/pcr/spectrum/spectrum@.service b/pcr/spectrum/spectrum@.service
new file mode 100644
index 000000000..8e1338543
--- /dev/null
+++ b/pcr/spectrum/spectrum@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Spectrum XMPP transport for %i
+After=network.service prosody.service ejabberd.service
+
+[Service]
+Type=forking
+PIDFile=/run/spectrum/%i.pid
+ExecStart=/usr/bin/spectrumctl --su=spectrum -c /etc/spectrum/%i.cfg start
+ExecStop=/usr/binspectrumctl --su=spectrum -c /etc/spectrum/%i.cfg stop
+ExecReload=/usr/binspectrumctl --su=spectrum -c /etc/spectrum/%i.cfg reload
+
+[Install]
+WantedBy=multi-user.target
+