summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bell2020-06-14 14:44:02 +0100
committerPaul Bell2020-06-14 14:44:02 +0100
commit97cfb2b102c334e04fbe0cedf1b502accce3feeb (patch)
tree5564d17d8dec35141e217365ddce799a201edac1
parenta7b2210f0ac686f3924646726490849d30d73534 (diff)
downloadaur-97cfb2b102c334e04fbe0cedf1b502accce3feeb.tar.gz
Added missing netroms folder. Restructured PKGBUILD to build both rpcemu binaries and allow selecting which one is used as the default. Also added option to use apulse for pulseaudio emulation.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD54
2 files changed, 31 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba7b1ed6edeb..dfec3c9d1b16 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = rpcemu
pkgdesc = An Emulator of classic Acorn computer systems, such as the Risc PC and A7000
pkgver = 0.9.3
- pkgrel = 1
+ pkgrel = 2
url = http://www.marutan.net/rpcemu/
install = rpcemu.install
arch = x86_64
arch = i686
license = GPL2
makedepends = qt5-base
+ optdepends = apulse: PulseAudio emulation for ALSA
+ optdepends = lib32-apulse: PulseAudio emulation for ALSA (32-bit)
backup = usr/share/rpcemu/rpc.cfg
source = http://www.marutan.net/rpcemu/cgi/download.php?sFName=0.9.3/rpcemu-0.9.3.tar.gz
sha256sums = 33b89e02e62b5621c625aa6d388d3a357e7ee013e74a00fcf53ef68f31d19605
diff --git a/PKGBUILD b/PKGBUILD
index e59b8dcf4ab2..e066ccb32977 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,42 +2,40 @@
# Contributor: Natalia Portillo <claunia@clania.com>
pkgname=rpcemu
pkgver=0.9.3
-pkgrel=1
+pkgrel=2
pkgdesc="An Emulator of classic Acorn computer systems, such as the Risc PC and A7000"
url="http://www.marutan.net/rpcemu/"
arch=('x86_64' 'i686')
license=('GPL2')
makedepends=('qt5-base')
+optdepends=('apulse: PulseAudio emulation for ALSA'
+ 'lib32-apulse: PulseAudio emulation for ALSA (32-bit)')
+backup=('usr/share/rpcemu/rpc.cfg')
+install="$pkgname.install"
source=("http://www.marutan.net/rpcemu/cgi/download.php?sFName=${pkgver}/rpcemu-${pkgver}.tar.gz")
sha256sums=('33b89e02e62b5621c625aa6d388d3a357e7ee013e74a00fcf53ef68f31d19605')
-install="$pkgname.install"
-backup=('usr/share/rpcemu/rpc.cfg')
-
-# dynarec/recompiler is the default (_verbool=0)
-# set _verbool=1 for "interpreter"
-_verbool=0
+_pkgnames=("rpcemu-recompiler" "rpcemu-interpreter")
-if [ "$_verbool" -eq 0 ]; then
- _pkgname="rpcemu-recompiler"
-else
- _pkgname="rpcemu-interpreter"
-fi
-
-prepare() {
- if [ "$_verbool" -eq 0 ]; then
- sed -e "s/CONFIG += debug_and_release/CONFIG += debug_and_release dynarec/" \
- -i "$srcdir/${pkgname}-${pkgver}/src/qt5/rpcemu.pro"
- fi
-}
+# set the _bool variable for whether you want rpcemu-recompiler (_bool=0)
+# or rpcemu-interpreter (_bool=1) to be used in the run script
+_bool=0
+# set _apulse to anything (e.g. "1") for non-pulseaudio users using apulse to
+# be able to use ALSA for audio in the emulator
+_apulse=
build() {
# need to add "-fcommon". GCC 10 has apparently changed how multiple symbols
# defined in different sources are dealt with by default
export CFLAGS="$CFLAGS -fcommon"
-
+ # build rpcemu-interpreter first...
cd "$srcdir/${pkgname}-${pkgver}/src/qt5"
qmake-qt5
make
+ # now build rpcemu-recompiler
+ sed -e "s/CONFIG += debug_and_release/CONFIG += debug_and_release dynarec/" \
+ -i "$srcdir/${pkgname}-${pkgver}/src/qt5/rpcemu.pro"
+ qmake-qt5
+ make
}
package() {
@@ -53,15 +51,19 @@ package() {
# install as provided
install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 {cmos.ram,readme.txt,rpc.cfg} -t "$_basedir"
- install -Dm755 "$_pkgname" "$_basedir/$_pkgname"
- cp -a "hostfs" "poduleroms" "riscos-progs" "roms" "$_basedir"
+ install -Dm755 "${_pkgnames[@]}" "$_basedir"
+ cp -R "hostfs" "netroms" "poduleroms" "riscos-progs" "roms" "$_basedir"
+
+ # create a script to set working directory (to find rom) and run ${_pkgnames[$_bool]}
+ # and apply optional use of apulse. Note: dirname and readlink are used for
+ # portability (i.e. relocating install for using multiple RISCOS versions)
+ echo -e '#!/bin/sh'"\n"'cd "$(dirname "$(readlink -f "$0")")"'"\n${_apulse:+apulse }./${_pkgnames[$_bool]}" >"$_basedir/$pkgname"
- # create a script to set working directory (to find roms) and run $_pkgname
- echo -e '#!/bin/sh'"\ncd $_systdir/$pkgname\n./$_pkgname" >"$_basedir/$pkgname"
chmod 755 "$_basedir/$pkgname"
ln -s "$_systdir/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
# these must be writable (group) for rpcemu to function
- chown root:users -R "$_basedir"
- chmod g+w "$_basedir"/{cmos.ram,rpc.cfg,roms,hostfs,hostfs/Network}
+ # make sure you're in the "users" group!
+ chown -R root:users "$_basedir"
+ chmod -R g+w "$_basedir"/{cmos.ram,rpc.cfg,roms,hostfs}
}