wok annotate nim/receipt @ rev 24427
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 12 11:42:56 2022 +0000 (2022-02-12) |
parents | fc660476a31b |
children | b410cca81eae |
rev | line source |
---|---|
Hans-G?nter@23243 | 1 # SliTaz package receipt. |
Hans-G?nter@23243 | 2 |
Hans-G?nter@23243 | 3 PACKAGE="nim" |
Hans-G?nter@23243 | 4 VERSION="0.19.6" |
Hans-G?nter@23243 | 5 CATEGORY="development" |
Hans-G?nter@23243 | 6 SHORT_DESC="The Nim programming language." |
Hans-G?nter@23243 | 7 MAINTAINER="maintainer@slitaz.org" |
Hans-G?nter@23243 | 8 LICENSE="MIT" |
Hans-G?nter@23243 | 9 WEB_SITE="https://www.nim-lang.org/" |
Hans-G?nter@23243 | 10 |
Hans-G?nter@23243 | 11 TARBALL="$PACKAGE-$VERSION.tar.xz" |
Hans-G?nter@23243 | 12 WGET_URL="${WEB_SITE}download/$TARBALL" |
Hans-G?nter@23243 | 13 |
Hans-G?nter@23243 | 14 DEPENDS="gcc glibc-base readline" |
Hans-G?nter@23243 | 15 BUILD_DEPENDS="gcc glibc-dev readline-dev" |
Hans-G?nter@23243 | 16 |
pascal@24427 | 17 # What is the latest version available today? |
pascal@24427 | 18 current_version() |
pascal@24427 | 19 { |
pascal@24427 | 20 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24427 | 21 sed '/released/!d;s|.*Version ||;s| released.*||;q' |
pascal@24427 | 22 } |
pascal@24427 | 23 |
Hans-G?nter@23243 | 24 # Rules to configure and make the package. |
Hans-G?nter@23243 | 25 compile_rules() |
Hans-G?nter@23243 | 26 { |
Hans-G?nter@23243 | 27 sed -i "s/uname -m/echo $ARCH/" build.sh |
Hans-G?nter@23243 | 28 chmod +x build.sh |
Hans-G?nter@23243 | 29 chmod +x install.sh |
Hans-G?nter@23243 | 30 |
Hans-G?nter@23243 | 31 ./build.sh && |
Hans-G?nter@23243 | 32 ./bin/nim c -d:release koch && |
Hans-G?nter@23243 | 33 ./koch boot -d:release && |
Hans-G?nter@23243 | 34 ./install.sh $DESTDIR |
Hans-G?nter@23243 | 35 } |
Hans-G?nter@23243 | 36 |
Hans-G?nter@23243 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
Hans-G?nter@23243 | 38 genpkg_rules() |
Hans-G?nter@23243 | 39 { |
Hans-G?nter@23243 | 40 mkdir -p $fs/usr/share/nim |
Hans-G?nter@23243 | 41 mkdir -p $fs/usr/lib |
Hans-G?nter@23243 | 42 |
Hans-G?nter@23243 | 43 cp -a $install/nim/bin $fs/usr |
Hans-G?nter@23243 | 44 cp -a $install/nim/config $fs/etc |
Hans-G?nter@23243 | 45 cp -a $install/nim/lib $fs/usr/lib/nim |
Hans-G?nter@23243 | 46 cp -a $install/nim/doc $fs/usr/share/nim |
Hans-G?nter@23243 | 47 } |