summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2014-05-02 15:25:41 +0200
committerCarsten Teibes2014-05-02 15:25:41 +0200
commit5554419e7d7ca9f136a5f9ca85d346fe7ecb1929 (patch)
tree76fd575703c88f44191be4801df20d5a9d571d24
parentbe9ce9e6e8ef1461d11f96b55161dc08a678aa9c (diff)
downloadaur-5554419e7d7ca9f136a5f9ca85d346fe7ecb1929.tar.gz
[upd] Make split package for new AUR version
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD38
2 files changed, 42 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 524e63d8bd0..841f999f1fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,11 +7,20 @@ pkgbase = python-librtmp
arch = x86_64
license = custom: Simplified BSD
makedepends = python-setuptools
- depends = python-singledispatch
- depends = python-cffi
- depends = rtmpdump
+ makedepends = python2-setuptools
+ makedepends = python-cffi
+ makedepends = python2-cffi
source = https://pypi.python.org/packages/source/p/python-librtmp/python-librtmp-0.2.0.tar.gz
sha256sums = 0a4385aa59f6f4d09ffa95cb85c1b0acd4678c8af3f21f45dd009d5f807a9635
pkgname = python-librtmp
+ depends = python3
+ depends = python-cffi
+ depends = rtmpdump
+
+pkgname = python2-librtmp
+ depends = python2
+ depends = python2-singledispatch
+ depends = python2-cffi
+ depends = rtmpdump
diff --git a/PKGBUILD b/PKGBUILD
index 6d3e1f4f828..1217f51acb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,49 @@
# Maintainer: carstene1ns <url/mail: arch carsten-teibes de>
# Contributor: kevku <kevku@gmx.com>
-pkgname=python-librtmp
+pkgbase=python-librtmp
+pkgname=(python-librtmp python2-librtmp)
pkgver=0.2.0
pkgrel=1
pkgdesc="Python interface to librtmp"
arch=('i686' 'x86_64')
url="https://github.com/chrippa/python-librtmp"
license=('custom: Simplified BSD')
-depends=('python-singledispatch' 'python-cffi' 'rtmpdump')
-makedepends=('python-setuptools')
-source=("https://pypi.python.org/packages/source/p/$pkgname/$pkgname-$pkgver.tar.gz")
+makedepends=('python-setuptools' 'python2-setuptools' 'python-cffi' 'python2-cffi')
+source=("https://pypi.python.org/packages/source/p/$pkgbase/$pkgbase-$pkgver.tar.gz")
sha256sums=('0a4385aa59f6f4d09ffa95cb85c1b0acd4678c8af3f21f45dd009d5f807a9635')
+prepare() {
+ # copy folder, so we can cleanly build for both python versions
+ cp -rup python-librtmp-$pkgver python2-librtmp-$pkgver
+}
+
build() {
- cd $pkgname-$pkgver
+ # build for python 3
+ cd python-librtmp-$pkgver
+ python3 setup.py build
- python setup.py build
+ # build for python 2
+ cd ../python2-librtmp-$pkgver
+ python2 setup.py build
}
-package() {
- cd $pkgname-$pkgver
+# package for python 3
+package_python-librtmp() {
+ depends=('python3' 'python-cffi' 'rtmpdump')
+
+ cd python-librtmp-$pkgver
python setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
+
+# package for python 2
+package_python2-librtmp() {
+ depends=('python2' 'python2-singledispatch' 'python2-cffi' 'rtmpdump')
+
+ cd python2-librtmp-$pkgver
+
+ python2 setup.py install --root="$pkgdir/" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}