diff options
-rw-r--r-- | games/qmc2/README | 3 | ||||
-rw-r--r-- | games/qmc2/doinst.sh | 16 | ||||
-rw-r--r-- | games/qmc2/qmc2.SlackBuild | 63 | ||||
-rw-r--r-- | games/qmc2/qmc2.info | 10 | ||||
-rw-r--r-- | games/qmc2/slack-desc | 8 |
5 files changed, 82 insertions, 18 deletions
diff --git a/games/qmc2/README b/games/qmc2/README index 056f069d88..3c3e0e083e 100644 --- a/games/qmc2/README +++ b/games/qmc2/README @@ -1,4 +1,3 @@ QMC2 (M.A.M.E. Catalog / Launcher II) -Requires QT4 at buildtime and a MAME executable (such as SDLMAME) -at runtime. QT4 is available at SlackBuilds.org. +Requires a MAME executable, such as sdlmame, at runtime. diff --git a/games/qmc2/doinst.sh b/games/qmc2/doinst.sh index 3857649f50..28d48e1f20 100644 --- a/games/qmc2/doinst.sh +++ b/games/qmc2/doinst.sh @@ -1,3 +1,19 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications &> /dev/null fi + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/qmc2/qmc2.ini.new + diff --git a/games/qmc2/qmc2.SlackBuild b/games/qmc2/qmc2.SlackBuild index c911fbfa10..8a7405f167 100644 --- a/games/qmc2/qmc2.SlackBuild +++ b/games/qmc2/qmc2.SlackBuild @@ -1,11 +1,30 @@ -#!/bin/sh -eu +#!/bin/sh +# +# Slackware build script for Google QMC2 -# Slackware build script for QMC2 -# Written by Erik Hanson erik@slackbuilds.org +# Copyright 2010 Erik Hanson, Minneapolis, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=qmc2 -VERSION=0.2.b5 -ARCH=i486 # This should match your QT4 $ARCH +VERSION=0.2.b13 +ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -14,8 +33,18 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -eu + rm -rf $PKG -mkdir -p $TMP $PKG +mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 @@ -23,9 +52,15 @@ cd $PRGNAM chown -R root:root . chmod -R u+w,go+r-w,a-s . -export QTDIR=/usr/lib/qt4 -make PREFIX=/usr -make install PREFIX=/usr DESTDIR=$PKG +CFLAGS="$SLKCFLAGS" +make \ + PREFIX=/usr \ + PRETTY=0 \ + MACHINE=$ARCH + +make install \ + PREFIX=/usr \ + DESTDIR=$PKG find $PKG | xargs file | egrep "ELF.*executable" | cut -f 1 -d : \ | xargs strip --strip-unneeded 2> /dev/null @@ -33,12 +68,16 @@ find $PKG | xargs file | egrep "ELF.*executable" | cut -f 1 -d : \ install -D -m 0644 $CWD/qmc2.desktop $PKG/usr/share/applications/qmc2.desktop install -D -m 0644 $CWD/qmc2.png $PKG/usr/share/icons/qmc2.png -mkdir -p $PKG/usr/doc $PKG/install +mv $PKG/etc/qmc2/qmc2.ini $PKG/etc/qmc2/qmc2.ini.new + +mkdir -p $PKG/usr/doc mv $PKG/usr/share/qmc2/doc/ $PKG/usr/doc/$PRGNAM-$VERSION/ -( cd $PKG/usr/share/qmc2 ; ln -s ../../doc/$PRGNAM-$VERSION doc ) +ln -s ../../doc/$PRGNAM-$VERSION $PKG/usr/share/qmc2/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/qmc2/qmc2.info b/games/qmc2/qmc2.info index 425f25277e..98fc679484 100644 --- a/games/qmc2/qmc2.info +++ b/games/qmc2/qmc2.info @@ -1,8 +1,10 @@ PRGNAM="qmc2" -VERSION="0.2.b5" +VERSION="0.2.b13" HOMEPAGE="http://www.mameworld.net/mamecat/" -DOWNLOAD="http://downloads.sourceforge.net/qmc2/qmc2-0.2.b5.tar.bz2" -MD5SUM="a6746dfd348b3967ffdd89f20e3b9b01" +DOWNLOAD="http://downloads.sourceforge.net/qmc2/qmc2-0.2.b13.tar.bz2" +MD5SUM="5677a1e7ad0baa11188b9e3ec9f7e7b8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Erik Hanson" EMAIL="erik@slackbuilds.org" -APPROVED="dsomero" +APPROVED="michiel" diff --git a/games/qmc2/slack-desc b/games/qmc2/slack-desc index 91262d25e7..ea7699ffd2 100644 --- a/games/qmc2/slack-desc +++ b/games/qmc2/slack-desc @@ -1,3 +1,11 @@ +# 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------------------------------------------------------| qmc2: QMC2 (M.A.M.E. Catalog / Launcher II) qmc2: qmc2: QMC2 is a Qt 4 based UNIX GUI frontend for SDLMAME. |