diff options
author | B. Watson <yalhcru@gmail.com> | 2018-12-17 08:11:03 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-12-17 08:11:03 +0700 |
commit | 663c2a90ff95dcccba0385ca5f22dc71db2f1d4a (patch) | |
tree | ad293c0112d3f16fa5698224efe8c6af998164f1 | |
parent | 804cfec1d4133b663a8e64603ae380beaabedb14 (diff) |
games/mednaffe: Added (frontend for mednafen).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/mednaffe/README | 15 | ||||
-rw-r--r-- | games/mednaffe/doinst.sh | 10 | ||||
-rw-r--r-- | games/mednaffe/mednaffe.SlackBuild | 85 | ||||
-rw-r--r-- | games/mednaffe/mednaffe.info | 10 | ||||
-rw-r--r-- | games/mednaffe/slack-desc | 19 |
5 files changed, 139 insertions, 0 deletions
diff --git a/games/mednaffe/README b/games/mednaffe/README new file mode 100644 index 0000000000000..ffa06d8ddeb05 --- /dev/null +++ b/games/mednaffe/README @@ -0,0 +1,15 @@ +mednaffe (frontend for mednafen) + +Mednaffe is a GUI front-end for the mednafen emulator. + +Its main features are: + + * It is written in C. + * Available for Linux and Windows. + * The only dependency is GTK+2 (or GTK+3). + * GPLv3 licensed. + +Note: Mednaffe only works with 1.21.1 or higher versions of mednafen. + +By default, mednaffe is built with GTK+2. If you prefer GTK+3, export +GTK3=yes in the script's environment. diff --git a/games/mednaffe/doinst.sh b/games/mednaffe/doinst.sh new file mode 100644 index 0000000000000..daf1ce3148e3c --- /dev/null +++ b/games/mednaffe/doinst.sh @@ -0,0 +1,10 @@ + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/mednaffe/mednaffe.SlackBuild b/games/mednaffe/mednaffe.SlackBuild new file mode 100644 index 0000000000000..21f1dfe683f0f --- /dev/null +++ b/games/mednaffe/mednaffe.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for mednaffe + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=mednaffe +VERSION=${VERSION:-0.8.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +if [ "${GTK3:-no}" = "yes" ]; then + GTKOPT="--enable-gtk3" + GTKVER=3 +else + GTKOPT="--disable-gtk3" + GTKVER=2 +fi + +# --docdir is ignored, have to use nonstandard docsdir in make install. +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + $GTKOPT \ + --bindir=/usr/games \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG docsdir="/usr/doc/$PRGNAM-$VERSION" + +# docs already installed, just add this: +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +sed "s,@GTKVER@,$GTKVER," $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.${PKGTYPE:-tgz} diff --git a/games/mednaffe/mednaffe.info b/games/mednaffe/mednaffe.info new file mode 100644 index 0000000000000..5bb00ceed2026 --- /dev/null +++ b/games/mednaffe/mednaffe.info @@ -0,0 +1,10 @@ +PRGNAM="mednaffe" +VERSION="0.8.8" +HOMEPAGE="https://github.com/AmatCoder/mednaffe" +DOWNLOAD="https://github.com/AmatCoder/mednaffe/releases/download/0.8.8/mednaffe-0.8.8.tar.gz" +MD5SUM="8beab613db597d53bcc8cd4e62f281eb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/games/mednaffe/slack-desc b/games/mednaffe/slack-desc new file mode 100644 index 0000000000000..3d6e3a71bf76b --- /dev/null +++ b/games/mednaffe/slack-desc @@ -0,0 +1,19 @@ +# 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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +mednaffe: mednaffe (frontend for mednafen) +mednaffe: +mednaffe: Mednaffe is a GUI front-end for the mednafen emulator. +mednaffe: +mednaffe: This package was built with GTK+@GTKVER@. +mednaffe: +mednaffe: +mednaffe: +mednaffe: +mednaffe: +mednaffe: |