diff options
Diffstat (limited to 'abs/core/python_modules/m2r/PKGBUILD')
-rw-r--r-- | abs/core/python_modules/m2r/PKGBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/abs/core/python_modules/m2r/PKGBUILD b/abs/core/python_modules/m2r/PKGBUILD new file mode 100644 index 0000000..da5739a --- /dev/null +++ b/abs/core/python_modules/m2r/PKGBUILD @@ -0,0 +1,56 @@ +# $Id$ +# Maintainer: Felix Yan <felixonmars@archlinux.org> + +pkgbase=m2r +pkgname=(m2r python2-m2r) +pkgver=0.1.14 +pkgrel=1 +pkgdesc="Markdown to reStructuredText converter" +arch=('any') +url="https://github.com/miyakogi/m2r" +license=('MIT') +makedepends=('python-setuptools' 'python2-setuptools' 'python-mistune' 'python2-mistune' + 'python-docutils' 'python2-docutils') +checkdepends=('python2-mock' 'python-pygments' 'python2-pygments' 'python-pytest-runner' + 'python2-pytest-runner') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/miyakogi/m2r/archive/v$pkgver.tar.gz") +sha512sums=('ad6c8c8df199c193af92b1fc7e144f4a5653f8a077d5d29a5ad378d96c7a94c5c9d933042bdbc0e0ddd6128c83211066efaac7d0b6a6c68b62b3552d2bfd886e') + +prepare() { + cp -a m2r-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/m2r-$pkgver + python setup.py build + + cd "$srcdir"/m2r-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/m2r-$pkgver + python setup.py pytest + + cd "$srcdir"/m2r-$pkgver-py2 + python2 setup.py pytest +} + +package_m2r() { + depends=('python-mistune' 'python-docutils' 'python-setuptools') + + cd "$srcdir"/m2r-$pkgver + python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-m2r() { + depends=('python2-mistune' 'python2-docutils' 'python2-setuptools') + + cd "$srcdir"/m2r-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 + mv "$pkgdir"/usr/bin/m2r{,-python2} + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: |