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