wok-6.x annotate gsim51/receipt @ rev 24403

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 08 18:20:23 2022 +0000 (2022-02-08)
parents 3b3749beba6d
children 7dd01dedad38
rev   line source
pascal@15827 1 # SliTaz package receipt.
pascal@15827 2
pascal@15827 3 PACKAGE="gsim51"
pascal@15827 4 VERSION="1.1"
pascal@15827 5 CATEGORY="development"
pascal@15827 6 SHORT_DESC="Text based simulator for the 8051 microcontroller."
pascal@15827 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15827 8 LICENSE="GPL2"
pascal@15827 9 SOURCE="gSim51"
pascal@15827 10 TARBALL="${SOURCE}v$VERSION.tar.gz"
pascal@15827 11 WEB_SITE="http://$PACKAGE.sourceforge.net/"
pascal@15827 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@18360 13 TAGS="8051"
pascal@15827 14
pascal@15827 15 DEPENDS="ncurses"
pascal@15830 16 BUILD_DEPENDS="ncurses-dev"
pascal@15827 17
pascal@24403 18 # What is the latest version available today?
pascal@24403 19 current_version()
pascal@24403 20 {
pascal@24403 21 wget -O - https://sourceforge.net/projects/gsim51/files/gsim51/ 2>/dev/null | \
pascal@24403 22 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24403 23 sed '/scope="row/!d;s|.*/gSim51v||;s|.tar.*||;q'
pascal@24403 24 }
pascal@24403 25
pascal@15827 26 # Rules to configure and make the package.
pascal@15827 27 compile_rules()
pascal@15827 28 {
pascal@15827 29 cd $src/src
pascal@17673 30 sed -i 's/-lncurses/& -ltinfo/' Makefile
pascal@21692 31 sed -i 's|sim51.hlp|/usr/share/gsim51/&|' *funcs3.c
pascal@15827 32 make
pascal@15827 33 }
pascal@15827 34
pascal@15827 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@15827 36 genpkg_rules()
pascal@15827 37 {
pascal@21692 38 mkdir -p $fs/usr/bin $fs/usr/share/gsim51 $fs/usr/share/applications
pascal@21692 39 mkdir -p $install/usr/share
pascal@21692 40 cp -a $src/docs $install/usr/share/doc
pascal@21692 41 cp -a $src/bin/gSim51 $fs/usr/bin
pascal@21692 42 cp -a $src/bin/sim51.hlp $fs/usr/share/gsim51/sim51.hlp
pascal@21692 43 cat > $fs/usr/share/applications/gsim51.desktop <<EOT
pascal@21692 44 [Desktop Entry]
pascal@21692 45 Type=Application
pascal@21692 46 Name=8051 simulator
pascal@21692 47 Name[fr]=Simulateur de 8051
pascal@21692 48 Exec=terminal -e gSim51
pascal@21692 49 Icon=computer
pascal@21692 50 Categories=ConsoleOnly;Utility;Development;
pascal@21692 51 EOT
pascal@15827 52 }