SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "warmux"

# SliTaz package receipt.

PACKAGE="warmux"
GITHASH="01f2d0071011bae5785d7a8d4502db4370c7de5a" # 20191201
VERSION="11.04.1"
CATEGORY="games"
SHORT_DESC="Warmux game"
MAINTAINER="slaxemulator@gmail.com"
LICENSE="GPL2"
WEB_SITE="https://github.com/fluxer/warmux"
TARBALL="$PACKAGE-$VERSION.zip"
WGET_URL="https://github.com/fluxer/warmux/archive/$GITHASH.zip"
PROVIDE="wormux"
SUGGESTED="warmux-music"

DEPENDS="libsdl-gfx libsdl-image libsdl-mixer libsdl-net libsdl-ttf \
curl freetype libxml2 libxml++ gcc-lib-base gettext-base"
BUILD_DEPENDS="libsdl-dev libsdl-gfx-dev libsdl-image-dev libsdl-mixer-dev \
libsdl-net-dev libsdl-ttf-dev curl-dev freetype-dev libxml2-dev libxml++-dev \
automake pkg-config"

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE/commits/master 2>/dev/null | \
    sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y -d
}

# Rules to configure and make the package.
compile_rules()
{
    ./autogen.sh

    sed -i 's/test -z "$(pkgdatadir)"/test -d "$(pkgdatadir)"/' data/Makefile.in
    sed -i 's|if USE_X11|if SKIP_USE_X11|' src/tool/copynpaste.cpp
    sed -i "s|test -d \"\\\$(pkgdatadir|test -d \"\\\$(DESTDIR)\\\$(pkgdatadir|" data/Makefile*
    sed -i 's|SDLNet_Read32(buffer|SDLNet_Read32(const_cast<char*>(buffer)|' \
        lib/warmux/action/action.cpp
    mkdir -p $DESTDIR/usr/share/warmux

    ./configure \
        --bindir=/usr/games \
        --with-font-path=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf \
        $CONFIGURE_ARGS &&
    make &&
    make -j1 install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share
    cp -a $install/usr/games $fs/usr
    cp -a $install/usr/share/pixmaps $fs/usr/share
    cp -a $install/usr/share/warmux $fs/usr/share

    # Remove unecessary files
    rm -rf $fs/usr/share/warmux/font
    rm -rf $fs/usr/share/warmux/music
    #rm -rf $fs/usr/share/warmux/sound
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)