slackbuilds_ponce/games/xmoto/xmoto.SlackBuild

88 lines
2.2 KiB
Text
Raw Normal View History

2010-05-11 14:28:24 +02:00
#!/bin/sh
## Written by hollywoodb (hollywoodb@fastmail.fm)
## Feel free to use, modify, redistribute this script.
## If you make changes please modify the "Written by"
## so that I don't recieve emails about a script I
## did not write. Thanks.
# Modified by the SlackBuilds.org project
2010-05-12 17:39:42 +02:00
# Updated by Alex Word <alex_word86@yahoo.com>
2010-05-11 14:28:24 +02:00
2010-05-12 17:39:42 +02:00
PRGNAM=xmoto
2010-05-13 00:27:36 +02:00
VERSION=0.5.2
2010-05-11 14:28:24 +02:00
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
2010-05-12 17:39:42 +02:00
2010-05-11 19:44:44 +02:00
CWD=$(pwd)
2010-05-11 14:28:24 +02:00
TMP=${TMP:-/tmp/SBo}
2010-05-12 17:39:42 +02:00
PKG=${PKG:-$TMP/package-$PRGNAM}
2010-05-11 14:28:24 +02:00
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
2010-05-13 00:27:36 +02:00
LIBDIRSUFFIX=""
2010-05-11 14:28:24 +02:00
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
2010-05-13 00:27:36 +02:00
LIBDIRSUFFIX=""
2010-05-12 17:39:42 +02:00
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
2010-05-13 00:27:36 +02:00
LIBDIRSUFFIX="64"
2010-05-11 14:28:24 +02:00
fi
2010-05-13 00:27:36 +02:00
set -e
2010-05-12 17:39:42 +02:00
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
patch -p1 < $CWD/patches/sqlite3.diff
patch -p1 < $CWD/patches/localedir.diff
2010-05-13 00:27:36 +02:00
patch -p0 < $CWD/patches/xmoto-amd64_gcc441.diff
2010-05-12 17:39:42 +02:00
2010-05-11 14:28:24 +02:00
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
2010-05-12 17:39:42 +02:00
--prefix=/usr \
2010-05-13 00:27:36 +02:00
--libdir=/usr/lib${LIBDIRSUFFIX} \
2010-05-12 17:39:42 +02:00
--localstatedir=/var \
--mandir=/usr/man \
--localedir=/usr/share/locale \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--with-localesdir=/usr/share/locale \
--disable-dependency-tracking \
--enable-threads=posix \
--with-enable-zoom=1 \
--with-renderer-sdlGfx=0 \
--with-renderer-openGl=1 \
--with-x \
--build=$ARCH-slackware-linux
2010-05-11 14:28:24 +02:00
make
make install-strip DESTDIR=$PKG
mkdir -p $PKG/usr/share/{pixmaps,applications}
2010-05-12 17:39:42 +02:00
install -m 0644 extra/$PRGNAM.xpm $PKG/usr/share/pixmaps/
2010-05-13 00:27:36 +02:00
install -m 0644 extra/$PRGNAM.desktop $PKG/usr/share/applications/
2010-05-11 14:28:24 +02:00
2010-05-12 17:39:42 +02:00
gzip -9 $PKG/usr/man/man?/*.?
2010-05-11 14:28:24 +02:00
2010-05-12 17:39:42 +02:00
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
2010-05-13 00:27:36 +02:00
cp -a \
ABOUT-NLS AUTHORS COPYING INSTALL NEWS README TODO ChangeLog \
$PKG/usr/doc/$PRGNAM-$VERSION
2010-05-12 17:39:42 +02:00
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
2010-05-11 14:28:24 +02:00
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
2010-05-13 00:27:36 +02:00
/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}