summaryrefslogtreecommitdiff
path: root/~xihh/viennarna
diff options
context:
space:
mode:
Diffstat (limited to '~xihh/viennarna')
-rw-r--r--~xihh/viennarna/PKGBUILD42
-rw-r--r--~xihh/viennarna/setup.py31
2 files changed, 73 insertions, 0 deletions
diff --git a/~xihh/viennarna/PKGBUILD b/~xihh/viennarna/PKGBUILD
new file mode 100644
index 000000000..37de53d11
--- /dev/null
+++ b/~xihh/viennarna/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
+# Maintainer: Joshua Ismael Haase Hernandez <joshpar@stravy>
+pkgbase='viennarna'
+pkgname=('viennarna' 'python2-viennarna')
+pkgver=1.8.5
+pkgrel=1
+pkgdesc="RNA Secondary Structure Prediction and Comparison"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.tbi.univie.ac.at/RNA/"
+makedepends=('python2' 'swig')
+license=('Custom:BSD3')
+source=("setup.py"
+ "http://www.tbi.univie.ac.at/RNA/ViennaRNA-${pkgver}.tar.gz")
+md5sums=('d006ef9bb878aea6c184afa89986788e'
+ 'cd70d63cc1be928a5f0973bd6c211e96')
+
+build() {
+ cd "$srcdir/ViennaRNA-$pkgver"
+ ./configure --prefix=/usr --without-forester
+ make
+}
+
+package_viennarna() {
+ cd "$srcdir/ViennaRNA-$pkgver"
+ make DESTDIR="$pkgdir/" install
+}
+
+package_python2-viennarna() {
+ depends=('python2')
+ options=(!emptydirs)
+
+ mkdir -p "$srcdir/ViennaRNA-$pkgver/Python"
+ cp -r $srcdir/ViennaRNA-$pkgver/Perl/*.i "$srcdir/setup.py" \
+ "$srcdir/ViennaRNA-$pkgver/Python"
+
+ cd "$srcdir/ViennaRNA-$pkgver/Python"
+
+ swig -python RNA.i
+
+ python2 setup.py install --root="$pkgdir/" --optimize=1
+
+}
diff --git a/~xihh/viennarna/setup.py b/~xihh/viennarna/setup.py
new file mode 100644
index 000000000..00ac0a28d
--- /dev/null
+++ b/~xihh/viennarna/setup.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+from distutils.core import setup, Extension
+import os
+import sys
+
+old_filename = os.path.join(os.path.curdir, "RNA.py")
+new_filename = os.path.join(os.path.curdir, "__init__.py")
+if os.path.exists(old_filename):
+ os.rename(old_filename, new_filename)
+
+extra_link_args = []
+if sys.platform != 'darwin':
+ extra_link_args.append('-s')
+
+extension = Extension("_RNA",
+ ["RNA_wrap.c"],
+ libraries=['RNA'],
+ library_dirs=['lib'],
+ extra_link_args=extra_link_args
+ )
+
+setup(name="RNA",
+ version="1.8.5",
+ description="Vienna RNA",
+ author="Ivo Hofacker, Institute for Theoretical Chemistry, University of Vienna",
+ url="http://www.tbi.univie.ac.at/RNA/",
+ package_dir = {'vienna': os.path.curdir},
+ packages = ['vienna'],
+ ext_modules=[extension],
+ )