From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/flumotion/PKGBUILD | 45 ++++++++++++++++++++++++++++++++++++++ community/flumotion/python27.patch | 27 +++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 community/flumotion/PKGBUILD create mode 100644 community/flumotion/python27.patch (limited to 'community/flumotion') diff --git a/community/flumotion/PKGBUILD b/community/flumotion/PKGBUILD new file mode 100644 index 000000000..76930a05d --- /dev/null +++ b/community/flumotion/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 40273 2011-02-22 18:15:11Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: Geoffroy Carrier +# Contributor: William Rea + +pkgname=flumotion +pkgver=0.8.0 +pkgrel=6 +arch=('i686' 'x86_64') +pkgdesc="A streaming media server" +url="http://www.flumotion.net" +options=('!libtool') +license=('GPL') +backup=(etc/flumotion/workers/default.xml + etc/flumotion/managers/default/planet.xml) +depends=('gtk2' 'pygtk' 'gstreamer0.10-python' 'kiwi' 'gstreamer0.10-good-plugins' + 'gstreamer0.10-base-plugins' 'python2-pyopenssl' 'twisted' 'gnome-vfs') +makedepends=('perlxml') +source=(http://www.flumotion.net/src/$pkgname/$pkgname-$pkgver.tar.bz2 + python27.patch) +md5sums=('1df1f8fc47ca4cc6d3ead912f2ac76af' + '623a41a985d2b114c58db701c6d5d13e') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # python2 fix + sed -i 's_candidate in python_candidate in python2_' configure + 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 + + # python2.7 patch + patch -Np0 -i "$srcdir/python27.patch" + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + + install -d "$pkgdir/etc/$pkgname" + make + make DESTDIR="$pkgdir" install + cp -R conf/workers "$pkgdir/etc/$pkgname" + cp -R conf/managers "$pkgdir/etc/$pkgname" + cp conf/default.pem "$pkgdir/etc/$pkgname" +} diff --git a/community/flumotion/python27.patch b/community/flumotion/python27.patch new file mode 100644 index 000000000..70b00bbeb --- /dev/null +++ b/community/flumotion/python27.patch @@ -0,0 +1,27 @@ +Index: flumotion/twisted/reflect.py +=================================================================== +--- flumotion/twisted/reflect.py (revision 8894) ++++ flumotion/twisted/reflect.py (working copy) +@@ -57,7 +57,10 @@ + # if the ImportError happened in the module being imported, + # this is a failure that should be handed to our caller. + shortname = trialname.split('.')[-1] +- r = str(sys.exc_info()[1]) ++ # if we're on python2.7 the module is wrapped in single quotation ++ # marks thus broking this method that relies on the message ending ++ # with the name that failed. ++ r = str(sys.exc_info()[1]).strip("'") + if not (r.startswith('No module named') and + r.endswith(shortname)): + raise +@@ -71,3 +74,10 @@ + obj = getattr(obj, n) + + return obj ++ ++# Use the method that comes with twisted if we're running on 8.0 or higher. ++# FIXME: Remove this module when we can depend on Twisted 8.0 ++from twisted.copyright import version ++twistedVersion = tuple([int(n) for n in version.split('.')[0:3]]) ++if twistedVersion >= (8, 0, 0): ++ from twisted.python.reflect import namedAny -- cgit v1.2.3-54-g00ecf