summaryrefslogtreecommitdiffstats
path: root/frozen-bubble/build/frozen-bubble.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'frozen-bubble/build/frozen-bubble.SlackBuild')
-rwxr-xr-xfrozen-bubble/build/frozen-bubble.SlackBuild115
1 files changed, 115 insertions, 0 deletions
diff --git a/frozen-bubble/build/frozen-bubble.SlackBuild b/frozen-bubble/build/frozen-bubble.SlackBuild
new file mode 100755
index 00000000..5cc68864
--- /dev/null
+++ b/frozen-bubble/build/frozen-bubble.SlackBuild
@@ -0,0 +1,115 @@
+#!/bin/sh
+# $Id$
+# Copyright (c) 2006 Eric Hameleers <alien@slackware.com>
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: Frozen Bubble
+# Descr: Colorful Game
+# URL: http://www.frozen-bubble.org
+# Needs: SDL_perl >= 1.19.2
+# Changelog:
+# 1.0.0-1: 09/oct/2006 by Eric Hameleers <alien@slackware.com>
+# * Initial build.
+#
+# Run 'sh SlackBuild --cleanup' to build a Slackware package.
+# The package (.tgz) plus descriptive .txt file are created in /tmp .
+# Install using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+CWD=`pwd`
+
+PRGNAM=frozen-bubble
+VERSION=1.0.0
+ARCH=${ARCH:-i486}
+BUILD=1
+
+if ["$TMP" = ""]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-$PRGNAM
+
+DOCS="AUTHORS CHANGES COPYING INSTALL README $CWD/$PRGNAM.SlackBuild"
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP
+fi
+if [ ! -d $PKG ]; then
+ mkdir -p $PKG
+fi
+
+echo "++"
+echo "|| Building $PRGNAM-$VERSION"
+echo "++"
+
+cd $TMP
+tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
+
+cd $PRGNAM-$VERSION
+# Make it work with SDL_perl 1.19 as well as 2.x
+patch -p0 < $CWD/${PRGNAM}-makefile.patch 2>&1 | tee $TMP/patch-$PRGNAM.log
+patch -p0 < $CWD/${PRGNAM}-sdl_perl.patch 2>&1 | tee -a $TMP/patch-$PRGNAM.log
+patch -p0 < $CWD/${PRGNAM}-editor-sdl_perl.patch 2>&1 | tee -a $TMP/patch-$PRGNAM.log
+sed -i -e 's#INSTALLDIRS=.*#PREFIX=${PKG}/usr#' c_stuff/Makefile \
+ 2>&1 | tee -a $TMP/patch-$PRGNAM.log
+
+chown -R root:root .
+
+make \
+ PREFIX=/usr \
+ BINDIR=/usr/games \
+ DATADIR=/usr/share/games \
+ MANDIR=/usr/man \
+ 2>&1 | tee $TMP/make-$PRGNAM.log
+
+mkdir -p $PKG/usr/{games,man,share}
+make install \
+ PREFIX=$PKG/usr \
+ BINDIR=$PKG/usr/games \
+ DATADIR=$PKG/usr/share/games \
+ MANDIR=$PKG/usr/man \
+ 2>&1 | tee $TMP/install-$PRGNAM.log
+
+# Remove 'special' files
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" \
+ | xargs rm -f
+# No empty directories
+find $PKG -type d -depth -exec rmdir {} \;
+
+mkdir -p $PKG/usr/share/applications
+cp -a $CWD/${PRGNAM}.desktop $PKG/usr/share/applications/
+
+mkdir -p $PKG/usr/share/icons/hicolor/16x16
+cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-16x16.png $PKG/usr/share/icons/hicolor/16x16/${PRGNAM}.png
+
+mkdir -p $PKG/usr/share/icons/hicolor/32x32
+cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-32x32.png $PKG/usr/share/icons/hicolor/32x32/${PRGNAM}.png
+
+mkdir -p $PKG/usr/share/icons/hicolor/48x48
+cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-48x48.png $PKG/usr/share/icons/hicolor/48x48/${PRGNAM}.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION/
+chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+[ -d $PKG/usr/man ] && \
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+
+chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
+
+cd $PKG
+makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz
+(
+ cd $TMP && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5
+)
+
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/$PRGNAM-$VERSION
+ rm -rf $PKG
+fi