wok annotate python-numpy/receipt @ rev 24055
Add current_version for most github hosted softwares
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 08 08:46:05 2021 +0000 (2021-06-08) |
parents | 74b39318b0a3 |
children | 5a69b27e347a |
rev | line source |
---|---|
claudinei@3411 | 1 # SliTaz package receipt. |
claudinei@3411 | 2 |
claudinei@3411 | 3 PACKAGE="python-numpy" |
Hans-G?nter@23516 | 4 VERSION="1.16.4" # last version fpr Python 2 |
claudinei@3411 | 5 CATEGORY="development" |
Hans-G?nter@23516 | 6 SHORT_DESC="Scientific computing library for the Python." |
claudinei@3411 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15360 | 8 LICENSE="BSD" |
Hans-G?nter@23516 | 9 WEB_SITE="https://pypi.org/project/numpy/" |
Hans-G?nter@23516 | 10 |
Hans-G?nter@23516 | 11 SOURCE="numpy" |
claudinei@3411 | 12 TARBALL="$SOURCE-$VERSION.tar.gz" |
Hans-G?nter@23516 | 13 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz" |
pascal@15360 | 14 |
claudinei@3411 | 15 DEPENDS="python" |
Hans-G?nter@23516 | 16 BUILD_DEPENDS="python python-cython python-dev python-setuptools" |
claudinei@3411 | 17 |
pascal@24055 | 18 current_version() |
pascal@24055 | 19 { |
pascal@24055 | 20 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 21 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 22 } |
pascal@24055 | 23 |
claudinei@3411 | 24 # Rules to configure and make the package. |
claudinei@3411 | 25 compile_rules() |
claudinei@3411 | 26 { |
pascal@15360 | 27 { |
claudinei@3411 | 28 python setup.py build && |
pascal@15360 | 29 python setup.py install --root=$DESTDIR |
pascal@15360 | 30 } 2>&1 | grep -Ev '(conftest.c:|configtest.c:)' |
claudinei@3411 | 31 } |
claudinei@3411 | 32 |
claudinei@3411 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
claudinei@3411 | 34 genpkg_rules() |
claudinei@3411 | 35 { |
Hans-G?nter@23516 | 36 cp -a $install/usr $fs |
claudinei@3411 | 37 } |
claudinei@3411 | 38 |
claudinei@3411 | 39 # Remove old package. |
claudinei@3411 | 40 post_install() |
claudinei@3411 | 41 { |
pascal@18730 | 42 [ ! -d "$1/var/lib/tazpkg/installed/numpy" ] || |
pascal@18730 | 43 rm -rf "$1/var/lib/tazpkg/installed/numpy" |
pascal@6596 | 44 } |