aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-pillow/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-11-19 14:12:06 +0100
committerJakub Jirutka <jakub@jirutka.cz>2016-11-19 14:18:41 +0100
commitd3ad4f7aeb9e01b8caebd8ab1e3f1e1c1b0d35f5 (patch)
treef60c306150fbca8c90ee172b1b60d6760295b016 /main/py-pillow/APKBUILD
parent6770db0bdd89b3da6bff9bbae9cf49c5d5e4cea9 (diff)
downloadaports-d3ad4f7aeb9e01b8caebd8ab1e3f1e1c1b0d35f5.tar.gz
aports-d3ad4f7aeb9e01b8caebd8ab1e3f1e1c1b0d35f5.tar.bz2
aports-d3ad4f7aeb9e01b8caebd8ab1e3f1e1c1b0d35f5.tar.xz
main/py-pillow: move scripts from /usr/bin to docs
These scripts should not be in /usr/bin, they are mostly examples of how to use pillow. Fedora also moves them to docs.
Diffstat (limited to 'main/py-pillow/APKBUILD')
-rw-r--r--main/py-pillow/APKBUILD16
1 files changed, 14 insertions, 2 deletions
diff --git a/main/py-pillow/APKBUILD b/main/py-pillow/APKBUILD
index fcbfdb923e..a6f65a4ed7 100644
--- a/main/py-pillow/APKBUILD
+++ b/main/py-pillow/APKBUILD
@@ -11,7 +11,7 @@ license="PSF"
depends=""
makedepends="python2-dev python3-dev py-setuptools freetype-dev jpeg-dev libwebp-dev
tiff-dev libpng-dev lcms2-dev openjpeg-dev zlib-dev"
-subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+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"
@@ -43,7 +43,19 @@ _py() {
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1
+
+ # The scripts are packages in -doc, they should not be here.
+ rm -r "$subpkgdir"/usr/bin
+}
+
+doc() {
+ pkgdesc="$pkgdesc (documentation)"
+ local destdir="$subpkgdir/usr/share/doc/$pkgname"
+
+ cd "$builddir"
+ install -d "$destdir"/Scripts
+ install -m 644 Scripts/* "$destdir"/Scripts/
}
md5sums="09ebb92ec5cbba13ff1acf139caf6b66 Pillow-3.4.2.tar.gz"