diff options
author | sL1pKn07 | 2019-03-13 20:55:12 +0100 |
---|---|---|
committer | sL1pKn07 | 2019-03-13 20:55:12 +0100 |
commit | 693bdb47d9ee0805c0fbd8dfde420f4e6aa71dbb (patch) | |
tree | 9afd88abe64806a4828a12849c2e20de99c9d461 | |
parent | 697ca8357b169793ac4d90187ccd10188899050b (diff) | |
download | aur-693bdb47d9ee0805c0fbd8dfde420f4e6aa71dbb.tar.gz |
deep rework
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | mame.sh | 57 | ||||
-rw-r--r-- | sdlmame-wout-toolkits.install | 4 | ||||
-rw-r--r-- | sdlmame.sh | 54 |
6 files changed, 80 insertions, 75 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Mar 13 17:03:19 UTC 2019 +# Wed Mar 13 19:54:54 UTC 2019 pkgbase = sdlmame-wout-toolkits pkgdesc = A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. Without Qt toolkit pkgver = 0.207 - pkgrel = 1 + pkgrel = 2 url = http://mamedev.org install = sdlmame-wout-toolkits.install arch = x86_64 @@ -13,10 +13,10 @@ pkgbase = sdlmame-wout-toolkits makedepends = glu makedepends = glm makedepends = wget + makedepends = asio makedepends = python-sphinxcontrib-svg2pdfconverter makedepends = rapidjson depends = sdl2_ttf - depends = alsa-lib depends = lua depends = flac depends = portmidi @@ -28,8 +28,9 @@ pkgbase = sdlmame-wout-toolkits depends = pugixml conflicts = sdlmame conflicts = sdlmamefamily-tools + conflicts = mame source = https://github.com/mamedev/mame/archive/mame0207.tar.gz - source = sdlmame.sh + source = mame.sh sha256sums = 69c29533d2128345c59fbf23fabc3af696322a77a6c1d7a7bd7f5a2ee57adafb sha256sums = d0289344e2260411965a56290cb4744963f48961326ce7f41b90f75f4221bb42 diff --git a/.gitignore b/.gitignore index cbce3bd4ab03..490a27933235 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ !.SRCINFO !PKGBUILD !sdlmame-wout-toolkits.install -!sdlmame.sh +!mame.sh @@ -3,14 +3,16 @@ pkgname=sdlmame-wout-toolkits pkgver=0.207 -pkgrel=1 +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=('x86_64') -conflicts=('sdlmame' 'sdlmamefamily-tools') +conflicts=('sdlmame' + 'sdlmamefamily-tools' + 'mame' + ) depends=('sdl2_ttf' - 'alsa-lib' 'lua' 'flac' 'portmidi' @@ -26,11 +28,12 @@ makedepends=('nasm' 'glu' 'glm' 'wget' + 'asio' 'python-sphinxcontrib-svg2pdfconverter' 'rapidjson' ) source=("https://github.com/mamedev/mame/archive/mame${pkgver/./}.tar.gz" - 'sdlmame.sh' + 'mame.sh' ) sha256sums=('69c29533d2128345c59fbf23fabc3af696322a77a6c1d7a7bd7f5a2ee57adafb' 'd0289344e2260411965a56290cb4744963f48961326ce7f41b90f75f4221bb42' @@ -70,10 +73,10 @@ package() { cd "mame-mame${pkgver/./}" # Install the sdlmame script - install -Dm755 "${srcdir}/sdlmame.sh" "${pkgdir}/usr/bin/sdlmame" + install -Dm755 "${srcdir}/mame.sh" "${pkgdir}/usr/bin/mame" # Install the applications and the UI font in /usr/share - install -Dm755 mame64 "${pkgdir}/usr/share/sdlmame/sdlmame" + install -Dm755 mame64 "${pkgdir}/usr/lib/mame/mame" _apps=('castool' 'chdman' 'floptool' @@ -92,23 +95,22 @@ package() { 'testkeys' 'unidasm' ) - for i in "${_apps[@]}"; do install -Dm755 "${i}" "${pkgdir}/usr/share/sdlmame/${i}"; done + for i in "${_apps[@]}"; do install -Dm755 "${i}" "${pkgdir}/usr/lib/mame/${i}"; done # Install the extra bits _extra=('artwork' 'bgfx' + 'ctrlr' 'hash' 'hlsl' - 'ini' 'keymaps' 'language' 'plugins' 'roms' ) - for i in $(find ${_extra[@]} -type f); do install -Dm644 "${i}" "${pkgdir}/usr/share/sdlmame/${i}"; done - install -d "${pkgdir}/usr/share/sdlmame/shader" - install -m644 src/osd/modules/opengl/shader/glsl*.*h "${pkgdir}/usr/share/sdlmame/shader/" - install -Dm644 uismall.bdf "${pkgdir}/usr/share/sdlmame/fonts/uismall.bdf" + for i in $(find ${_extra[@]} -type f); do install -Dm644 "${i}" "${pkgdir}/usr/lib/mame/${i}"; done + (cd src/osd/modules/opengl/shader; for i in glsl*.*h; do install -Dm644 "${i}" "${pkgdir}/usr/lib/mame/shader/${i}"; done) + install -Dm644 uismall.bdf "${pkgdir}/usr/lib/mame/fonts/uismall.bdf" # Install man (cd docs/man/; for i in $(find . -type f -name '*.1'); do install -Dm644 "${i}" "${pkgdir}/usr/share/man/man1/${i}"; done) @@ -119,8 +121,7 @@ package() { # documentation (cd docs; make BUILDDIR="${pkgdir}/usr/share/doc/${pkgname}" html) - cd "${pkgdir}/usr/share/doc/${pkgname}" - for i in $(find . -type f); do + for i in $(find "${pkgdir}/usr/share/doc/${pkgname}" -type f); do sed -e "s|${srcdir}||g" \ -e "s|${pkgdir}||g" \ -i "${i}" diff --git a/mame.sh b/mame.sh new file mode 100644 index 000000000000..bd73f0a9f2e8 --- /dev/null +++ b/mame.sh @@ -0,0 +1,57 @@ +#!/bin/sh +mamelib=/usr/lib/mame/ + +mame_first_run() { + echo "Creating an ini file for MAME at ~/.mame/mame.ini" + echo "Modify this file for permanent changes to your MAME" + echo "options and paths before running MAME again." + + cd -- ~/.mame || exit + + if [ -e mame.ini ]; then + mv mame.ini mameini.bak || exit + echo "Your old ini file has been renamed to mameini.bak" + fi + + # Note: the single quotes here are not a mistake; MAME will save these + # strings verbatim into its configuration file, and expand the variables when + # it is run in future. + + mame \ + -rompath '$HOME/.mame/roms;roms' \ + -hashpath '$HOME/.mame/hash;hash' \ + -samplepath '$HOME/.mame/samples' \ + -artpath '$HOME/.mame/artwork;artwork' \ + -ctrlrpath '$HOME/.mame/ctrlr;ctrlr' \ + -inipath '$HOME/.mame/ini' \ + -fontpath '$HOME/.mame/fonts;fonts' \ + -cheatpath '$HOME/.mame/cheat' \ + -crosshairpath '$HOME/.mame/crosshair' \ + -pluginspath '$HOME/.mame/plugins;plugins' \ + -languagepath '$HOME/.mame/language;language' \ + -swpath '$HOME/.mame/software;software' \ + -cfg_directory '$HOME/.mame/cfg' \ + -nvram_directory '$HOME/.mame/nvram' \ + -input_directory '$HOME/.mame/inp' \ + -state_directory '$HOME/.mame/sta' \ + -snapshot_directory '$HOME/.mame/snap' \ + -diff_directory '$HOME/.mame/diff' \ + -comment_directory '$HOME/.mame/comments' \ + -video opengl \ + -noreadconfig -showconfig > mame.ini +} + +if [ "$1" = "--newini" ]; then + echo "Running MAME for the first time..." + if ! [ -e ~/.mame ]; then + mkdir -- ~/.mame + fi + ( + cd -- ~/.mame || exit + mkdir -p roms hash samples artwork ctrlr ini fonts cheat crosshair plugins language software + mame_first_run + ) || exit +fi + +cd "${mamelib}" +exec ./mame "${@/--newini/}" diff --git a/sdlmame-wout-toolkits.install b/sdlmame-wout-toolkits.install index ceb6994be78f..87b9c0fdb02f 100644 --- a/sdlmame-wout-toolkits.install +++ b/sdlmame-wout-toolkits.install @@ -6,12 +6,12 @@ green="${bold}$(tput setaf 2)" post_upgrade() { printf "${yellow}==>${all_off} ${bold}ATENTION:${all_off} -${green}==>${all_off} ${bold}SDLMAME has been updated.${all_off} +${green}==>${all_off} ${bold}MAME has been updated.${all_off} ${blue}->${all_off} If you are upgrading directly from ${bold}0.117${all_off} or ${bold}earlier${all_off}, ${bold}you must delete all .cfg files${all_off} and ${bold}re-configure your controllers${all_off}. You should also run: - '$ ${bold}sdlmame --newini${all_off}' + '$ ${bold}mame --newini${all_off}' to force the script to create a new ini file with default settings at '${bold}~/.mame/mame.ini${all_off}' diff --git a/sdlmame.sh b/sdlmame.sh deleted file mode 100644 index d816389f09ed..000000000000 --- a/sdlmame.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# Create a variable equal to $HOME that will be used later in the ini creation -home=('$HOME') - -_run() { - /usr/share/sdlmame/sdlmame \ - -artpath "$home/.mame/artwork;/usr/share/sdlmame/artwork" \ - -ctrlrpath "$home/.mame/ctrlr;/usr/share/sdlmame/ctrlr" \ - -inipath "$home/.mame/ini;/usr/share/sdlmame/ini" \ - -fontpath "$home/.mame/fonts;/usr/share/sdlmame/fonts" \ - -hashpath "$home/.mame/hash;/usr/share/sdlmame/hash" \ - -pluginspath "$home/.mame/plugins;/usr/share/sdlmame/plugins" \ - -rompath "$home/.mame/roms;/usr/share/sdlmame/roms" \ - -bgfx_path "/usr/share/sdlmame/bgfx" \ - -languagepath "/usr/share/sdlmame/language" \ - -swpath "/usr/share/sdlmame/software" \ - -cfg_directory "$home/.mame/cfg" \ - -cheatpath "$home/.mame/cheat" \ - -comment_directory "$home/.mame/comments" \ - -crosshairpath "$home/.mame/crosshair" \ - -diff_directory "$home/.mame/diff" \ - -input_directory "$home/.mame/input" \ - -nvram_directory "$home/.mame/nvram" \ - -samplepath "$home/.mame/samples"\ - -snapshot_directory "$home/.mame/snapshot" \ - -state_directory "$home/.mame/state" \ - -video opengl \ - -createconfig -} - -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 - _run -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,fonts,hash,ini,input,nvram,plugins,samples,snapshot,state,roms} - cd "$HOME/.mame" - _run -else - cd /usr/share/sdlmame - ./sdlmame "$@" -fi |