aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.dk>2017-05-09 02:31:15 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-14 11:41:12 +0000
commit3d60f5daf2c89dd871b57ac292ec69aa955ef885 (patch)
tree16a036e65aa940253802dcfb5f65c8aa5deb81f9
parenta0ec489d5dd0d773367ac0f3cce2ecfe336d97b6 (diff)
downloadaports-3d60f5daf2c89dd871b57ac292ec69aa955ef885.tar.bz2
aports-3d60f5daf2c89dd871b57ac292ec69aa955ef885.tar.xz
testing/py-unoconv: new aport
-rw-r--r--testing/py-unoconv/APKBUILD46
-rw-r--r--testing/py-unoconv/setup.py42
2 files changed, 88 insertions, 0 deletions
diff --git a/testing/py-unoconv/APKBUILD b/testing/py-unoconv/APKBUILD
new file mode 100644
index 0000000000..6d4ce01593
--- /dev/null
+++ b/testing/py-unoconv/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: TBK <tbk@jjtc.eu>
+pkgname=unoconv
+pkgver=0.7
+pkgrel=0
+pkgdesc="Tool to convert between any document format supported by LibreOffice"
+url="http://dag.wieers.com/home-made/unoconv/"
+arch="noarch"
+license="GPL2"
+depends="libreoffice"
+makedepends="python3-dev py-setuptools"
+subpackages="py3-${pkgname#py-}:_py3"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/dagwieers/$pkgname/archive/$pkgver.tar.gz
+ setup.py"
+builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$builddir"/../
+ mv setup.py "$builddir"
+}
+
+build() {
+ cd "$builddir"
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="3b0837e11f22733e0fbef93dc6aeabd0e2d3d59b6c35a6f7b29b86506a5842bcbffb3e889864d6e14c1e53dd306354690a699257fe60f36ce1d4455ab52b5df7 unoconv-0.7.tar.gz
+b4fa76011fb96ba9521bb09d1a5c43dbd457c50bb2c6d66a5bc65928cde1e1d8174e43ad86f8f53755f222127cc5b0084b4564c248ce1fca56f9acfb4c03d86d setup.py"
diff --git a/testing/py-unoconv/setup.py b/testing/py-unoconv/setup.py
new file mode 100644
index 0000000000..9f1b45fc91
--- /dev/null
+++ b/testing/py-unoconv/setup.py
@@ -0,0 +1,42 @@
+"""
+Universal Office Converter - Convert between any document format supported by LibreOffice/OpenOffice.
+
+See:
+https://github.com/dagwieers/unoconv
+"""
+
+# Always prefer setuptools over distutils
+from setuptools import setup, find_packages
+# To use a consistent encoding
+from codecs import open
+from os import path
+
+here = path.abspath(path.dirname(__file__))
+# Get the long description from the README file
+with open(path.join(here, 'README.adoc'), encoding='utf-8') as f:
+ long_description = f.read()
+
+setup(name = "unoconv",
+ version = "0.7",
+ author = "Dag Wieers",
+ author_email = "dag.wieers@gmail.com",
+ url = "https://github.com/dagwieers/unoconv",
+ description = "Universal Office Converter - Convert between any document format supported by LibreOffice/OpenOffice.",
+ scripts = ["unoconv"],
+ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Console',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'Intended Audience :: Education',
+ 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 3',
+ 'Topic :: Documentation',
+ 'Topic :: Office/Business :: Office Suites',
+ 'Topic :: Utilities',
+
+ ]
+)