stretchedthin avatar stretchedthin committed 29ad5a3

gtklife gtodo2 joyutils kapow maelstrom mednafen

Comments (0)

Files changed (19)

var/vabs/gtklife/src/gtklife.SlackBuild

 
 NAME="gtklife"            #Enter package Name!
 VERSION=${VERSION:-"5.1"}      #Enter package Version!
-VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
+VER=$(echo ${VERSION}|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
-LINK=${LINK:-"http://ironphoenix.org/tril/$NAME/$NAME-$VERSION.tar.gz"}  #Enter URL for package here!
+LINK=${LINK:-"http://ironphoenix.org/tril/${NAME}//${NAME}-${VERSION}.tar.gz"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
 LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
 ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
 EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
-MAKEDEPENDS=${MAKEDEPENDS:-""} #Add deps needed TO BUILD this package here.
+MAKEDEPENDS=${MAKEDEPENDS:-"atk cairo gdk-pixbuf2 glib2 pango"} #Add deps needed TO BUILD this package here.
 #----------------------------------------------------------------------------
 
 # DO NOT EXECUTE if NORUN is set to 1
 cd $CWD
 mkdir -p $RELEASEDIR/tmp
 TMP=$RELEASEDIR/tmp
-PKG=$TMP/package-$NAME
+PKG=$TMP/package-${NAME}
 #--------------------------------------------
 
 
 
 rm -rf $PKG
 cd $TMP
-rm -rf $NAME-$VERSION
+rm -rf ${NAME}-${VERSION}
 
 
 #EXTRACT SOURCES
 #-----------------------------------------------------
 echo "Extracting source..."
-tar xvf $CWD/$NAME-$VERSION.tar.* || exit 1
+tar xvf $CWD/${NAME}-${VERSION}.tar.gz
 #this moves whatever was extracted to the std dirname we are expecting
-mv * $NAME-$VERSION &> /dev/null 2>&1
+mv * ${NAME}-${VERSION} &> /dev/null 2>&1
 mkdir -p $PKG
 #-----------------------------------------------------
 
 
-cd $TMP/$NAME-$VERSION
+cd $TMP/${NAME}-${VERSION}
 
 
 #PATCHES
 #-----------------------------------------------------
 for i in $CWD/patches/*;do
   patch -p1 <$i
-  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
-  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
+  mkdir -p $PKG/usr/doc/${NAME}-${VERSION}/patches/
+  cp $i $PKG/usr/doc/${NAME}-${VERSION}/patches/
 done
 #-----------------------------------------------------
  
 echo "Configuring source..."
 ./configure --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
+  --with-gtk2 \
+  --with-docdir=$PKG/usr/share/doc/${NAME} \
   --infodir=/usr/info \
   --sysconfdir=/etc \
   --localstatedir=/var \
   --program-suffix="" \
   --build=$CONFIGURE_TRIPLET \
   $CONFIG_OPTIONS || exit 1
-
-make || exit 1
-
-make install DESTDIR=$PKG || exit 1
+LDFLAGS="-lX11 -lm" make
+make prefix=$PKG/usr install
 
 
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
 #######################################################################
+if test -f $CWD/$NAME.png; then
 mkdir -p $PKG/usr/share/pixmaps
-cat icon_48x48.png > $PKG/usr/share/pixmaps/$NAME.png
+cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
+
+
 ## Now test for desktop file
 mkdir -p $PKG/usr/share/applications
-if test -f $CWD/${NAME}.desktop; then
-cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
-fi
+cat > $PKG/usr/share/applications/$NAME.desktop << EOF
+[Desktop Entry]
+Type=Application
+Version=1.0
+Encoding=UTF-8
+Name=$NAME
+Comment=$NAME
+Icon=$NAME.png
+Exec=$NAME
+Terminal=false
+StartupNotify=true
+Categories=Application;Game;
+EOF
 
 
 
-mkdir -p $PKG/usr/doc/$NAME-$VERSION
+mkdir -p $PKG/usr/doc/${NAME}-${VERSION}
 cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
-$PKG/usr/doc/$NAME-$VERSION
-cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
+$PKG/usr/doc/${NAME}-${VERSION}
+cat $CWD/${NAME}.SlackBuild > $PKG/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild
 
 #----------------------------------------------------------------------
 
 # Finish off gconf block
 echo "fi" >> $PKG/install/doinst.sh
 fi
-cat $CWD/doinst.sh >> $PKG/install/doinst.sh
+cat $CWD/*install >> $PKG/install/doinst.sh
 
 
 #if there is a slack-desc in src dir use it
 else
 # This creates the white space in front of "handy-ruler" in slack-desc below.
 
-LENGTH=$(expr length "$NAME")
+LENGTH=$(expr length "${NAME}")
 SPACES=0
 SHIM=""
 until [ "$SPACES" = "$LENGTH" ]; do
 
 # Fill in the package summary between the () below.
 # Then package the description, License, Author and Website.
-# There may be no more then 11 $NAME: lines in a valid slack-desc.
+# There may be no more then 11 ${NAME}: lines in a valid slack-desc.
 
 cat > $RELEASEDIR/slack-desc << EOF
 # HOW TO EDIT THIS FILE:
 # customary to leave one space after the ':'.
 
 $SHIM|-----handy-ruler------------------------------------------------------|
-$NAME: $NAME ()
-$NAME:
-$NAME: 
-$NAME: 
-$NAME: 
-$NAME: 
-$NAME:
-$NAME:
-$NAME: License: GPL
-$NAME: Authors: 
-$NAME: Website: 
-
+$NAME: $NAME (Fast, featureful, open-source Conway's Life program for *nix)
+${NAME}:
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}:
+${NAME}:
+${NAME}: license="GPL"
+${NAME}: Authors: See Website
+${NAME}: Website: 
+$NAME: Website: http://ironphoenix.org/tril/gtklife/
 EOF
 fi
 cat >> $RELEASEDIR/slack-desc << EOF
 #--------------------------------------------------------------
 echo "Finding dependencies..."
 ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
-echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.txz"
-makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.txz
+echo "Creating package ${NAME}-${VERSION}-$ARCH-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/${NAME}-${VERSION}-$ARCH-$BUILD.txz
 
 cd $CWD
 echo "Cleaning up temp files..." && rm -rf $TMP
Add a comment to this file

var/vabs/gtklife/src/gtklife.png

Added
New image

var/vabs/gtodo2/src/gtodo2.SlackBuild

+#!/usr/bin/bash
+# This script assumes it will be launched within "/NAME/VERSION/src" dir.
+# With all sources in "src" Your Vector Linux .txz package, slack-desc,
+# and slack-required will be found in "VERSION" dir. The extraction and
+# build will be in a temp dir created in "NAME" dir, and then removed on exit.
+# Comment out second to last line to keep this dir intact.
+#
+# This Template was compiled from the contributions of many users of the Vector
+# Linux forum at http://forum.vectorlinux.com and from tidbits collected 
+# from all over the internet. 
+#
+# Generated by sbbuilder-0.4.15, written by Rodrigo Bistolfi 
+# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
+#
+# Please put your name below if you add some original scripting lines.
+# AUTHORS = 
+
+NAME="gtodo2"            #Enter package Name!
+VERSION=${VERSION:-"0.19.0"}      #Enter package Version!
+VER=$(echo ${VERSION}|sed 's/-/_/') #this fixes - in version
+VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
+LINK=${LINK:-"http://download.sarine.nl/${NAME}/${NAME}-${VERSION}-beta.tar.gz"}  #Enter URL for package here!
+
+
+#SYSTEM VARIABLES
+#----------------------------------------------------------------------------
+BUILDNUM=${BUILDNUM:-"1"}
+VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
+BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
+ARCH=${ARCH:-"$(uname -m)"}
+CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
+LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
+ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
+EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"GConf ORBit2 atk gdk-pixbuf2 glib2 libogg libvorbis libcanberra openssl popt"} #Add deps needed TO BUILD this package here.
+#----------------------------------------------------------------------------
+
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
+#SETUP PACKAGING ENVIRONMENT
+#--------------------------------------------
+CWD=$(pwd)
+cd ../
+RELEASEDIR=$(pwd)
+cd $CWD
+mkdir -p $RELEASEDIR/tmp
+TMP=$RELEASEDIR/tmp
+PKG=$TMP/package-${NAME}
+#--------------------------------------------
+
+
+
+if [ $UID != 0 ]; then
+   echo "You are not authorized to run this script. Please login as root"
+   exit 1
+fi
+
+if [ ! -x /usr/bin/requiredbuilder ]; then
+   echo "Requiredbuilder not installed, or not executable."
+   exit 1
+fi
+
+if [ $VL_PACKAGER = "YOURNAME" ]; then
+   echo 'Who are you?
+   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
+   Change the word "YOURNAME" to your VectorLinux packager name.
+   You may also export VL_PACKAGER, or call this script with
+   VL_PACKAGER="YOUR NAME HERE"'
+   exit 1
+fi
+
+
+#CFLAGS SETUP
+#--------------------------------------------
+if [[ "$ARCH" = i?86 ]]; then
+  ARCH=i586
+  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  CONFIGURE_TRIPLET="i486-vector-linux"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2 -fpic"
+  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "powerpc" ]; then
+  SLKCFLAGS="-O2"
+  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
+  LIBDIRSUFFIX=""
+fi
+
+export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
+export CXXFLAGS=$CFLAGS
+export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
+#--------------------------------------------
+
+
+#GET THE SOURCE
+#--------------------------------------------
+for SRC in $(echo $LINK);do
+if [ ! -f $CWD/$(basename $SRC) ]
+then
+        wget --no-check-certificate -c $SRC
+fi
+done
+#--------------------------------------------
+
+
+rm -rf $PKG
+cd $TMP
+rm -rf ${NAME}-${VERSION}
+
+
+#EXTRACT SOURCES
+#-----------------------------------------------------
+echo "Extracting source..."
+tar xvf $CWD/${NAME}-${VERSION}-beta.tar.gz
+#this moves whatever was extracted to the std dirname we are expecting
+mv * ${NAME}-${VERSION} &> /dev/null 2>&1
+mkdir -p $PKG
+#-----------------------------------------------------
+
+
+cd $TMP/${NAME}-${VERSION}
+
+
+#PATCHES
+#-----------------------------------------------------
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
+#-----------------------------------------------------
+for i in $CWD/patches/*;do
+  patch -p1 <$i
+  mkdir -p $PKG/usr/doc/${NAME}-${VERSION}/patches/
+  cp $i $PKG/usr/doc/${NAME}-${VERSION}/patches/
+done
+#-----------------------------------------------------
+ 
+ 
+
+#SET PERMISSIONS
+#-----------------------------------------
+echo "Setting permissions..."
+chown -R root:root .
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 2777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 2755 -exec chmod 755 {} \;
+find . -perm 774 -exec chmod 644 {} \;
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+#-----------------------------------------
+
+
+
+#CONFIGURE & MAKE
+#----------------------------------------------------------------------
+# If you are building a KDE-related app, then change the following
+# arguments in the script below:
+# --prefix=$(kde-config -prefix) \
+# --sysconfdir=/etc/kde \
+#
+# Making these changes will ensure that your package will build in the
+# correct path and that it will work seamlessly within the KDE environment.
+#
+#-----------------------------------------------------------------------
+
+echo "Configuring source..."
+cd $TMP/${NAME}-${VERSION}/$NAME-$VERSION
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+  make || return 1
+  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=$PKG install
+
+  mkdir -p ${PKG}/usr/share/gconf/schemas
+  gconf-merge-schema ${PKG}/usr/share/gconf/schemas/${NAME}.schemas ${PKG}/etc/gconf/schemas/*.schemas
+  rm -f ${PKG}/etc/gconf/schemas/*.schemas
+
+
+#######################################################################
+#Miscellenious tweaks and things outside a normal ./configure go here #
+#######################################################################
+if test -f $CWD/$NAME.png; then
+mkdir -p $PKG/usr/share/pixmaps
+cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
+
+
+## Now test for desktop file
+mkdir -p $PKG/usr/share/applications
+cat > $PKG/usr/share/applications/$NAME.desktop << EOF
+[Desktop Entry]
+Type=Application
+Version=1.0
+Encoding=UTF-8
+Name=$NAME
+Comment=$NAME
+Icon=$NAME.png
+Exec=$NAME
+Terminal=false
+StartupNotify=true
+Categories=Application;Office;
+EOF
+mkdir -p $PKG/usr/doc/${NAME}-${VERSION}
+cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+$PKG/usr/doc/${NAME}-${VERSION}
+cat $CWD/${NAME}.SlackBuild > $PKG/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild
+
+#----------------------------------------------------------------------
+
+if [ -d $PKG/usr/share/man ];then
+mkdir -p $PKG/usr/man
+mv $PKG/usr/share/man/* $PKG/usr/man
+rm -rf $PKG/usr/share/man
+fi
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+if [ -d $PKG/usr/share/info ];then
+mkdir -p $PKG/usr/info
+mv $PKG/usr/share/info/* $PKG/usr/info
+rm -rf $PKG/usr/share/info
+fi 
+find $PKG/usr/info -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/install
+if [ -d $PKG/usr/info ];then
+cat >> $PKG/install/doinst.sh << EOF
+CWD=\$(pwd)
+cd usr/info
+if [ -f dir ];then
+    rm dir
+fi
+if [ -f dir.gz ];then
+    rm dir.gz
+fi
+for i in *.info.gz;do
+    install-info \$i dir
+done
+cd \$CWD
+EOF
+fi
+
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ];then
+# Make sure we have gconftool installed
+echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
+( cd $PKG/etc/gconf/schemas
+for schema in *.schemas; do
+ # Install schemas
+ echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
+   usr/bin/gconftool-2 --makefile-install-rule \
+   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
+   >> $PKG/install/doinst.sh
+done;
+)
+# Finish off gconf block
+echo "fi" >> $PKG/install/doinst.sh
+fi
+cat $CWD/*install >> $PKG/install/doinst.sh
+
+
+#if there is a slack-desc in src dir use it
+if test -f $CWD/slack-desc; then
+cp $CWD/slack-desc $RELEASEDIR/slack-desc
+else
+# This creates the white space in front of "handy-ruler" in slack-desc below.
+
+LENGTH=$(expr length "${NAME}")
+SPACES=0
+SHIM=""
+until [ "$SPACES" = "$LENGTH" ]; do
+SHIM="$SHIM "
+let SPACES=$SPACES+1
+done
+
+# Fill in the package summary between the () below.
+# Then package the description, License, Author and Website.
+# There may be no more then 11 ${NAME}: lines in a valid slack-desc.
+
+cat > $RELEASEDIR/slack-desc << EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+$SHIM|-----handy-ruler------------------------------------------------------|
+${NAME}: ${NAME} ()
+$NAME: $NAME (A gtk2 todo list manager)
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}:
+${NAME}:
+${NAME}: license='GPL'
+${NAME}: Authors: See Website
+${NAME}: Website: 
+$NAME: Website: http://download.sarine.nl/download/gtodo/
+EOF
+fi
+cat >> $RELEASEDIR/slack-desc << EOF
+
+
+
+#----------------------------------------
+BUILDDATE: $(date)
+PACKAGER:  $VL_PACKAGER
+HOST:      $(uname -srm)
+DISTRO:    $(cat /etc/vector-version)
+CFLAGS:    $CFLAGS
+LDFLAGS:   $LDFLAGS
+CONFIGURE: $(awk "/\\$\ \.\/configure\ /" $TMP/$DIRNAME/config.log)
+
+EOF
+
+cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc
+
+#STRIPPING
+#------------------------------------------------------------------------------------------------------------------
+cd $PKG
+echo " "
+echo "Stripping...."
+echo " "
+find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#------------------------------------------------------------------------------------------------------------------
+
+
+#FINISH PACKAGE
+#--------------------------------------------------------------
+echo "Finding dependencies..."
+ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
+echo "Creating package ${NAME}-${VERSION}-$ARCH-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/${NAME}-${VERSION}-$ARCH-$BUILD.txz
+
+cd $CWD
+echo "Cleaning up temp files..." && rm -rf $TMP
+echo "Package Complete"
+fi
+#--------------------------------------------------------------
+
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##
Add a comment to this file

var/vabs/gtodo2/src/gtodo2.png

Added
New image

var/vabs/joyutils/src/joyutils.SlackBuild

+#!/usr/bin/bash
+# This script assumes it will be launched within "/NAME/VERSION/src" dir.
+# With all sources in "src" Your Vector Linux .txz package, slack-desc,
+# and slack-required will be found in "VERSION" dir. The extraction and
+# build will be in a temp dir created in "NAME" dir, and then removed on exit.
+# Comment out second to last line to keep this dir intact.
+#
+# This Template was compiled from the contributions of many users of the Vector
+# Linux forum at http://forum.vectorlinux.com and from tidbits collected 
+# from all over the internet. 
+#
+# Generated by sbbuilder-0.4.15, written by Rodrigo Bistolfi 
+# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
+#
+# Please put your name below if you add some original scripting lines.
+# AUTHORS = 
+
+NAME="joyutils"            #Enter package Name!
+VERSION=${VERSION:-"1.2.15"}      #Enter package Version!
+VER=$(echo ${VERSION}|sed 's/-/_/') #this fixes - in version
+VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
+LINK=${LINK:-"ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-${VERSION}.tar.gz"}  #Enter URL for package here!
+
+
+#SYSTEM VARIABLES
+#----------------------------------------------------------------------------
+BUILDNUM=${BUILDNUM:-"1"}
+VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
+BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
+ARCH=${ARCH:-"$(uname -m)"}
+CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
+LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
+ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
+EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-""} #Add deps needed TO BUILD this package here.
+#----------------------------------------------------------------------------
+
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
+#SETUP PACKAGING ENVIRONMENT
+#--------------------------------------------
+CWD=$(pwd)
+cd ../
+RELEASEDIR=$(pwd)
+cd $CWD
+mkdir -p $RELEASEDIR/tmp
+TMP=$RELEASEDIR/tmp
+PKG=$TMP/package-${NAME}
+#--------------------------------------------
+
+
+
+if [ $UID != 0 ]; then
+   echo "You are not authorized to run this script. Please login as root"
+   exit 1
+fi
+
+if [ ! -x /usr/bin/requiredbuilder ]; then
+   echo "Requiredbuilder not installed, or not executable."
+   exit 1
+fi
+
+if [ $VL_PACKAGER = "YOURNAME" ]; then
+   echo 'Who are you?
+   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
+   Change the word "YOURNAME" to your VectorLinux packager name.
+   You may also export VL_PACKAGER, or call this script with
+   VL_PACKAGER="YOUR NAME HERE"'
+   exit 1
+fi
+
+
+#CFLAGS SETUP
+#--------------------------------------------
+if [[ "$ARCH" = i?86 ]]; then
+  ARCH=i586
+  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  CONFIGURE_TRIPLET="i486-vector-linux"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2 -fpic"
+  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "powerpc" ]; then
+  SLKCFLAGS="-O2"
+  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
+  LIBDIRSUFFIX=""
+fi
+
+export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
+export CXXFLAGS=$CFLAGS
+export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
+#--------------------------------------------
+
+
+#GET THE SOURCE
+#--------------------------------------------
+for SRC in $(echo $LINK);do
+if [ ! -f $CWD/$(basename $SRC) ]
+then
+        wget --no-check-certificate -c $SRC
+fi
+done
+#--------------------------------------------
+
+
+rm -rf $PKG
+cd $TMP
+rm -rf ${NAME}-${VERSION}
+
+
+#EXTRACT SOURCES
+#-----------------------------------------------------
+echo "Extracting source..."
+tar xvf $CWD/joystick-${VERSION}.tar.gz
+#this moves whatever was extracted to the std dirname we are expecting
+mv * ${NAME}-${VERSION} &> /dev/null 2>&1
+mkdir -p $PKG
+#-----------------------------------------------------
+
+
+cd $TMP/${NAME}-${VERSION}
+
+
+#PATCHES
+#-----------------------------------------------------
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
+#-----------------------------------------------------
+for i in $CWD/patches/*;do
+  patch -p1 <$i
+  mkdir -p $PKG/usr/doc/${NAME}-${VERSION}/patches/
+  cp $i $PKG/usr/doc/${NAME}-${VERSION}/patches/
+done
+#-----------------------------------------------------
+ 
+ 
+
+#SET PERMISSIONS
+#-----------------------------------------
+echo "Setting permissions..."
+chown -R root:root .
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 2777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 2755 -exec chmod 755 {} \;
+find . -perm 774 -exec chmod 644 {} \;
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+#-----------------------------------------
+
+
+
+#CONFIGURE & MAKE
+#----------------------------------------------------------------------
+# If you are building a KDE-related app, then change the following
+# arguments in the script below:
+# --prefix=$(kde-config -prefix) \
+# --sysconfdir=/etc/kde \
+#
+# Making these changes will ensure that your package will build in the
+# correct path and that it will work seamlessly within the KDE environment.
+#
+#-----------------------------------------------------------------------
+
+echo "Configuring source..."
+# Fix some warnings
+    cd $$CWD/joystick-$$VERSION
+    sed -i 's:#include <sys/ioctl.h>:#include <stdlib.h>\n#include <sys/ioctl.h>:' jscal.c
+
+    # Compile
+    gcc -lm -o jscal jscal.c
+    gcc -o jstest jstest.c
+    gcc -o jsattach jsattach.c
+
+    # Install
+    install -Dm 755 jscal $PKG/usr/bin/jscal
+    install -m 755 jstest $PKG/usr/bin/
+    install -m 755 jsattach $PKG/usr/bin/
+    install -Dm 644 jscal.1 $PKG/usr/share/man/man1/jscal.1
+    install -m 644 jstest.1 $PKG/usr/share/man/man1/
+    install -m 644 jsattach.1 $PKG/usr/share/man/man1/
+
+#######################################################################
+#Miscellenious tweaks and things outside a normal ./configure go here #
+#######################################################################
+if test -f $CWD/$NAME.png; then
+mkdir -p $PKG/usr/share/pixmaps
+cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
+## Now test for desktop file
+mkdir -p $PKG/usr/share/applications
+if test -f $CWD/${NAME}.desktop; then
+cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
+fi
+
+
+
+mkdir -p $PKG/usr/doc/${NAME}-${VERSION}
+cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+$PKG/usr/doc/${NAME}-${VERSION}
+cat $CWD/${NAME}.SlackBuild > $PKG/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild
+
+#----------------------------------------------------------------------
+
+if [ -d $PKG/usr/share/man ];then
+mkdir -p $PKG/usr/man
+mv $PKG/usr/share/man/* $PKG/usr/man
+rm -rf $PKG/usr/share/man
+fi
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+if [ -d $PKG/usr/share/info ];then
+mkdir -p $PKG/usr/info
+mv $PKG/usr/share/info/* $PKG/usr/info
+rm -rf $PKG/usr/share/info
+fi 
+find $PKG/usr/info -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/install
+if [ -d $PKG/usr/info ];then
+cat >> $PKG/install/doinst.sh << EOF
+CWD=\$(pwd)
+cd usr/info
+if [ -f dir ];then
+    rm dir
+fi
+if [ -f dir.gz ];then
+    rm dir.gz
+fi
+for i in *.info.gz;do
+    install-info \$i dir
+done
+cd \$CWD
+EOF
+fi
+
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ];then
+# Make sure we have gconftool installed
+echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
+( cd $PKG/etc/gconf/schemas
+for schema in *.schemas; do
+ # Install schemas
+ echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
+   usr/bin/gconftool-2 --makefile-install-rule \
+   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
+   >> $PKG/install/doinst.sh
+done;
+)
+# Finish off gconf block
+echo "fi" >> $PKG/install/doinst.sh
+fi
+cat $CWD/*install >> $PKG/install/doinst.sh
+
+
+#if there is a slack-desc in src dir use it
+if test -f $CWD/slack-desc; then
+cp $CWD/slack-desc $RELEASEDIR/slack-desc
+else
+# This creates the white space in front of "handy-ruler" in slack-desc below.
+
+LENGTH=$(expr length "${NAME}")
+SPACES=0
+SHIM=""
+until [ "$SPACES" = "$LENGTH" ]; do
+SHIM="$SHIM "
+let SPACES=$SPACES+1
+done
+
+# Fill in the package summary between the () below.
+# Then package the description, License, Author and Website.
+# There may be no more then 11 ${NAME}: lines in a valid slack-desc.
+
+cat > $RELEASEDIR/slack-desc << EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+$SHIM|-----handy-ruler------------------------------------------------------|
+$NAME: $NAME (jscal, jstest, and jsattach utilities for the linux joystick driver)
+${NAME}:
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}:
+${NAME}:
+${NAME}: license='GPL'
+${NAME}: Authors: See Website
+$NAME: Website: http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/
+
+EOF
+fi
+cat >> $RELEASEDIR/slack-desc << EOF
+
+
+
+#----------------------------------------
+BUILDDATE: $(date)
+PACKAGER:  $VL_PACKAGER
+HOST:      $(uname -srm)
+DISTRO:    $(cat /etc/vector-version)
+CFLAGS:    $CFLAGS
+LDFLAGS:   $LDFLAGS
+CONFIGURE: $(awk "/\\$\ \.\/configure\ /" $TMP/$DIRNAME/config.log)
+
+EOF
+
+cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc
+
+#STRIPPING
+#------------------------------------------------------------------------------------------------------------------
+cd $PKG
+echo " "
+echo "Stripping...."
+echo " "
+find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#------------------------------------------------------------------------------------------------------------------
+
+
+#FINISH PACKAGE
+#--------------------------------------------------------------
+echo "Finding dependencies..."
+ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
+echo "Creating package ${NAME}-${VERSION}-$ARCH-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/${NAME}-${VERSION}-$ARCH-$BUILD.txz
+
+cd $CWD
+echo "Cleaning up temp files..." && rm -rf $TMP
+echo "Package Complete"
+fi
+#--------------------------------------------------------------
+
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##

var/vabs/kapow/src/kapow.SlackBuild

+#!/usr/bin/bash
+# This script assumes it will be launched within "/NAME/VERSION/src" dir.
+# With all sources in "src" Your Vector Linux .txz package, slack-desc,
+# and slack-required will be found in "VERSION" dir. The extraction and
+# build will be in a temp dir created in "NAME" dir, and then removed on exit.
+# Comment out second to last line to keep this dir intact.
+#
+# This Template was compiled from the contributions of many users of the Vector
+# Linux forum at http://forum.vectorlinux.com and from tidbits collected 
+# from all over the internet. 
+#
+# Generated by sbbuilder-0.4.15, written by Rodrigo Bistolfi 
+# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
+#
+# Please put your name below if you add some original scripting lines.
+# AUTHORS = 
+
+NAME="kapow"            #Enter package Name!
+VERSION=${VERSION:-"1.4.3"}      #Enter package Version!
+VER=$(echo ${VERSION}|sed 's/-/_/') #this fixes - in version
+VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
+LINK=${LINK:-"http://gottcode.org/${NAME}/${NAME}-${VERSION}-src.tar.bz2"}  #Enter URL for package here!
+
+
+#SYSTEM VARIABLES
+#----------------------------------------------------------------------------
+BUILDNUM=${BUILDNUM:-"1"}
+VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
+BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
+ARCH=${ARCH:-"$(uname -m)"}
+CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
+LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
+ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
+EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"glib2 qt"} #Add deps needed TO BUILD this package here.
+#----------------------------------------------------------------------------
+
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
+#SETUP PACKAGING ENVIRONMENT
+#--------------------------------------------
+CWD=$(pwd)
+cd ../
+RELEASEDIR=$(pwd)
+cd $CWD
+mkdir -p $RELEASEDIR/tmp
+TMP=$RELEASEDIR/tmp
+PKG=$TMP/package-${NAME}
+#--------------------------------------------
+
+
+
+if [ $UID != 0 ]; then
+   echo "You are not authorized to run this script. Please login as root"
+   exit 1
+fi
+
+if [ ! -x /usr/bin/requiredbuilder ]; then
+   echo "Requiredbuilder not installed, or not executable."
+   exit 1
+fi
+
+if [ $VL_PACKAGER = "YOURNAME" ]; then
+   echo 'Who are you?
+   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
+   Change the word "YOURNAME" to your VectorLinux packager name.
+   You may also export VL_PACKAGER, or call this script with
+   VL_PACKAGER="YOUR NAME HERE"'
+   exit 1
+fi
+
+
+#CFLAGS SETUP
+#--------------------------------------------
+if [[ "$ARCH" = i?86 ]]; then
+  ARCH=i586
+  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  CONFIGURE_TRIPLET="i486-vector-linux"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2 -fpic"
+  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "powerpc" ]; then
+  SLKCFLAGS="-O2"
+  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
+  LIBDIRSUFFIX=""
+fi
+
+export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
+export CXXFLAGS=$CFLAGS
+export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
+#--------------------------------------------
+
+
+#GET THE SOURCE
+#--------------------------------------------
+for SRC in $(echo $LINK);do
+if [ ! -f $CWD/$(basename $SRC) ]
+then
+        wget --no-check-certificate -c $SRC
+fi
+done
+#--------------------------------------------
+
+
+rm -rf $PKG
+cd $TMP
+rm -rf ${NAME}-${VERSION}
+
+
+#EXTRACT SOURCES
+#-----------------------------------------------------
+echo "Extracting source..."
+tar xvf $CWD/${NAME}-${VERSION}-src.tar.bz2
+#this moves whatever was extracted to the std dirname we are expecting
+mv * ${NAME}-${VERSION} &> /dev/null 2>&1
+mkdir -p $PKG
+#-----------------------------------------------------
+
+
+cd $TMP/${NAME}-${VERSION}
+
+
+#PATCHES
+#-----------------------------------------------------
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
+#-----------------------------------------------------
+for i in $CWD/patches/*;do
+  patch -p1 <$i
+  mkdir -p $PKG/usr/doc/${NAME}-${VERSION}/patches/
+  cp $i $PKG/usr/doc/${NAME}-${VERSION}/patches/
+done
+#-----------------------------------------------------
+ 
+ 
+
+#SET PERMISSIONS
+#-----------------------------------------
+echo "Setting permissions..."
+chown -R root:root .
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 2777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 2755 -exec chmod 755 {} \;
+find . -perm 774 -exec chmod 644 {} \;
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+#-----------------------------------------
+
+
+
+#CONFIGURE & MAKE
+#----------------------------------------------------------------------
+# If you are building a KDE-related app, then change the following
+# arguments in the script below:
+# --prefix=$(kde-config -prefix) \
+# --sysconfdir=/etc/kde \
+#
+# Making these changes will ensure that your package will build in the
+# correct path and that it will work seamlessly within the KDE environment.
+#
+#-----------------------------------------------------------------------
+
+echo "Configuring source..."
+ cd "${TMP}/${NAME}-$VERSION}"
+  qmake PREFIX=/usr
+  make
+  
+  cd "${TMP}/${NAME}-$VERSION}"
+  make INSTALL_ROOT="${PKG}/" install
+#######################################################################
+#Miscellenious tweaks and things outside a normal ./configure go here #
+#######################################################################
+if test -f $CWD/$NAME.png; then
+mkdir -p $PKG/usr/share/pixmaps
+cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
+## Now test for desktop file
+mkdir -p $PKG/usr/share/applications
+if test -f $CWD/${NAME}.desktop; then
+cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
+fi
+
+
+
+mkdir -p $PKG/usr/doc/${NAME}-${VERSION}
+cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+$PKG/usr/doc/${NAME}-${VERSION}
+cat $CWD/${NAME}.SlackBuild > $PKG/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild
+
+#----------------------------------------------------------------------
+
+if [ -d $PKG/usr/share/man ];then
+mkdir -p $PKG/usr/man
+mv $PKG/usr/share/man/* $PKG/usr/man
+rm -rf $PKG/usr/share/man
+fi
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+if [ -d $PKG/usr/share/info ];then
+mkdir -p $PKG/usr/info
+mv $PKG/usr/share/info/* $PKG/usr/info
+rm -rf $PKG/usr/share/info
+fi 
+find $PKG/usr/info -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/install
+if [ -d $PKG/usr/info ];then
+cat >> $PKG/install/doinst.sh << EOF
+CWD=\$(pwd)
+cd usr/info
+if [ -f dir ];then
+    rm dir
+fi
+if [ -f dir.gz ];then
+    rm dir.gz
+fi
+for i in *.info.gz;do
+    install-info \$i dir
+done
+cd \$CWD
+EOF
+fi
+
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ];then
+# Make sure we have gconftool installed
+echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
+( cd $PKG/etc/gconf/schemas
+for schema in *.schemas; do
+ # Install schemas
+ echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
+   usr/bin/gconftool-2 --makefile-install-rule \
+   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
+   >> $PKG/install/doinst.sh
+done;
+)
+# Finish off gconf block
+echo "fi" >> $PKG/install/doinst.sh
+fi
+cat $CWD/*install >> $PKG/install/doinst.sh
+
+
+#if there is a slack-desc in src dir use it
+if test -f $CWD/slack-desc; then
+cp $CWD/slack-desc $RELEASEDIR/slack-desc
+else
+# This creates the white space in front of "handy-ruler" in slack-desc below.
+
+LENGTH=$(expr length "${NAME}")
+SPACES=0
+SHIM=""
+until [ "$SPACES" = "$LENGTH" ]; do
+SHIM="$SHIM "
+let SPACES=$SPACES+1
+done
+
+# Fill in the package summary between the () below.
+# Then package the description, License, Author and Website.
+# There may be no more then 11 ${NAME}: lines in a valid slack-desc.
+
+cat > $RELEASEDIR/slack-desc << EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+$SHIM|-----handy-ruler------------------------------------------------------|
+$NAME: $NAME (Punch clock to track time spent on projects)
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}:
+${NAME}:
+${NAME}: license='GPL3'
+${NAME}: Authors: See Website
+${NAME}: Website: 
+$NAME: Website: http://gottcode.org/${pkgname}/
+EOF
+fi
+cat >> $RELEASEDIR/slack-desc << EOF
+
+
+
+#----------------------------------------
+BUILDDATE: $(date)
+PACKAGER:  $VL_PACKAGER
+HOST:      $(uname -srm)
+DISTRO:    $(cat /etc/vector-version)
+CFLAGS:    $CFLAGS
+LDFLAGS:   $LDFLAGS
+CONFIGURE: $(awk "/\\$\ \.\/configure\ /" $TMP/$DIRNAME/config.log)
+
+EOF
+
+cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc
+
+#STRIPPING
+#------------------------------------------------------------------------------------------------------------------
+cd $PKG
+echo " "
+echo "Stripping...."
+echo " "
+find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#------------------------------------------------------------------------------------------------------------------
+
+
+#FINISH PACKAGE
+#--------------------------------------------------------------
+echo "Finding dependencies..."
+ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
+echo "Creating package ${NAME}-${VERSION}-$ARCH-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/${NAME}-${VERSION}-$ARCH-$BUILD.txz
+
+cd $CWD
+echo "Cleaning up temp files..." && rm -rf $TMP
+echo "Package Complete"
+fi
+#--------------------------------------------------------------
+
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##

var/vabs/kapow/src/kapow.install

+post_install() {
+	xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+	post_install
+}
+
+post_remove() {
+	post_install
+}
Add a comment to this file

var/vabs/kapow/src/kapow.png

Added
New image

var/vabs/maelstrom/src/Maelstrom.6

+.TH MAELSTROM "6" "April 2009" "Ambrosia Software" "Games"
+.SH NAME
+Maelstrom \- Enhanced Asteroids\-like game
+.SH SYNOPSIS
+.B Maelstrom
+[\-netscores] \-printscores
+.P
+.B Maelstrom
+[options]
+.P
+.B Maelstrom\-netd
+.br
+\fI(see NETWORKING, below, for a description of Maelstrom\-netd)\fR
+.SH DESCRIPTION
+Maelstrom is a game based on Asteroids, but with several gameplay enhancements:
+.P
+\- High\-resolution color graphics
+.br
+\- Digital audio
+.br
+\- Powerups
+.br
+\- Networked multiplayer/deathmatch mode (up to 3 players)
+.br
+\- World\-wide high score server
+.P
+Game storyline:
+.br
+You pilot your ship through the dreaded "Maelstrom" asteroid belt \-\-
+suddenly your best friend thrusts towards you and fires, directly at your
+cockpit. You raise your shields just in time, and the battle is joined.
+.P
+The deadliest stretch of space known to mankind has just gotten
+deadlier. Everywhere massive asteroids jostle for a chance to crush your
+ship, and deadly shinobi fighter patrols pursue you across the asteroid
+belt. But the deadliest of them all is your sister ship, assigned to
+you on patrol. The pilot, trained by your own Navy, battle hardened by
+months in the Maelstrom, is equipped with a twin of your own ship and
+intimate knowledge of your tactics.
+.P
+The lovely Stratocaster R&R facility never sounded so good, but as you
+fire full thrusters to dodge the latest barrage you begin to think you'll
+never get home...
+.SH OPTIONS
+.TP
+\fB\-fullscreen\fR
+Run Maelstrom in full\-screen mode. You may also press Alt\-Enter
+while Maelstrom is running, to toggle full\-screen.
+.TP
+\fB\-gamma\fR [0\-8]
+Set the gamma correction
+.TP
+\fB\-volume\fR [0\-8]
+Set the sound volume
+.TP
+\fB\-netscores\fR
+Use the world\-wide network score server
+.TP
+\fB\-player\fR N[@host][:port]
+Designate player N (at host and/or port). N must be an integer, 1 to 3.
+.TP
+\fB\-server\fR N@host[:port]
+Play with N players using server at host. N must be an integer, 1 to 3.
+.TP
+\fB\-deathmatch\fR [N]
+Play deathmatch to N frags (default = 8)
+.SH CONTROLS
+The game may be played with either the keyboard or a joystick.
+The game controls may be remapped by pressing C at the main menu. The
+default keyboard controls are:
+.TP
+\fBTab\fR, \fBJoystick Button 1\fR
+Fire
+.TP
+\fBUp Arrow\fR, \fBJoystick Up\fR
+Thrust
+.TP
+\fBSpace\fR, \fBJoystick Button 2\fR
+Shield
+.TP
+\fBRight Arrow\fR, \fBJoystick Right\fR
+Turn Clockwise
+.TP
+\fBLeft Arrow\fR, \fBJoystick Left\fR
+Turn Counter\-clockwise
+.TP
+\fBP\fR
+Pause
+.TP
+\fBEscape\fR
+Abort Game
+.TP
+\fBAlt\-Enter\fR
+Toggle between fullscreen and windowed modes. This keystroke
+may not be remapped.
+.P
+No special configuration must be done to play with a joystick, provided
+the joystick is supported by the SDL library on your OS.
+There is no way
+to remap the joystick controls.
+.SH NETWORKING
+.SS Netplay Without a Server
+Networking has been tested on Linux, SGI and DEC.  It is known to
+work between SGI and DEC systems (cross\-platform), and between systems
+of the same type.
+.P
+Up to three players can play, and the syntax is as follows:
+.P
+(On machine 1)
+.br
+.B
+.nh
+Maelstrom \-player 1 \-player 2@machine2 \-player 3@machine3
+.hy
+.P
+(On machine 2)
+.br
+.B
+.nh
+Maelstrom \-player 1@machine1 \-player 2 \-player 3@machine3
+.hy
+.P
+(On machine 3)
+.br
+.B
+.nh
+Maelstrom \-player 1@machine1 \-player 2@machine2 \-player 3
+.hy
+.SS Netplay With a Server
+You can also use a network address server that handles the difficulties
+of getting all the players and addresses right.  The address server is
+installed as \fBMaelstrom\-netd\fR, and if run on say "servhost", the syntax
+for a three player game would be:
+.P
+(On machine A)
+.br
+.B
+.nh
+Maelstrom \-player 1 \-server 3@servhost
+.hy
+.P
+(On machine B)
+.br
+.B
+.nh
+Maelstrom \-player 2 \-server 3@servhost
+.hy
+.P
+(On machine C)
+.br
+.B
+.nh
+Maelstrom \-player 3 \-server 3@servhost
+.hy
+.P
+The address server will let players know if they have conflicting
+player numbers, and will set up the proper addresses for all players.
+It can field multiple games, and can be a "game hub" where a bunch
+of players can get together for romping network games. :)
+.P
+\fBNOTE\fR: Maelstrom-netd will not run correctly on 64\-bit hosts,
+and Maelstrom running on a 64\-bit host cannot successfully play in a
+mutiplayer game with the -server option. Use non\-server networked
+play mode instead.
+.SS Network Ports
+By default, Maelstrom uses UDP ports 44718 to 44720 for networked games,
+where the port number is the player number plus 44717.
+(these may be overridden with the \fI:port\fR syntax, above).
+.P
+\fBMaelstrom-netd\fR listens on TCP port 44717.
+.P
+The global
+high\-score server listens on the host \fBdevolution.com\fR, TCP port 4444.
+.SH ADD\-ONS
+Maelstrom add\-ons consist of replacement sounds, replacement sprites,
+or both. Typically, the add\-on content is distributed as a zip file.
+.P
+There is a collection of Maelstrom add\-on content at
+.br
+.nh
+\fIhttp://www.devolution.com/~slouken/Maelstrom/add-ons.html\fR
+.hy
+.SS Automated Installation (Preferred)
+Use \fBmaelstrom_addon_package.pl\fR to convert the zip
+file to a Slackware package, then use \fBinstallpkg\fR to install the
+add\-on. Run \fBmaelstrom_addon_package.pl \-\-help\fR for more information.
+.SS Manual Installation
+Look within the zip file for files named
+\fI%Maelstrom_Sprites\fR and/or \fI%Maelstrom_Sounds\fR or similar
+(the % may be missing, the _ may be a space, and/or the filenames
+may end with .bin). Copy these files to
+.P
+.nh
+\fB/usr/share/games/Maelstrom/%Maelstrom_Sprites\fR
+.br
+and/or
+.br
+\fB/usr/share/games/Maelstrom/%Maelstrom_Sounds\fR
+.hy
+.P
+\fBNOTE\fR: \fIThe % is important!\fR
+.SS Add\-On Limitations
+There is no way to install more than one add\-on at a time, or to disable
+the installed add\-on without uninstalling it. There is also no way to
+install add\-ons in a user's home directory, or any other place than
+the system\-wide game data directory.
+.SH FILES
+.TP
+\fB/usr/share/games/Maelstrom/\fR
+game data (images, music, sound)
+.TP
+\fB$HOME/.Maelstrom\-data\fR
+per\-user settings and high\-score records
+.SH AUTHORS
+The original version of this game was written for the Macintosh by
+Andrew Welch, of Ambrosia Software.  It was ported to Linux and then
+to the Simple DirectMedia Layer library by Sam Lantinga.
+.P
+Man page created by B. Watson for SlackBuilds.org project (but others
+are free to use it)
+.SH COPYRIGHT
+The source code to Maelstrom 3.0 and higher has been released under
+the GNU General Public License which can be found in COPYING.GPL.
+.P
+The artwork and sounds used by Maelstrom are copyright Ambrosia Software
+(http://www.ambrosiasw.com) and may not be redistributed separately from
+the Maelstrom GPL source code.
Add a comment to this file

var/vabs/maelstrom/src/icon.bmp

Added
New image

var/vabs/maelstrom/src/maelstrom.SlackBuild

+#!/usr/bin/bash
+# This script assumes it will be launched within "/NAME/VERSION/src" dir.
+# With all sources in "src" Your Vector Linux .txz package, slack-desc,
+# and slack-required will be found in "VERSION" dir. The extraction and
+# build will be in a temp dir created in "NAME" dir, and then removed on exit.
+# Comment out second to last line to keep this dir intact.
+#
+# This Template was compiled from the contributions of many users of the Vector
+# Linux forum at http://forum.vectorlinux.com and from tidbits collected 
+# from all over the internet. 
+#
+# Generated by sbbuilder-0.4.15, written by Rodrigo Bistolfi 
+# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
+#
+# Please put your name below if you add some original scripting lines.
+# AUTHORS = 
+
+NAME="maelstrom"            #Enter package Name!
+VERSION=${VERSION:-"3.0.6"}      #Enter package Version!
+VER=$(echo ${VERSION}|sed 's/-/_/') #this fixes - in version
+VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
+LINK=${LINK:-"http://mirrors.kernel.org/gentoo/distfiles/Maelstrom-${VERSION}.tar.gz"}  #Enter URL for package here!
+
+
+#SYSTEM VARIABLES
+#----------------------------------------------------------------------------
+BUILDNUM=${BUILDNUM:-"1"}
+VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
+BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
+ARCH=${ARCH:-"$(uname -m)"}
+CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
+LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
+ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
+EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"SDL"} #Add deps needed TO BUILD this package here.
+#----------------------------------------------------------------------------
+
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
+#SETUP PACKAGING ENVIRONMENT
+#--------------------------------------------
+CWD=$(pwd)
+cd ../
+RELEASEDIR=$(pwd)
+cd $CWD
+mkdir -p $RELEASEDIR/tmp
+TMP=$RELEASEDIR/tmp
+PKG=$TMP/package-${NAME}
+#--------------------------------------------
+
+
+
+if [ $UID != 0 ]; then
+   echo "You are not authorized to run this script. Please login as root"
+   exit 1
+fi
+
+if [ ! -x /usr/bin/requiredbuilder ]; then
+   echo "Requiredbuilder not installed, or not executable."
+   exit 1
+fi
+
+if [ $VL_PACKAGER = "YOURNAME" ]; then
+   echo 'Who are you?
+   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
+   Change the word "YOURNAME" to your VectorLinux packager name.
+   You may also export VL_PACKAGER, or call this script with
+   VL_PACKAGER="YOUR NAME HERE"'
+   exit 1
+fi
+
+
+#CFLAGS SETUP
+#--------------------------------------------
+if [[ "$ARCH" = i?86 ]]; then
+  ARCH=i586
+  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+  CONFIGURE_TRIPLET="i486-vector-linux"
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  SLKCFLAGS="-O2 -fpic"
+  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "powerpc" ]; then
+  SLKCFLAGS="-O2"
+  CONFIGURE_TRIPLET="powerpc-vlocity-linux"
+  LIBDIRSUFFIX=""
+fi
+
+export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
+export CXXFLAGS=$CFLAGS
+export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
+#--------------------------------------------
+
+
+#GET THE SOURCE
+#--------------------------------------------
+for SRC in $(echo $LINK);do
+if [ ! -f $CWD/$(basename $SRC) ]
+then
+        wget --no-check-certificate -c $SRC
+fi
+done
+#--------------------------------------------
+
+
+rm -rf $PKG
+cd $TMP
+rm -rf ${NAME}-${VERSION}
+
+
+#EXTRACT SOURCES
+#-----------------------------------------------------
+echo "Extracting source..."
+tar xvf $CWD/Maelstrom-${VERSION}.tar.gz
+#this moves whatever was extracted to the std dirname we are expecting
+mv * ${NAME}-${VERSION} &> /dev/null 2>&1
+mkdir -p $PKG
+#-----------------------------------------------------
+
+
+cd $TMP/${NAME}-${VERSION}
+
+
+#PATCHES
+#-----------------------------------------------------
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
+#-----------------------------------------------------
+for i in $CWD/patches/*;do
+  patch -p1 <$i
+  mkdir -p $PKG/usr/doc/${NAME}-${VERSION}/patches/
+  cp $i $PKG/usr/doc/${NAME}-${VERSION}/patches/
+done
+#-----------------------------------------------------
+ 
+ 
+
+#SET PERMISSIONS
+#-----------------------------------------
+echo "Setting permissions..."
+chown -R root:root .
+find . -perm 664 -exec chmod 644 {} \;
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 2777 -exec chmod 755 {} \;
+find . -perm 775 -exec chmod 755 {} \;
+find . -perm 2755 -exec chmod 755 {} \;
+find . -perm 774 -exec chmod 644 {} \;
+find . -perm 666 -exec chmod 644 {} \;
+find . -perm 600 -exec chmod 644 {} \;
+find . -perm 444 -exec chmod 644 {} \;
+find . -perm 400 -exec chmod 644 {} \;
+find . -perm 440 -exec chmod 644 {} \;
+find . -perm 511 -exec chmod 755 {} \;
+find . -perm 711 -exec chmod 755 {} \;
+find . -perm 555 -exec chmod 755 {} \;
+#-----------------------------------------
+
+
+
+#CONFIGURE & MAKE
+#----------------------------------------------------------------------
+# If you are building a KDE-related app, then change the following
+# arguments in the script below:
+# --prefix=$(kde-config -prefix) \
+# --sysconfdir=/etc/kde \
+#
+# Making these changes will ensure that your package will build in the
+# correct path and that it will work seamlessly within the KDE environment.
+#
+#-----------------------------------------------------------------------
+
+echo "Configuring source..."
+./configure --prefix=/usr \
+  --libdir=/usr/lib${LIBDIRSUFFIX} \
+  --infodir=/usr/info \
+  --sysconfdir=/etc \
+  --localstatedir=/var \
+  --mandir=/usr/man \
+  --with-included-gettext \
+  --disable-debug \
+  --program-prefix="" \
+  --program-suffix="" \
+  --build=$CONFIGURE_TRIPLET \
+  $CONFIG_OPTIONS || exit 1
+
+make || exit 1
+
+make install DESTDIR=$PKG || exit 1
+
+
+#######################################################################
+#Miscellenious tweaks and things outside a normal ./configure go here #
+#######################################################################
+if test -f $CWD/$NAME.png; then
+mkdir -p $PKG/usr/share/pixmaps
+cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
+## Now test for desktop file
+mkdir -p $PKG/usr/share/applications
+if test -f $CWD/${NAME}.desktop; then
+cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
+fi
+
+
+
+mkdir -p $PKG/usr/doc/${NAME}-${VERSION}
+cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+$PKG/usr/doc/${NAME}-${VERSION}
+cat $CWD/${NAME}.SlackBuild > $PKG/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild
+
+#----------------------------------------------------------------------
+
+if [ -d $PKG/usr/share/man ];then
+mkdir -p $PKG/usr/man
+mv $PKG/usr/share/man/* $PKG/usr/man
+rm -rf $PKG/usr/share/man
+fi
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+if [ -d $PKG/usr/share/info ];then
+mkdir -p $PKG/usr/info
+mv $PKG/usr/share/info/* $PKG/usr/info
+rm -rf $PKG/usr/share/info
+fi 
+find $PKG/usr/info -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/install
+if [ -d $PKG/usr/info ];then
+cat >> $PKG/install/doinst.sh << EOF
+CWD=\$(pwd)
+cd usr/info
+if [ -f dir ];then
+    rm dir
+fi
+if [ -f dir.gz ];then
+    rm dir.gz
+fi
+for i in *.info.gz;do
+    install-info \$i dir
+done
+cd \$CWD
+EOF
+fi
+
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ];then
+# Make sure we have gconftool installed
+echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
+( cd $PKG/etc/gconf/schemas
+for schema in *.schemas; do
+ # Install schemas
+ echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
+   usr/bin/gconftool-2 --makefile-install-rule \
+   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
+   >> $PKG/install/doinst.sh
+done;
+)
+# Finish off gconf block
+echo "fi" >> $PKG/install/doinst.sh
+fi
+cat $CWD/doinst.sh >> $PKG/install/doinst.sh
+
+
+#if there is a slack-desc in src dir use it
+if test -f $CWD/slack-desc; then
+cp $CWD/slack-desc $RELEASEDIR/slack-desc
+else
+# This creates the white space in front of "handy-ruler" in slack-desc below.
+
+LENGTH=$(expr length "${NAME}")
+SPACES=0
+SHIM=""
+until [ "$SPACES" = "$LENGTH" ]; do
+SHIM="$SHIM "
+let SPACES=$SPACES+1
+done
+
+# Fill in the package summary between the () below.
+# Then package the description, License, Author and Website.
+# There may be no more then 11 ${NAME}: lines in a valid slack-desc.
+
+cat > $RELEASEDIR/slack-desc << EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+$SHIM|-----handy-ruler------------------------------------------------------|
+${NAME}: ${NAME} ()
+${NAME}:
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}: 
+${NAME}:
+${NAME}:
+${NAME}: License: GPL
+${NAME}: Authors: 
+${NAME}: Website: 
+
+EOF
+fi
+cat >> $RELEASEDIR/slack-desc << EOF
+
+
+
+#----------------------------------------
+BUILDDATE: $(date)
+PACKAGER:  $VL_PACKAGER
+HOST:      $(uname -srm)
+DISTRO:    $(cat /etc/vector-version)
+CFLAGS:    $CFLAGS
+LDFLAGS:   $LDFLAGS
+CONFIGURE: $(awk "/\\$\ \.\/configure\ /" $TMP/$DIRNAME/config.log)
+
+EOF
+
+cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc
+
+#STRIPPING
+#------------------------------------------------------------------------------------------------------------------
+cd $PKG
+echo " "
+echo "Stripping...."
+echo " "
+find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#------------------------------------------------------------------------------------------------------------------
+
+
+#FINISH PACKAGE
+#--------------------------------------------------------------
+echo "Finding dependencies..."
+ADD="$ADDRB" EXCLUDE="$EXRB" requiredbuilder -v -y -s $RELEASEDIR $PKG
+echo "Creating package ${NAME}-${VERSION}-$ARCH-$BUILD.txz"
+makepkg -l y -c n $RELEASEDIR/${NAME}-${VERSION}-$ARCH-$BUILD.txz
+
+cd $CWD
+echo "Cleaning up temp files..." && rm -rf $TMP
+echo "Package Complete"
+fi
+#--------------------------------------------------------------
+
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##

var/vabs/maelstrom/src/maelstrom.desktop

+[Desktop Entry]
+Name=Maelstrom
+Exec=Maelstrom
+Type=Application
+Icon=maelstrom
+GenericName=Maelstrom
+Categories=Game;ArcadeGame;
Add a comment to this file

var/vabs/maelstrom/src/maelstrom.png

Added
New image

var/vabs/maelstrom/src/maelstrom_addon_package.pl

+#!/usr/bin/perl -w
+
+# maelstrom_addon_package.pl - create a Slackware tgz
+# package from a Maelstrom addon zip file, for use with
+# the SlackBuilds.org maelstrom package.
+
+# Beware: only *one* addon may be installed at a time!
+
+# This script is meant to work on a stock Slackware system, so it
+# doesn't use any CPAN modules (which makes the code a bit awkward).
+
+# Author: B. Watson (yalhcru@gmail.com)
+
+# This program is released into the public domain; do as ye list wi' her.
+# Author not responsible for any damages resulting from the use of this
+# program.
+
+use strict;
+use File::Find; # core Perl module, not CPAN
+
+our $GAMEDIR = "/usr/share/games/Maelstrom";
+
+chomp(our $pkgver = `date +%Y%m%d`);
+
+our $pkgname;
+our $spritefile;
+our $soundfile;
+our @text_files;
+
+sub usage() {
+	warn <<EOF;
+Usage: maelstrom_addon_package.pl zipfile [pkgname]
+
+Creates a Slackware tgz package from a Maelstrom addon zip file. The
+zipfile may be either a local file (e.g. "my_addon.zip") or a URL
+(e.g. "http://example.com/foo_addon.zip").
+
+The output file will be located in /tmp, and will be named
+
+	maelstrom_addon_pkgname-YYYYMMDD-noarch-1_mael.tgz
+
+where pkgname is the [pkgname] argument, or derived from the zipfile name if
+no [pkgname] is given on the command line, and YYYYMMDD is the current date.
+
+The resulting .tgz package is suitable for installation with installpkg.
+However, only one Maelstrom addon package may be installed at a time
+(since the addon filenames are the same, the 2nd one would overwrite the
+first one).
+
+Since the script must be able to create files as the root user, you
+must run it with root privileges (e.g. with su or sudo).
+
+You can find a collection of Maelstrom add-on zip files here:
+
+	http://www.devolution.com/~slouken/Maelstrom/add-ons.html
+EOF
+	exit 1;
+}
+
+
+sub make_temp_dir() {
+	my $dir = "/tmp/maelstrom_addon_" . rand(10000000) . $$;
+	system("mkdir -p \"$dir\"") && die "can't create $dir\n";
+	return $dir;
+}
+
+sub extract($$) {
+	my $tmpdir = shift;
+	my $archive = shift;
+	system("cd \"$tmpdir\" && unzip \"$archive\"") &&
+		die "can't extract $archive in $tmpdir\n";
+}
+
+sub cleanup(@) {
+	for my $tmpdir (@_) {
+		system("cd \"$tmpdir\" && rm -rf *");
+		system("cd / && rmdir \"$tmpdir\"");
+	}
+}
+
+sub make_slack_desc($) {
+	my $package_dir = shift;
+
+	mkdir($package_dir . "/install");
+	open my $f, ">$package_dir/install/slack-desc";
+	print $f "$pkgname: Maelstrom add-on sprites/sound package\n";
+	print $f "$pkgname:\n" for (1..10);
+	close $f;
+}
+
+sub copy_files($) {
+	my $package_dir = shift;
+
+	system("mkdir -p $package_dir/usr/share/games/Maelstrom");
+	system("mkdir -p $package_dir/usr/doc/$pkgname-$pkgver");
+
+	system("cp \"$_\" $package_dir/usr/doc/$pkgname-$pkgver") for @text_files;
+
+	if($spritefile) {
+		system("cp \"$spritefile\" " .
+				"$package_dir/usr/share/games/Maelstrom/\%Maelstrom_Sprites");
+	}
+
+	if($soundfile) {
+		system("cp \"$soundfile\" " .
+				"$package_dir/usr/share/games/Maelstrom/\%Maelstrom_Sounds");
+	}
+}
+
+sub wanted {
+	my $file = $File::Find::fullname;
+	if(/\.txt$/i) {
+		warn "Found text file: $file\n";
+		push @text_files, $file;
+	} elsif(/\%?maelstrom.sounds(?:\..*)?$/i) {
+		warn "Found sounds: $file\n";
+		warn "warning: Duplicate sounds file $file\n" if $soundfile;
+		$soundfile = $file;
+	} elsif(/\%?maelstrom.sprites(?:\..*)?$/i) {
+		warn "Found sprites: $file\n";
+		warn "warning: Duplicate sprites file $file\n" if $spritefile;
+		$spritefile = $file;
+	}
+}
+
+# main()
+my $archive = shift || usage();
+usage() if $archive =~ /^--?(?:\?|h(?:elp)?)/i;
+
+die "You must run this script as root\n" if $> != 0;
+
+$pkgname = shift || $archive;
+for($pkgname) {
+	s/.*\///;
+	s/\..*//;
+	s/-/_/g;
+	s/\W//g;
+	y/A-Z/a-z/;
+}
+
+die "Invalid package name\n" unless $pkgname;
+
+$pkgname =~ s/^/maelstrom_addon_/;
+
+if($archive =~ /^(?:ht|f)tps?:\/\//) {
+	system("wget -O /tmp/$pkgname.zip \"$archive\"");
+	$archive = "/tmp/$pkgname.zip";
+}
+
+my $unzip_dir = make_temp_dir();
+
+extract($unzip_dir, $archive);
+find({ wanted => \&wanted, follow => 1 }, $unzip_dir);
+
+unless($spritefile or $soundfile) {
+	die "Can't find any sprites or sounds, aborting\n";
+}
+
+my $package_dir = make_temp_dir();
+
+copy_files($package_dir);
+make_slack_desc($package_dir);
+
+chdir($package_dir) or die $!;
+system("/sbin/makepkg -l y -c y /tmp/$pkgname-$pkgver-noarch-1_mael.tgz");
+chdir("/");
+cleanup($package_dir, $unzip_dir);
+

var/vabs/maelstrom/src/patches/compile_fix.diff

+diff -Naur Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp
+--- Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp	2001-07-22 17:03:13.000000000 -0400
++++ Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp	2009-04-14 14:15:49.000000000 -0400
+@@ -848,8 +848,8 @@
+ 			for ( i=0; i<dirtymaplen; ++i ) {
+ 				if ( dirtymap[i] != NULL ) {
+ 					dirtymap[i] = (SDL_Rect *)(
+-					((int)dirtymap[i]-(int)updatelist) +
+-								(int)newlist
++					((long)dirtymap[i]-(long)updatelist) +
++								(long)newlist
+ 					);
+ 				}
+ 			}

var/vabs/maelstrom/src/patches/install_dirs.diff

+diff -Naur Maelstrom-3.0.6/Makefile.in Maelstrom-3.0.6.patched/Makefile.in
+--- Maelstrom-3.0.6/Makefile.in	2002-10-20 00:19:42.000000000 -0400
++++ Maelstrom-3.0.6.patched/Makefile.in	2009-04-14 14:45:59.000000000 -0400
+@@ -431,7 +431,7 @@
+ 
+ # Special install rule for the game
+ install:
+-	make install_gamedata target=@GAME_INSTALLDIR@
++	make install_gamedata target=$(DESTDIR)/@GAME_INSTALLDIR@
+ 
+ install_gamedata:
+ 	sh mkinstalldirs $(target)/
+@@ -444,8 +444,8 @@
+ 	chmod 666 $(target)/Maelstrom-Scores
+ 
+ install_gamedocs:
+-	sh mkinstalldirs $(target)/
+-	cp -rv README* COPYING* Docs*	$(target)/
++	sh mkinstalldirs $(DESTDIR)/$(target)/
++	cp -rv README* COPYING* Docs*	$(DESTDIR)/$(target)/
+ 
+ # Rule to build tar-gzipped distribution package
+ $(PACKAGE)-$(VERSION).tar.gz: dist
+diff -Naur Maelstrom-3.0.6/configure Maelstrom-3.0.6.patched/configure
+--- Maelstrom-3.0.6/configure	2002-10-19 23:43:07.000000000 -0400
++++ Maelstrom-3.0.6.patched/configure	2009-04-14 14:47:33.000000000 -0400
+@@ -3232,7 +3232,7 @@
+         GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
+         ;;
+     *)
+-        GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
++        GAME_INSTALLDIR="\$(prefix)/share/games/$PACKAGE"
+         ;;
+ esac
+ 

var/vabs/maelstrom/src/slack-desc

+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+         |-----handy-ruler------------------------------------------------------|
+maelstrom: maelstrom (a game similar to Asteroids)