PKGBUILDs/community/mame/PKGBUILD

87 lines
3 KiB
Bash
Raw Normal View History

2018-04-25 12:30:02 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: robb_force <robb_force@holybuffalo.net>
# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - install 'mame' instead of 'mame64'
highmem=1
pkgname=mame
2020-05-18 12:32:43 +00:00
pkgver=0.221
2019-12-25 13:00:01 +00:00
pkgrel=1
2018-04-25 12:30:02 +00:00
pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support."
2019-01-30 13:38:36 +00:00
url="https://mamedev.org/"
2018-04-25 12:30:02 +00:00
license=(GPL2)
arch=(x86_64)
2020-02-02 11:42:34 +00:00
depends=(sdl2_ttf qt5-base lua libutf8proc pugixml portmidi portaudio flac)
2018-06-27 12:38:18 +00:00
makedepends=(nasm python asio rapidjson glm libxinerama)
2018-04-25 12:30:02 +00:00
conflicts=(sdlmame)
replaces=(sdlmame)
2019-12-17 00:48:21 +00:00
source=("https://github.com/mamedev/mame/archive/mame${pkgver/./}.tar.gz"
mame.sh mame.desktop mame.svg)
2020-05-18 12:32:43 +00:00
sha256sums=('8ead65f2585fc1330215e42db1d691f18497ff6d9e561d3cced54af599da4ac0'
2019-12-17 00:48:21 +00:00
'ee1c59bafc5e5441e99fa4c58108a3e18048e60672f34de865c8a5a976094dba'
'6beb883c8efed5b7466d43d0658b47c3e4a9928b5d0245ed56446b230e28306b'
'17c442c933d764175e4ce1de50a80c0c2ddd5d733caf09c3cd5e6ba697ac43f4')
2018-04-25 12:30:02 +00:00
2018-06-27 12:38:18 +00:00
prepare() {
cd mame-mame${pkgver/./}
# Use system libraries
sed -e 's|\# USE_SYSTEM_LIB|USE_SYSTEM_LIB|g' -i makefile
2020-02-29 16:18:00 +00:00
# except for asio
sed -e 's|USE_SYSTEM_LIB_ASIO|\# USE_SYSTEM_LIB_ASIO|g' -i makefile
2018-06-27 12:38:18 +00:00
}
2018-04-25 12:30:02 +00:00
build() {
cd mame-mame${pkgver/./}
2020-04-05 20:18:29 +00:00
make \
2018-04-25 12:30:02 +00:00
NOWERROR=1 \
OPTIMIZE=2 \
TOOLS=1 \
ARCHOPTS=-flifetime-dse=1
}
package() {
cd mame-mame${pkgver/./}
# Install the mame script
install -Dm755 "$srcdir"/$pkgname.sh "$pkgdir"/usr/bin/$pkgname
# Install the binaries
install -Dm755 mame "$pkgdir"/usr/lib/mame/mame
2020-04-05 20:18:29 +00:00
for _i in castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav pngcmp regrep romcmp \
split srcclean testkeys unidasm; do
2018-04-25 12:30:02 +00:00
install -m755 $_i -t "$pkgdir"/usr/lib/mame
2018-12-25 21:55:36 +00:00
ln -s /usr/lib/mame/$_i "$pkgdir"/usr/bin/mame-$_i
2018-04-25 12:30:02 +00:00
done
# Install the extra bits
2018-05-01 12:38:24 +00:00
install -Dm644 src/osd/modules/opengl/shader/glsl*.*h -t "$pkgdir"/usr/lib/$pkgname/shader/
cp -ar {artwork,bgfx,plugins,language,ctrlr,keymaps,hash} "$pkgdir"/usr/lib/$pkgname/
2018-04-25 12:30:02 +00:00
# Include the license
install -Dm644 docs/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
# FS#28203
2018-05-01 12:38:24 +00:00
sed -i 's|KEYCODE_2_PAD|KEYCODE_2PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg
sed -i 's|KEYCODE_4_PAD|KEYCODE_4PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg
sed -i 's|KEYCODE_6_PAD|KEYCODE_6PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg
sed -i 's|KEYCODE_8_PAD|KEYCODE_8PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg
2018-04-25 12:30:02 +00:00
# documentation
install -dm0755 "$pkgdir"/usr/share/doc
cp -a docs "$pkgdir"/usr/share/doc/$pkgname
rm -r "$pkgdir"/usr/share/doc/$pkgname/man
2018-05-01 12:38:24 +00:00
install -d "$pkgdir"/usr/share/man/man{1,6}
install -m644 docs/man/*.1* "$pkgdir"/usr/share/man/man1/
install -m644 docs/man/*.6* "$pkgdir"/usr/share/man/man6/
2019-12-17 00:48:21 +00:00
# install desktop file and icon
install -Dm644 "$srcdir"/mame.desktop -t "$pkgdir"/usr/share/applications
install -Dm644 "$srcdir"/mame.svg -t "$pkgdir"/usr/share/icons/hicolor/scalable/apps
2018-04-25 12:30:02 +00:00
}