diff options
Diffstat (limited to 'games/openttd/openttd.SlackBuild')
-rw-r--r-- | games/openttd/openttd.SlackBuild | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild index 92fea8107652e..6fffcd13c078b 100644 --- a/games/openttd/openttd.SlackBuild +++ b/games/openttd/openttd.SlackBuild @@ -23,16 +23,18 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=openttd -VERSION=${VERSION:-1.1.2} +VERSION=${VERSION:-1.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: +OPENGFX=0.4.4 +OPENSFX=0.2.3 +OPENMSX=0.3.1 + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -63,20 +65,19 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION-source.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION-source.tar.xz +cd $PRGNAM-$VERSION if [ "$OPENDATA" == "YES" ]; then - rm -rf opengfx-0.3.5 opensfx-0.2.3 openmsx-0.3.1 - unzip -o $CWD/opengfx-0.3.5-all.zip - unzip -o $CWD/opensfx-0.2.3-all.zip - unzip -o $CWD/openmsx-0.3.1-all.zip + unzip -o $CWD/opengfx-$OPENGFX-all.zip + unzip -o $CWD/opensfx-$OPENSFX-all.zip + unzip -o $CWD/openmsx-$OPENMSX-all.zip fi -cd $PRGNAM-$VERSION chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -99,6 +100,20 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DEST_DIR=$PKG +# Copy opengfx, opensfx, and openmsx files if OPENDATA=YES +if [ "$OPENDATA" == "YES" ]; then + # First rename some text files to avoid name collisions when copied + rename .txt -opengfx.txt opengfx-$OPENGFX/* + rename .txt -opensfx.txt opensfx-$OPENSFX/* + rename .txt -openmsx.txt openmsx-$OPENMSX/* + # Now copy the data files + mkdir $PKG/usr/share/games/openttd/data/ + mkdir $PKG/usr/share/games/openttd/gm/ + cp -a opengfx-$OPENGFX/* $PKG/usr/share/games/openttd/data/ + cp -a opensfx-$OPENSFX/* $PKG/usr/share/games/openttd/data/ + cp -a openmsx-$OPENMSX/* $PKG/usr/share/games/openttd/gm/ +fi + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -110,21 +125,6 @@ cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION rm -f $PKG/usr/doc/$PRGNAM-$VERSION/openttd.6 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Copy opengfx, opensfx, and openmsx files if OPENDATA=YES -if [ "$OPENDATA" == "YES" ]; then - # First rename some text files to avoid name collisions when copied - rename .txt -opengfx.txt $TMP/opengfx-0.3.5/* - rename .txt -opensfx.txt $TMP/opensfx-0.2.3/* - rename .txt -openmsx.txt $TMP/openmsx-0.3.1/* - # Now copy the data files - cp -a $TMP/opengfx-0.3.5/* $PKG/usr/share/games/openttd/data/ - cp -a $TMP/opensfx-0.2.3/* $PKG/usr/share/games/openttd/data/ - cp -a $TMP/openmsx-0.3.1/* $PKG/usr/share/games/openttd/gm/ - # These perms are needed - chmod 0644 $PKG/usr/share/games/openttd/data/* - chmod 0644 $PKG/usr/share/games/openttd/gm/* -fi - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |