diff options
author | sl1pkn07 | 2015-06-08 19:56:42 +0200 |
---|---|---|
committer | sl1pkn07 | 2015-06-08 19:56:42 +0200 |
commit | e7971f782ea9b149da9afd0f8715b58b8a896d70 (patch) | |
tree | 29acfc70b59f3eaa2bc00765c2034eb5a3529d02 | |
download | aur-e7971f782ea9b149da9afd0f8715b58b8a896d70.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 104 | ||||
-rw-r--r-- | extras.tar.gz | bin | 0 -> 4093 bytes | |||
-rw-r--r-- | sdlmame-wout-toolkits.install | 29 | ||||
-rw-r--r-- | sdlmame.sh | 62 |
6 files changed, 230 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5fe4e5a94e02 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = sdlmame-wout-toolkits + pkgdesc = A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. Without Qt toolkit + pkgver = 0.162 + pkgrel = 2 + url = http://mamedev.org/ + install = sdlmame-wout-toolkits.install + arch = i686 + arch = x86_64 + license = custom:MAME License + makedepends = nasm + makedepends = mesa + makedepends = glu + makedepends = wget + makedepends = python2 + depends = sdl2_ttf + depends = alsa-lib + conflicts = sdlmame + conflicts = sdlmamefamily-tools + noextract = extras.tar.gz + source = https://github.com/mamedev/mame/archive/mame0162.tar.gz + source = sdlmame.sh + source = extras.tar.gz + sha1sums = 1d44bddea9cd4bb1d683f0ea1788a02e2f18e185 + sha1sums = 1ed8016f41edecfca746fadcfb40eab78845a3d6 + sha1sums = 75732974431844670aa3904d8f9ce3f5c5504827 + +pkgname = sdlmame-wout-toolkits + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..265944dfa522 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!sdlmame-wout-toolkits.install +!sdlmame.sh +!extras.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0cb6f2b3fa26 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,104 @@ +# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com> +# Based On: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=sdlmame-wout-toolkits +pkgver=0.162 +pkgrel=2 +pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. Without Qt toolkit" +url="http://mamedev.org/" +license=('custom:MAME License') +arch=('i686' 'x86_64') +conflicts=('sdlmame' 'sdlmamefamily-tools') +depends=('sdl2_ttf' 'alsa-lib') +makedepends=('nasm' 'mesa' 'glu' 'wget' 'python2') +source=("https://github.com/mamedev/mame/archive/mame${pkgver/./}.tar.gz" + "sdlmame.sh" + "extras.tar.gz") +sha1sums=('1d44bddea9cd4bb1d683f0ea1788a02e2f18e185' + '1ed8016f41edecfca746fadcfb40eab78845a3d6' + '75732974431844670aa3904d8f9ce3f5c5504827') +install=sdlmame-wout-toolkits.install +noextract=("extras.tar.gz") + +prepare() { + cd "mame-mame${pkgver/./}" + bsdtar -xf ../extras.tar.gz + + find . -type f -not -name \*.png | xargs -i_arg_ perl -pi -e 's/\r\n?/\n/g' "_arg_" +} + +build() { + cd "mame-mame${pkgver/./}" + + [ "${CARCH}" = "i686" ] && _use_64bits=0 + [ "${CARCH}" = "x86_64" ] && _use_64bits=1 + + make PYTHON_EXECUTABLE=/usr/bin/python2 \ + PTR64="${_use_64bits}" \ + SSE2="${_use_64bits}" \ + OPTIMIZE=2 \ + NOWERROR=1 \ + USE_OPENGL=1 \ + USE_QTDEBUG=0 \ + TESTS=0 \ + TOOLS=1 \ + STRIP_SYMBOLS=1 +} + +package() { + cd "mame-mame${pkgver/./}" + + # Install the sdlmame script + install -Dm755 ../sdlmame.sh "${pkgdir}/usr/bin/sdlmame" + + [ "${CARCH}" = "i686" ] && _suffix="" + [ "${CARCH}" = "x86_64" ] && _suffix="64" + # Install the applications and the UI font in /usr/share + install -Dm755 "mame${_suffix}" "${pkgdir}/usr/share/sdlmame/sdlmame" + + # Install the applications + install -Dm755 castool "${pkgdir}/usr/bin/castool" + install -Dm755 chdman "${pkgdir}/usr/bin/chdman" + install -Dm755 floptool "${pkgdir}/usr/bin/floptool" + install -Dm755 imgtool "${pkgdir}/usr/bin/imgtool" + install -Dm755 jedutil "${pkgdir}/usr/bin/jedutil" + install -Dm755 ldresample "${pkgdir}/usr/bin/ldresample" + install -Dm755 ldverify "${pkgdir}/usr/bin/ldverify" + install -Dm755 nltool "${pkgdir}/usr/bin/nltool" + install -Dm755 pngcmp "${pkgdir}/usr/bin/pngrep" + install -Dm755 regrep "${pkgdir}/usr/bin/regrep" + install -Dm755 romcmp "${pkgdir}/usr/bin/romcmp" + install -Dm755 split "${pkgdir}/usr/bin/splitmamerom" + install -Dm755 src2html "${pkgdir}/usr/bin/src2html" + install -Dm755 srcclean "${pkgdir}/usr/bin/srcclean" + install -Dm755 testkeys "${pkgdir}/usr/bin/testkeys" + install -Dm755 unidasm "${pkgdir}/usr/bin/unidasm" + + # Install the extra bits + install -d "${pkgdir}/usr/share/man/man1" + install -m644 src/osd/sdl/man/*.1* "${pkgdir}/usr/share/man/man1/" + + # Install the extra bits + install -d "${pkgdir}/usr/share/sdlmame/"{artwork,ctrlr,keymaps,shader} + install -m644 artwork/* "${pkgdir}/usr/share/sdlmame/artwork/" + install -m644 ctrlr/* "${pkgdir}/usr/share/sdlmame/ctrlr/" + install -m644 src/osd/sdl/keymaps/* "${pkgdir}/usr/share/sdlmame/keymaps/" + install -m644 src/osd/modules/opengl/shader/glsl*.*h "${pkgdir}/usr/share/sdlmame/shader/" + + # Install man + install -Dm644 src/osd/sdl/man/mame.6 "${pkgdir}/usr/share/man/man6/sdlmame.6" + + # Include the license + install -Dm644 docs/mamelicense.txt "${pkgdir}/usr/share/licenses/${pkgname}/mamelicense.txt" + + # FS#28203 + sed -e 's|KEYCODE_2_PAD|KEYCODE_2PAD|' \ + -e 's|KEYCODE_4_PAD|KEYCODE_4PAD|' \ + -e 's|KEYCODE_6_PAD|KEYCODE_6PAD|' \ + -e 's|KEYCODE_8_PAD|KEYCODE_8PAD|' \ + -i "${pkgdir}/usr/share/sdlmame/ctrlr/"*.cfg + + # documentation + cd docs + for i in $(find . -type f); do install -Dm644 "${i}" "${pkgdir}/usr/share/doc/${pkgname}/${i}"; done +} 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-wout-toolkits.install b/sdlmame-wout-toolkits.install new file mode 100644 index 000000000000..874ca78b072c --- /dev/null +++ b/sdlmame-wout-toolkits.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/mame.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..716f6d53e9b7 --- /dev/null +++ b/sdlmame.sh @@ -0,0 +1,62 @@ +#!/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/mame.ini" + echo "Modify this file for permanent changes to your SDLMAME" + echo "options and paths before running SDLMAME again." + cd $HOME/.mame + if [ -e mame.ini ]; then + echo "Your old ini file has been renamed to mameini.bak" + mv mame.ini mameini.bak + fi + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -cheatpath "$home/.mame/cheat" \ + -crosshairpath "$home/.mame/crosshair" \ + -hashpath "$home/.mame/hash;hash" \ + -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 \ + -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/mame.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,cheat,comments,crosshair,ctrlr,diff,hash,ini,inp,nvram,samples,snap,sta,roms} + cd $HOME/.mame + /usr/share/sdlmame/sdlmame \ + -artpath "$home/.mame/artwork;artwork" \ + -ctrlrpath "$home/.mame/ctrlr;ctrlr" \ + -cheatpath "$home/.mame/cheat" \ + -crosshairpath "$home/.mame/crosshair" \ + -hashpath "$home/.mame/hash;hash" \ + -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 \ + -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 |