From bf2dd2a0966e3f20e206e0cf5c898191520c187f Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 19 Nov 2016 16:35:46 +0100 Subject: main/py-pygments: improve abuild - doc subpackage --- main/py-pygments/APKBUILD | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/main/py-pygments/APKBUILD b/main/py-pygments/APKBUILD index 6448585ffd..7724ed749a 100644 --- a/main/py-pygments/APKBUILD +++ b/main/py-pygments/APKBUILD @@ -10,7 +10,7 @@ arch="noarch" license="BSD" depends="" makedepends="python2-dev python3-dev py-setuptools" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarch" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -44,28 +44,20 @@ _py() { } doc() { - cd "$builddir" + local destdir="$subpkgdir/usr/share/doc/$pkgname" - mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1 - for _doc in AUTHORS CHANGES LICENSE TODO; do - install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/$_doc \ - || return 1 - done + cd "$builddir" - install -Dm644 doc/pygmentize.1 \ + install -m 644 -D doc/pygmentize.1 \ "$subpkgdir"/usr/share/man/man1/pygmentize.1 || return 1 + mkdir -p "$destdir" || return 1 + cp AUTHORS CHANGES LICENSE TODO "$destdir"/ || return 1 + # Note: The documentation in the doc directory needs to be generated # by py-sphinx - mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/docs || return 1 - cp -R ./doc/* "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1 - chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1 - rm -f "$subpkgdir"/usr/share/doc/$pkgname/docs/make.bat || return 1 - rm -f "$subpkgdir"/usr/share/doc/$pkgname/docs/pygmentize.1 || return 1 + cp -R ./doc/docs/* "$destdir"/ || return 1 - # Fix subdir perms - find "$subpkgdir"/usr/share/doc/$pkgname/ -type d \ - -exec chmod 755 '{}' \; || return 1 default_doc } -- cgit v1.2.3