#!/bin/bash # # author : George Vlahavas (vlahavas~AT~gmail~DOT~com) # project web page : http://xmoto.tuxfamily.org # # if configure complains about not being able to link to sqlite, use # sqlite 3.4.2 to build. # Package name NAME="xmoto" # Package version VERSION="0.5.2" # ./configure options CONFIGOPTIONS="--prefix=/usr --mandir=/usr/man" # Files that should be placed in /usr/doc/package-version/ DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" CWD=`pwd` PKG="$CWD/$NAME-install" ARCH="i486" 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: xmoto - a 2D motocross game $NAME: $NAME: X-Moto is a challenging 2D motocross platform game, where physics $NAME: plays an all important role in the gameplay. You need to control $NAME: your bike to its limits, if you want to have a chance to finish the $NAME: most difficult challenges. $NAME: $NAME: $NAME: $NAME: $NAME: END # Unpack source tar xf $NAME-$VERSION-src.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 {} \; # 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 {} \; # 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