diff options
author | Chris Severance | 2016-01-05 05:34:54 -0500 |
---|---|---|
committer | Chris Severance | 2016-01-05 05:34:54 -0500 |
commit | df1bab87a8f16bdf8135f7c13191f953a961fe8c (patch) | |
tree | b5c7fcd12d35a8daf305e0b67d8d7760bff1a332 | |
download | aur-df1bab87a8f16bdf8135f7c13191f953a961fe8c.tar.gz |
Initial Import
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 108 | ||||
-rw-r--r-- | extras.tar.gz | bin | 0 -> 4093 bytes | |||
-rw-r--r-- | sdlmame.install | 29 | ||||
-rw-r--r-- | sdlmame.sh | 58 |
5 files changed, 226 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..56a4f6299a7a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +# Generated by mksrcinfo v8 +# Tue Jan 5 09:58:25 UTC 2016 +pkgbase = sdlmame-0137 + pkgdesc = A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. Last version to play Dr Mario + pkgver = 0.137u2 + pkgrel = 1 + url = http://mamedev.org/ + install = sdlmame.install + arch = i686 + arch = x86_64 + license = custom:MAME License + makedepends = unzip + makedepends = nasm + makedepends = mesa + makedepends = gcc45 + depends = sdl>=1.2.11 + depends = libxinerama + depends = gconf + provides = sdlmame=0.137u2 + conflicts = sdlmame + noextract = extras.tar.gz + options = !strip + source = https://github.com/mamedev/mame/archive/mame0137u2.zip + source = sdlmame.sh + source = extras.tar.gz + sha256sums = 647ce4c846918d7ade7f62aca1e8f5f1aeebecfd1dafa79c2b206a378d8fc615 + sha256sums = 36efc2fb5981f7595a631e9d399af853a42ec62ce0146a1820d92be224d6a20f + sha256sums = 5ba55ce8c33743207a12a7509efdf13dd98f5d87fa12f0e471ea523d3ae4f4ac + +pkgname = sdlmame-0137 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ccad48943c0a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,108 @@ +# $Id$ +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: robb_force <robb_force@holybuffalo.net> +# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com> + +# Remember to sdlmame --newini after downgrading + +# Shouldn't we have a .desktop file? + +set -u +pkgname='sdlmame-0137' +pkgver='0.137u2' +pkgrel='1' +pkgdesc='A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. Last version to play Dr Mario' +arch=('i686' 'x86_64') +url='http://mamedev.org/' +license=('custom:MAME License') +depends=('sdl>=1.2.11' 'libxinerama' 'gconf') +_gcver='4.5' +makedepends=('unzip' 'nasm' 'mesa' "gcc${_gcver/./}") +provides=("${pkgname%%-*}=${pkgver}") +conflicts=("${pkgname%%-*}") +options=('!strip') +install='sdlmame.install' +source=("https://github.com/mamedev/mame/releases/download/mame${pkgver//./}/mame${pkgver//./}s.zip" + 'sdlmame.sh' + 'extras.tar.gz' +) +if [ "${pkgver/u//}" != "${pkgver}" ]; then + source[0]="https://github.com/mamedev/mame/archive/mame${pkgver//./}.zip" + _unzip=0 +else + _unzip=1 +fi +noextract=('extras.tar.gz') +_srcdir="mame-mame${pkgver//./}" +sha256sums=('647ce4c846918d7ade7f62aca1e8f5f1aeebecfd1dafa79c2b206a378d8fc615' + '36efc2fb5981f7595a631e9d399af853a42ec62ce0146a1820d92be224d6a20f' + '5ba55ce8c33743207a12a7509efdf13dd98f5d87fa12f0e471ea523d3ae4f4ac') + +prepare() { + set -u + if [ "${_unzip}" -ne 0 ]; then + unzip -oaq -d "${_srcdir}" 'mame.zip' + fi + cd "${_srcdir}" + bsdtar -xf "${srcdir}/extras.tar.gz" + #find . -type 'f' -not -name '*.png' | xargs perl -pi -e 's/\r\n?/\n/g' + #find . -type 'f' -not -name 'uismall.png' | xargs perl -pi -e 's/\r\n?/\n/g' + sed -i 's/-Werror//' 'makefile' + #sed -i 's/LDFLAGS = -Wl,--warn-common/LDFLAGS = -Wl,--warn-common -Wl,-zmuldefs/' 'makefile' + set +u +} + +build() { + set -u + cd "${_srcdir}" + local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc)) + # Modify the make options based on the user's architecture + case "${CARCH}" in + 'x86_64') + echo 'Compiling for AMD64...' + make -j "${_nproc}" AMD64=1 PTR64=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + make tools AMD64=1 PTR64=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + ;; + 'i686') + echo 'Compiling for i686...' + make -j "${_nproc}" I686=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + make tools I686=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + ;; + *) + echo 'Compiling for i386...' + make -j "${_nproc}" PM=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + make tools PM=1 CC="gcc-${_gcver}" LD="g++-${_gcver}" + ;; + esac + set +u +} + +package() { + set -u + cd "${_srcdir}" + + # Install the sdlmame script + install -Dpm755 "${srcdir}/${pkgname%-*}.sh" "${pkgdir}/usr/bin/${pkgname%-*}" + + # Install the applications and the UI font in /usr/share + install -Dpm755 'mame' "${pkgdir}/usr/share/${pkgname%-*}/${pkgname%-*}" || \ + install -Dpm755 'mame64' "${pkgdir}/usr/share/${pkgname%-*}/${pkgname%-*}" + + install -Dpm755 {'chdman','jedutil','regrep','romcmp','testkeys','src2html','srcclean','ldverify','ldresample'} -t "${pkgdir}/usr/share/${pkgname%-*}/" + +# install -Dpm755 {makemeta,runtest} -t "${pkgdir}/usr/share/${pkgname%-*}/" +# install -Dpm644 'ui.bdf' -t "${pkgdir}/usr/share/${pkgname%-*}/" + + # Install the extra bits + install -Dpm644 artwork/* -t "${pkgdir}/usr/share/${pkgname%-*}/artwork/" + install -Dpm644 ctrlr/* -t "${pkgdir}/usr/share/${pkgname%-*}/ctrlr/" + install -Dpm644 src/osd/sdl/keymaps/* -t "${pkgdir}/usr/share/${pkgname%-*}/keymaps/" + + # Include the license + install -Dpm644 'docs/license.txt' -t "${pkgdir}/usr/share/licenses/${pkgname%-*}/license.txt" + + find "${pkgdir}" -type 'f' -exec strip '{}' ';' + set +u +} +set +u diff --git a/extras.tar.gz b/extras.tar.gz Binary files differnew file mode 100644 index 000000000000..ae0bc2a39f49 --- /dev/null +++ b/extras.tar.gz diff --git a/sdlmame.install b/sdlmame.install new file mode 100644 index 000000000000..6103018a3179 --- /dev/null +++ b/sdlmame.install @@ -0,0 +1,29 @@ +# Message displayed for a fresh install. +post_install() +{ + echo "" + echo "***************************************************************" + echo " SDLMAME and the additional MAME utilities have been installed" + echo " in /usr/share/sdlmame However, SDLMAME can be run by" + echo " typing sdlmame and it's options. Try running SDLMAME with" + echo " these options:" + echo " sdlmame <rom> -nowindow -noswitchres" + echo "***************************************************************" + echo "" +} + +# Message for an update. +post_upgrade() +{ + echo "" + echo "***************************************************************" + echo " SDLMAME has been updated. If you are upgrading directly from" + echo " 0.117 or earlier, you must delete all .cfg files and" + echo " re-configure your controllers. You should also run" + echo " 'SDLMAME --newini' to force the script to create a new ini" + echo " file with default settings at ~/.mame/sdlmame.ini" + echo " since there may be new ini options." + echo "***************************************************************" + echo "" +} + diff --git a/sdlmame.sh b/sdlmame.sh new file mode 100644 index 000000000000..38b48701ac3a --- /dev/null +++ b/sdlmame.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# Create a variable equal to $HOME that will be used later in the ini creation +home=('$HOME') + +if [ "$1" != "" ] && [ "$1" = "--newini" ]; then + echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini" + echo "Modify this file for permanent changes to your SDLMAME" + echo "options and paths before running SDLMAME again." + cd $HOME/.mame + if [ -e sdlmame.ini ]; then + echo "Your old ini file has been renamed to sdlmameini.bak" + mv sdlmame.ini sdlmameini.bak + fi + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -inipath $home/.mame/ini \ + -rompath $home/.mame/roms \ + -samplepath $home/.mame/samples \ + -cfg_directory $home/.mame/cfg \ + -comment_directory $home/.mame/comments \ + -diff_directory $home/.mame/diff \ + -input_directory $home/.mame/inp \ + -memcard_directory $home/.mame/memcard \ + -nvram_directory $home/.mame/nvram \ + -snapshot_directory $home/.mame/snap \ + -state_directory $home/.mame/sta \ + -video opengl \ + -createconfig +elif [ ! -e $HOME/.mame ]; then + echo "Running SDLMAME for the first time..." + echo "Creating an ini file for SDLMAME at $HOME/.mame/sdlmame.ini" + echo "Modify this file for permanent changes to your SDLMAME" + echo "options and paths before running SDLMAME again." + mkdir $HOME/.mame + mkdir $HOME/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,memcard,nvram,samples,snap,sta} + cd $HOME/.mame + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -inipath $home/.mame/ini \ + -rompath $home/.mame/roms \ + -samplepath $home/.mame/samples \ + -cfg_directory $home/.mame/cfg \ + -comment_directory $home/.mame/comments \ + -diff_directory $home/.mame/diff \ + -input_directory $home/.mame/inp \ + -memcard_directory $home/.mame/memcard \ + -nvram_directory $home/.mame/nvram \ + -snapshot_directory $home/.mame/snap \ + -state_directory $home/.mame/sta \ + -video opengl \ + -createconfig +else + cd /usr/share/sdlmame + ./sdlmame "$@" +fi |