summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2019-05-30 21:18:36 +0000
committerDaniel Bermond2019-05-30 21:18:36 +0000
commitc9f747551e5b8a1425b2b647afd800894cf6ed37 (patch)
tree84fd28e000d4bb3100eef823f2e2fe1ca09c1500
parent5235c8dbf95e9ca88f874230229f66b1df8d31cb (diff)
downloadaur-c9f747551e5b8a1425b2b647afd800894cf6ed37.tar.gz
Do not rename the clone dir. Remove i686. Update mame script.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD30
-rw-r--r--mame.sh111
3 files changed, 70 insertions, 78 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 96c88907c9ac..87bef5c8302c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = mame-git
pkgdesc = A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support (git version)
- pkgver = 0.202.r95.ge4d039bc077
+ pkgver = 0.210.r80.g0660656754b
pkgrel = 1
url = https://www.mamedev.org/
- arch = i686
arch = x86_64
license = GPL
makedepends = git
@@ -22,10 +21,10 @@ pkgbase = mame-git
depends = portaudio
provides = mame
conflicts = mame
- source = mame-git::git+https://github.com/mamedev/mame.git
+ source = git+https://github.com/mamedev/mame.git
source = mame.sh
sha256sums = SKIP
- sha256sums = aa90bae40c27a7732a0915b813a7f749ee2a0b95f6fc70128ff666498da58b5c
+ sha256sums = ee1c59bafc5e5441e99fa4c58108a3e18048e60672f34de865c8a5a976094dba
pkgname = mame-git
diff --git a/PKGBUILD b/PKGBUILD
index c68819544162..c0e5d98bad0d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,38 @@
-# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
+# Maintainer : Daniel Bermond < gmail-com: danielbermond >
pkgname=mame-git
-pkgver=0.202.r95.ge4d039bc077
+_srcname=mame
+pkgver=0.210.r80.g0660656754b
pkgrel=1
pkgdesc='A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support (git version)'
url='https://www.mamedev.org/'
license=('GPL')
-arch=('i686' 'x86_64')
+arch=('x86_64')
depends=('sdl2_ttf' 'qt5-base' 'lua' 'libutf8proc' 'pugixml' 'portmidi' 'portaudio')
makedepends=('git' 'nasm' 'python' 'asio' 'rapidjson' 'glm' 'libxinerama')
provides=('mame')
conflicts=('mame')
-source=("$pkgname"::'git+https://github.com/mamedev/mame.git'
+source=('git+https://github.com/mamedev/mame.git'
'mame.sh')
sha256sums=('SKIP'
- 'aa90bae40c27a7732a0915b813a7f749ee2a0b95f6fc70128ff666498da58b5c')
+ 'ee1c59bafc5e5441e99fa4c58108a3e18048e60672f34de865c8a5a976094dba')
prepare() {
- cd "$pkgname"
+ cd "$_srcname"
# use system libraries
sed -e 's|\# USE_SYSTEM_LIB|USE_SYSTEM_LIB|g' -i makefile
}
pkgver() {
- cd "$pkgname"
+ cd "$_srcname"
# git, tags available
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^\(mame\)\([0-9]\)/\2./'
}
build() {
- cd "$pkgname"
+ cd "$_srcname"
make \
NOWERROR='1' \
@@ -41,25 +42,24 @@ build() {
}
package() {
- cd "$pkgname"
-
- local _bin
+ cd "$_srcname"
# mame script
install -D -m755 "${srcdir}/mame.sh" "${pkgdir}/usr/bin/mame"
# binaries
- [ "$CARCH" = 'i686' ] && install -D -m755 mame32 "${pkgdir}/usr/lib/mame/mame"
- [ "$CARCH" = 'x86_64' ] && install -D -m755 mame64 "${pkgdir}/usr/lib/mame/mame"
+ install -D -m755 mame64 "${pkgdir}/usr/lib/mame/mame"
+ local _bin
for _bin in castool chdman imgtool jedutil nltool nlwav pngcmp regrep romcmp src2html \
split srcclean ldverify ldresample
do
- install -D -m755 "$_bin" -t "${pkgdir}/usr/lib/mame"
+ install -D -m755 "$_bin" -t "${pkgdir}/usr/lib/mame"
+ ln -s "/usr/lib/mame/${_bin}" "${pkgdir}/usr/bin/mame-${_bin}"
done
# extra bits
install -D -m644 src/osd/modules/opengl/shader/glsl*.*h -t "${pkgdir}/usr/lib/mame/shader/"
- cp -ar {artwork,bgfx,plugins,language,ctrlr,keymaps,hash} "${pkgdir}/usr/lib/mame/"
+ cp -a {artwork,bgfx,plugins,language,ctrlr,keymaps,hash} "${pkgdir}/usr/lib/mame/"
# documentation
install -d -m0755 "${pkgdir}/usr/share/doc"
diff --git a/mame.sh b/mame.sh
index 5ef44782d18f..80b7c4f4edcf 100644
--- a/mame.sh
+++ b/mame.sh
@@ -1,62 +1,55 @@
#!/bin/sh
+mame=/usr/lib/mame/mame
-# create a variable equal to '$HOME' (literal) that will be used later in the ini creation
-home='$HOME'
-
-if [ "$1" != '' ] && [ "$1" = '--newini' ]
-then
- printf '%s\n' "Rebuilding the ini file at ${HOME}/.mame/mame.ini"
- printf '%s\n' 'Modify this file for permanent changes to your MAME'
- printf '%s\n' 'options and paths before running MAME again.'
-
- cd "${HOME}/.mame"
- if [ -e mame.ini ]
- then
- printf '%s\n' 'Your old ini file has been renamed to mameini.bak'
- mv -f mame.ini mameini.bak
- fi
- /usr/lib/mame/mame \
- -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" \
- -nvram_directory "${home}/.mame/nvram" \
- -snapshot_directory "${home}/.mame/snap" \
- -state_directory "${home}/.mame/sta" \
- -video opengl \
- -createconfig
-
-elif [ ! -e "${HOME}/.mame" ]
-then
- printf '%s\n' 'Running MAME for the first time...'
- printf '%s\n' "Creating an ini file for MAME at ${HOME}/.mame/mame.ini"
- printf '%s\n' 'Modify this file for permanent changes to your MAME'
- printf '%s\n' 'options and paths before running MAME again.'
-
- mkdir "${HOME}/.mame"
- mkdir "$HOME"/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,nvram,samples,snap,sta,roms}
-
- cd "${HOME}/.mame"
- /usr/lib/mame/mame \
- -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" \
- -nvram_directory "${home}/.mame/nvram" \
- -snapshot_directory "${home}/.mame/snap" \
- -state_directory "${home}/.mame/sta" \
- -video opengl \
- -createconfig
-else
- /usr/lib/mame/mame "$@"
+mame_first_run() {
+ echo "Creating an ini file for MAME at $HOME/.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" \
+ -artpath '$HOME/.mame/artwork;/usr/lib/mame/artwork' \
+ -bgfx_path '$HOME/.mame/bgfx;/usr/lib/mame/bgfx' \
+ -ctrlrpath '$HOME/.mame/ctrlr;/usr/lib/mame/ctrlr' \
+ -hashpath '$HOME/.mame/hash;/usr/lib/mame/hash' \
+ -languagepath '$HOME/.mame/language;/usr/lib/mame/language' \
+ -pluginspath '/usr/lib/mame/plugins' \
+ -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
+}
+
+if [ "$1" = "--newini" ]; then
+ mame_first_run
+ exit
+elif ! [ -e ~/.mame ]; then
+ echo "Running MAME for the first time..."
+
+ mkdir -- ~/.mame
+ (
+ cd -- ~/.mame || exit
+ mkdir artwork bgfx cfg comments ctrlr diff hash ini inp language nvram samples snap sta roms
+
+ mame_first_run
+ ) || exit
fi
+
+exec "$mame" "$@"