#!/bin/bash # # author : George Vlahavas (vlahavas~AT~gmail~DOT~com) # project web page : http://lgames.sourceforge.net/index.php?project=LMarbles # source : http://prdownloads.sourceforge.net/lgames/lmarbles-1.0.7.tar.gz # Package name NAME="lmarbles" # Package version VERSION="1.0.7" # ./configure options (localstatedir is only for the profiles file) CONFIGOPTIONS="--prefix=/usr --localstatedir=/usr/share/$NAME" # Docs DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README README-SDL.txt TODO src/manual" CWD=`pwd` PKG="$CWD/$NAME-install" ARCH="x86_64" #CPU="i686" BUILD="1gv" rm -rf $PKG mkdir -p $PKG # Create package install directory mkdir $PKG/install # Create the slack-desc file cat > $PKG/install/slack-desc << END $NAME: lmarbles (an Atomix clone with a slight change in concept) $NAME: $NAME: Instead of assembling molecules you create figures out of marbles. $NAME: Nevertheless, the basic game play is the same: If a marble starts to $NAME: move it will not stop until it hits a wall or another marble. To $NAME: make it more interesting there are obstacles like one-way streets, $NAME: crumbling walls and portals. As Marbles is meant as a puzzle game $NAME: you play against a move limit and not a time limit. This way you $NAME: have as much time as you need to think. $NAME: $NAME: END # Unpack source tar xf $NAME-$VERSION.tar.gz # Create the desktop entry mkdir -p $PKG/usr/share/applications cat > $PKG/usr/share/applications/$NAME.desktop < /dev/null # Copy Docs mkdir -p $PKG/usr/doc/$NAME-$VERSION cd $CWD/$NAME-$VERSION cp -a $DOCS $PKG/usr/doc/$NAME-$VERSION # Compress the man page(s) find $PKG/usr/man -type f -exec gzip -9 {} \; # Copy icon to the right place mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps cp -a $CWD/$NAME.png $PKG/usr/share/icons/hicolor/48x48/apps # Make sure ownerships and permissions are sane cd $PKG chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -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 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; # But we need the profiles file writable by everyone chmod a+w $PKG/usr/share/$NAME/$NAME.prfs # Make the package /sbin/makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz # Calculate md5sum cd $CWD/ md5sum $NAME-$VERSION-$ARCH-$BUILD.txz > $NAME-$VERSION-$ARCH-$BUILD.md5 # Remove source-code and temporary install directories # since they are not needed anymore rm -rf $CWD/$NAME-$VERSION rm -rf $PKG