diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-25 16:08:11 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-25 16:18:18 +0200 |
commit | 5b8cc2022f15aa485264122a75938cbb812938fa (patch) | |
tree | 1188fcb8e7681994007dd96df14b6647bacc5a68 /main/py-jinja2 | |
parent | 42d51bfba38c3617f83068986f1819e4135c334b (diff) | |
download | aports-5b8cc2022f15aa485264122a75938cbb812938fa.tar.bz2 aports-5b8cc2022f15aa485264122a75938cbb812938fa.tar.xz |
main/py-jinja2: clean-up abuild, add subpackage -vim
Diffstat (limited to 'main/py-jinja2')
-rw-r--r-- | main/py-jinja2/APKBUILD | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/main/py-jinja2/APKBUILD b/main/py-jinja2/APKBUILD index 1febe9e9f5..20d11ef6b3 100644 --- a/main/py-jinja2/APKBUILD +++ b/main/py-jinja2/APKBUILD @@ -11,55 +11,42 @@ license="BSD" depends="python py-markupsafe" makedepends="python-dev py-setuptools" install="" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-vim" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - cd "$_builddir" - # apply patches here -} +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" python setup.py build || return 1 } package() { - cd "$_builddir" + cd "$builddir" python setup.py install --root "$pkgdir" || return 1 } doc() { - cd "$_builddir" + local docdir="$subpkgdir/usr/share/doc/$pkgname" - mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1 - for _doc in AUTHORS CHANGES LICENSE; do - install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/$_doc \ - || return 1 - done + default_doc || return 1 + cd "$builddir" # Note: The documentation in the docs directory needs to be generated # by py-sphinx, however, this package (py-jinja2) is a dependency of # Sphinx itself! - mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/docs || return 1 - cp -R ./docs/* "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1 - chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1 + mkdir -p "$docdir" + cp -R docs examples "$docdir"/ || return 1 + + install -m 644 -D LICENSE "$subpkgdir"/usr/share/licenses/$pkgname/LICENSE +} - mkdir -p "$subpkgdir"/usr/share/$pkgname || return 1 - for _dir in artwork examples ext; do - mkdir -p "$subpkgdir"/usr/share/$pkgname/$_dir/ || return 1 - cp -R ./$_dir/* "$subpkgdir"/usr/share/$pkgname/$_dir/ \ - || return 1 - chmod -R 644 "$subpkgdir"/usr/share/$pkgname/$_dir/ \ - || return 1 - done +vim() { + pkgdesc="Vim syntax for Jinja2" + depends="vim" + install_if="$pkgname=$pkgver-r$pkgrel vim" - # Fix subdir perms - find "$subpkgdir"/usr/share/doc/$pkgname/ -type d \ - -exec chmod 755 '{}' \; || return 1 - find "$subpkgdir"/usr/share/$pkgname/ -type d \ - -exec chmod 755 '{}' \; || return 1 + install -m 644 -D "$builddir"/ext/Vim/jinja.vim \ + "$subpkgdir"//usr/share/vim/vimfiles/syntax/jinja.vim } md5sums="edb51693fe22c53cee5403775c71a99e Jinja2-2.8.tar.gz" |