wok-6.x annotate micropython/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 | b942370ae50f |
children |
rev | line source |
---|---|
al@16736 | 1 # SliTaz package receipt. |
al@16736 | 2 |
al@16736 | 3 PACKAGE="micropython" |
al@16736 | 4 VERSION="1.0.1" |
al@16736 | 5 CATEGORY="development" |
al@16736 | 6 SHORT_DESC="The Micro Python project" |
al@16736 | 7 MAINTAINER="al.bobylev@gmail.com" |
al@16736 | 8 LICENSE="MIT" |
al@16736 | 9 WEB_SITE="http://micropython.org/" |
al@16736 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@16736 | 11 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/v$VERSION.tar.gz" |
al@16736 | 12 |
al@16736 | 13 DEPENDS="readline libffi" |
pascal@17732 | 14 BUILD_DEPENDS="wget git readline-dev libffi-dev pkg-config" |
al@16736 | 15 |
pascal@24055 | 16 current_version() |
pascal@24055 | 17 { |
pascal@24055 | 18 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 19 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 20 } |
pascal@24055 | 21 |
al@16736 | 22 # Rules to configure and make the package. |
al@16736 | 23 compile_rules() |
al@16736 | 24 { |
al@16736 | 25 sed -i 's|bash|sh|' $src/py/py-version.sh |
pascal@17732 | 26 sed -i 's|-lreadline|& -lncurses -ldl -lffi|' $src/unix/Makefile |
al@16736 | 27 |
al@16736 | 28 cd unix |
pascal@17732 | 29 make -j 1 |
al@16736 | 30 } |
al@16736 | 31 |
al@16736 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@16736 | 33 genpkg_rules() |
al@16736 | 34 { |
al@16736 | 35 mkdir -p $fs/usr/bin |
al@16736 | 36 cp -a $src/unix/micropython $fs/usr/bin |
al@16736 | 37 } |