Browse Source

xap/newton-adventure: Added newton-adventure-1.10.

slackware-14.2
Damien Goutte-Gattat 9 years ago
parent
commit
782f7f3d07
  1. 4
      xap/newton-adventure/doinst.sh
  2. 110
      xap/newton-adventure/newton-adventure.SlackBuild
  3. 10
      xap/newton-adventure/newton-adventure.desktop
  4. 2
      xap/newton-adventure/newton-adventure.sh
  5. 1
      xap/newton-adventure/newton_adventure_1.10_sources.zip.sha1
  6. 12
      xap/newton-adventure/slack-desc

4
xap/newton-adventure/doinst.sh

@ -0,0 +1,4 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi

110
xap/newton-adventure/newton-adventure.SlackBuild

@ -0,0 +1,110 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2013 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest newton_adventure sourcecode is available at:
# <http://devnewton.bci.im/projects/newton_adventure/doc/trunk/www/index.wiki>.
#
# Depends: d/apache-maven
# Source package infos
NAMESRC=${NAMESRC:-newton_adventure}
VERSION=${VERSION:-1.10}
ARCHIVE=${ARCHIVE:-${NAMESRC}_${VERSION}_sources.zip}
WGET=${WGET:-http://devnewton.bci.im/projects/newton_adventure/doc/trunk/www/downloads/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-newton-adventure}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=${NAMESRC}_${VERSION}
# Compile
cd $TMP
echo "Building $ARCHIVE..."
unzip $CWD/$ARCHIVE
cd $NAME
mvn install -Prpm
# Install
install -D -m 644 target/$NAMESRC-$VERSION.jar \
$PKG/usr/lib/$NAMEPKG/$NAMEPKG-$VERSION.jar
mkdir $PKG/usr/lib/$NAMEPKG/natives
install -D -m 644 target/natives/*.so $PKG/usr/lib/$NAMEPKG/natives/
cp -r data $PKG/usr/lib/$NAMEPKG/data
find $PKG/usr/lib/$NAMEPKG/data -type d -exec chmod 755 {} \;
find $PKG/usr/lib/$NAMEPKG/data -type f -exec chmod 644 {} \;
install -D -m 755 $CWD/newton-adventure.sh $PKG/usr/bin/newton-adventure
install -D -m 644 target/classes/icon.png \
$PKG/usr/share/pixmaps/newton-adventure.png
install -D -m 644 $CWD/newton-adventure.desktop \
$PKG/usr/share/applications/newton-adventure.desktop
install -D -m 644 README_* $PKG/usr/doc/$NAMEPKG-$VERSION/README
mkdir $PKG/usr/doc/$NAMEPKG-$VERSION/licenses
install -m 644 licences/*.txt $PKG/usr/doc/$NAMEPKG-$VERSION/licenses/
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

10
xap/newton-adventure/newton-adventure.desktop

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Newton Adventure
Version=1.10
Comment=A 2D platform game
Exec=newton-adventure
Icon=/usr/share/pixmaps/newton-adventure.png
Terminal=false
Type=Application
Terminal=false
Categories=Game;

2
xap/newton-adventure/newton-adventure.sh

@ -0,0 +1,2 @@
#!/bin/sh
exec java -jar /usr/lib/newton-adventure/newton-adventure-1.10.jar

1
xap/newton-adventure/newton_adventure_1.10_sources.zip.sha1

@ -0,0 +1 @@
635a0de13dd26ff99deed23678a80fe28923aca1 newton_adventure_1.10_sources.zip

12
xap/newton-adventure/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler---------------------------------------------|
newton-adventure: newton-adventure (2D platform game)
newton-adventure:
newton-adventure: Newton Adventure is a 2D platform game where player can
newton-adventure: rotate level and change gravity.
newton-adventure:
newton-adventure:
newton-adventure:
newton-adventure:
newton-adventure:
newton-adventure:
newton-adventure:
Loading…
Cancel
Save