wok-current annotate astromenace/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 a4a9b130531d
children bf28cc07ebf1
rev   line source
hackdorte@19296 1 # SliTaz package receipt.
hackdorte@19296 2
hackdorte@19296 3 PACKAGE="astromenace"
Hans-G?nter@22508 4 VERSION="1.4.1"
hackdorte@19296 5 CATEGORY="games"
Hans-G?nter@22508 6 TAGS="arcade game shooting space"
hackdorte@19296 7 SHORT_DESC="Hardcore 3D space shooter with spaceship upgrade possibilities."
hackdorte@20008 8 MAINTAINER="hackdorte@yandex.com"
hackdorte@20008 9 LICENSE="GPLv3"
Hans-G?nter@22508 10 WEB_SITE="https://viewizard.com/"
hackdorte@19296 11
Hans-G?nter@22508 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@22508 13 WGET_URL="https://github.com/viewizard/$PACKAGE/archive/v$VERSION.tar.gz"
hackdorte@19296 14
Hans-G?nter@22508 15 DEPENDS="freealut freetype gcc83-lib-base libogg libglu-mesa libsdl2
Hans-G?nter@22508 16 libvorbis openal xorg-libXinerama"
Hans-G?nter@22508 17 BUILD_DEPENDS="cmake freealut-dev freetype-dev gcc83 libglu-mesa-dev
Hans-G?nter@22510 18 libogg-dev libsdl2-dev libvorbis-dev mesa-dev openal-dev
pascal@23596 19 xorg-libXinerama-dev libatomic"
hackdorte@19296 20
pascal@24055 21 current_version()
pascal@24055 22 {
pascal@24055 23 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
pascal@24055 24 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
pascal@24055 25 }
pascal@24055 26
hackdorte@19296 27 # Rules to configure and make the package.
hackdorte@19296 28 compile_rules()
hackdorte@19296 29 {
Hans-G?nter@22508 30 export CC=gcc-83
Hans-G?nter@22508 31 export CXX=g++-83
hackdorte@19296 32
Hans-G?nter@22508 33 cmake . \
Hans-G?nter@22508 34 -DCMAKE_BUILD_TYPE=Release &&
Hans-G?nter@22508 35 make
Hans-G?nter@22508 36 # ./AstroMenace --pack --rawdata=./RAW_VFS_DATA
hackdorte@19296 37 }
hackdorte@19296 38
hackdorte@19296 39 # Rules to gen a SliTaz package suitable for Tazpkg.
hackdorte@19296 40 genpkg_rules()
hackdorte@19296 41 {
Hans-G?nter@22508 42 GAME="astromenace"
Hans-G?nter@22508 43 GAME_DIR="usr/games/$GAME"
hackdorte@19296 44
Hans-G?nter@22508 45 mkdir -p $install/$GAME_DIR
Hans-G?nter@22508 46 chmod +x $src/$GAME
hackdorte@19296 47
Hans-G?nter@22508 48 cp -a $src/$GAME $install/$GAME_DIR
Hans-G?nter@22508 49 cp -a $src/share/astromenace_64.png $install/$GAME_DIR
Hans-G?nter@22508 50 cp -a $src/share/astromenace_128.png $install/$GAME_DIR
Hans-G?nter@22508 51 cp -a $src/CHANGELOG.md $install/$GAME_DIR
Hans-G?nter@22508 52 cp -a $src/gamedata.vfs $install/$GAME_DIR
Hans-G?nter@22508 53 # cp -a $src/gpl-3.0.txt $install/$GAME_DIR
hackdorte@19296 54
Hans-G?nter@22508 55 mkdir -p $install/usr/share/pixmaps
Hans-G?nter@22508 56 cp -a $src/share/astromenace_64.png $install/usr/share/pixmaps/astromenace.png
hackdorte@19296 57
Hans-G?nter@22508 58 mkdir -p $install/usr/share/applications
hackdorte@19296 59 cat > $install/usr/share/applications/astromenace.desktop << EOT
hackdorte@19296 60 [Desktop Entry]
hackdorte@19296 61 Type=Application
hackdorte@19296 62 Name=$GAME
hackdorte@19296 63 Exec=/$GAME_DIR/$GAME
hackdorte@19296 64 Icon=$PACKAGE
hackdorte@19296 65 Terminal=false
hackdorte@19296 66 X-MultipleArgs=false
hackdorte@19296 67 StartupNotify=false
hackdorte@19296 68 Categories=Game;ActionGame;
hackdorte@19296 69
hackdorte@19296 70 EOT
hackdorte@19296 71
Hans-G?nter@22508 72 cp -a $install/* $fs
hackdorte@19296 73
hackdorte@19296 74 }