aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-26 13:24:46 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-08-26 17:53:19 +0000
commitce4635772ba5d1a875a823e8282446a9a5d5dfb4 (patch)
treed39c619bbda7780cd46ec7215c3704c441f27d52
parente0278b85f870213e5ede686135bbf4b1ec1e143e (diff)
downloadaports-ce4635772ba5d1a875a823e8282446a9a5d5dfb4.tar.gz
aports-ce4635772ba5d1a875a823e8282446a9a5d5dfb4.tar.bz2
aports-ce4635772ba5d1a875a823e8282446a9a5d5dfb4.tar.xz
main/python3: improve abuild
-rw-r--r--main/python3/APKBUILD35
1 files changed, 15 insertions, 20 deletions
diff --git a/main/python3/APKBUILD b/main/python3/APKBUILD
index e974d997db..188c09c737 100644
--- a/main/python3/APKBUILD
+++ b/main/python3/APKBUILD
@@ -3,6 +3,7 @@
pkgname=python3
pkgver=3.5.2
+_basever="${pkgver%.*}"
pkgrel=1
pkgdesc="A high-level scripting language"
url="http://www.python.org"
@@ -13,8 +14,7 @@ depends=""
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev xz-dev
sqlite-dev libffi-dev tcl-dev linux-headers gdbm-dev readline-dev"
source="http://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz"
-
-builddir="$srcdir"/Python-$pkgver
+builddir="$srcdir/Python-$pkgver"
prepare() {
default_prepare || return 1
@@ -53,36 +53,31 @@ package() {
|| return 1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
- local _basever="${pkgver%.*}"
ln -sf ../../libpython${_basever}m.so \
"${pkgdir}/usr/lib/python${_basever}/config-${_basever}m/libpython${_basever}m.so"
}
-_mv_files() {
- cd "$pkgdir"/usr/lib/python${pkgver%.*}
- for i in */test */tests; do
- mkdir -p "$subpkgdir"/usr/lib/python${pkgver%.*}/"$i"
- mv "$i"/* "$subpkgdir"/usr/lib/python${pkgver%.*}/"$i"
- rm -rf "$i"
- done
- mv "$pkgdir"/usr/lib/python${pkgver%.*}/test \
- "$subpkgdir"/usr/lib/python${pkgver%.*}
-}
-
dev() {
+ default_dev || return 1
+
# pyconfig.h is needed runtime so we move it back
- default_dev
- mkdir -p "$pkgdir"/usr/include/python${pkgver%.*}m
- mv "$subpkgdir"/usr/include/python${pkgver%.*}m/pyconfig.h \
- "$pkgdir"/usr/include/python${pkgver%.*}m/
+ mkdir -p "$pkgdir"/usr/include/python${_basever}m
+ mv "$subpkgdir"/usr/include/python${_basever}m/pyconfig.h \
+ "$pkgdir"/usr/include/python${_basever}m/
}
tests() {
pkgdesc="The test modules from the main python package"
arch="noarch"
- cd "$pkgdir"
- _mv_files
+ cd "$pkgdir"/usr/lib/python$_basever
+ local i; for i in */test */tests; do
+ mkdir -p "$subpkgdir"/usr/lib/python$_basever/"$i"
+ mv "$i"/* "$subpkgdir"/usr/lib/python$_basever/"$i"
+ rm -rf "$i"
+ done
+ mv "$pkgdir"/usr/lib/python$_basever/test \
+ "$subpkgdir"/usr/lib/python$_basever/
}
md5sums="8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz"