summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Slipchenko2019-01-20 21:20:56 +0300
committerSergey Slipchenko2019-01-20 21:20:56 +0300
commit2d38fc5ec160afd07d0bdaac1cfacdddd19bb283 (patch)
treea0ed5a2ee996d826c469ed6ca0c6f24cffee096a
parenta6b22ef046fa49448f837dc77bc7daabea106bba (diff)
downloadaur-2d38fc5ec160afd07d0bdaac1cfacdddd19bb283.tar.gz
More optimal build for usage on Raspberry Pi
-rw-r--r--.SRCINFO28
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD69
-rw-r--r--config.patch (renamed from retroarch-config.patch)28
-rw-r--r--service13
-rw-r--r--sysusers.conf1
-rw-r--r--tmpfiles.conf1
7 files changed, 64 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8bce71bb010..bbebef366a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,20 @@
pkgbase = retroarch-rbp
pkgdesc = Reference frontend for the libretro API (Raspberry Pi)
pkgver = 1.7.5
- pkgrel = 1.1
+ pkgrel = 2
url = http://www.libretro.com/
arch = armv7h
groups = libretro
license = GPL
- makedepends = git
makedepends = vulkan-icd-loader
depends = alsa-lib
depends = gcc-libs
depends = glibc
depends = libdrm
depends = libgl
- depends = libpulse
- depends = libx11
- depends = libxcb
- depends = libxext
- depends = libxinerama
- depends = libxkbcommon
- depends = libxv
- depends = libxxf86vm
depends = raspberrypi-firmware
depends = openal
- depends = qt5-base
- depends = sdl2
depends = v4l-utils
- depends = wayland
depends = zlib
depends = libass.so
depends = libavcodec.so
@@ -44,10 +32,16 @@ pkgbase = retroarch-rbp
provides = retroarch
conflicts = retroarch
backup = etc/retroarch.cfg
- source = git+https://github.com/libretro/RetroArch.git#tag=v1.7.5
- source = retroarch-config.patch
- sha256sums = SKIP
- sha256sums = d79c542c126b74a1b221fcc1acbe053b95f76c6c9a6ccefd10b8f459ceee94dd
+ source = https://github.com/libretro/RetroArch/archive/v1.7.5.tar.gz
+ source = config.patch
+ source = service
+ source = sysusers.conf
+ source = tmpfiles.conf
+ sha256sums = 89dae3646e4979b8685cae987eaa09816ac94bfb10d2636a2e7a8eede5fcbfa3
+ sha256sums = b8e0909c4cdfc4dd22dd48631ba95cc1838398da853d442f0ac486d69cba6fd6
+ sha256sums = 2e0fd9b160f66ed69630d562ecc0c7db06802d6373305e951f5ffecbdfc93cfb
+ sha256sums = d4e4a5ac6c961eafb3edfc28186f75e471dc81e308791d57cfccae4f43de4dae
+ sha256sums = e6055a91ca94379f63ff4e8437c085f8f64896a6ce2dd242c36954e48b60d29c
pkgname = retroarch-rbp
diff --git a/.gitignore b/.gitignore
index 3f9d63fd4c3..eb0d0f43fa7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/pkg
/src
/*.pkg.tar.xz
+/*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index fd8bcee08b6..92e6c1e496c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,8 @@
-# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
-# Contributor: Themaister <maister@archlinux.us>
-# Contributor: lifning <definelightning@gmail.com>
-
-# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
-# - enable GLES
-
-# Sergey Slipchenko <faergeek@gmail.com>
-# - add videocore paths to PKG_CONFIG_PATH
-# - enable neon
-# - enable floathard
-# - enable videocore
-
-buildarch=4
+# Maintainer: Sergey Slipchenko <faergeek@gmail.com>
pkgname=retroarch-rbp
pkgver=1.7.5
-pkgrel=1.1
+pkgrel=2
pkgdesc='Reference frontend for the libretro API (Raspberry Pi)'
arch=('armv7h')
url='http://www.libretro.com/'
@@ -23,57 +10,65 @@ license=('GPL')
groups=('libretro')
provides=('retroarch')
conflicts=('retroarch')
-depends=('alsa-lib' 'gcc-libs' 'glibc' 'libdrm' 'libgl' 'libpulse' 'libx11'
- 'libxcb' 'libxext' 'libxinerama' 'libxkbcommon' 'libxv' 'libxxf86vm'
- 'raspberrypi-firmware' 'openal' 'qt5-base' 'sdl2' 'v4l-utils' 'wayland' 'zlib'
+depends=('alsa-lib' 'gcc-libs' 'glibc' 'libdrm' 'libgl'
+ 'raspberrypi-firmware' 'openal' 'v4l-utils' 'zlib'
'libass.so' 'libavcodec.so' 'libavformat.so' 'libavutil.so'
'libfreetype.so' 'libswresample.so' 'libswscale.so' 'libudev.so'
'libusb-1.0.so')
-makedepends=('git' 'vulkan-icd-loader')
+makedepends=('vulkan-icd-loader')
optdepends=('libretro-overlays: Collection of overlays'
'libretro-shaders: Collection of shaders'
'python: retroarch-cg2glsl'
'retroarch-assets-xmb: XMB menu assets')
backup=('etc/retroarch.cfg')
-source=("git+https://github.com/libretro/RetroArch.git#tag=v${pkgver}"
- 'retroarch-config.patch')
-sha256sums=('SKIP'
- 'd79c542c126b74a1b221fcc1acbe053b95f76c6c9a6ccefd10b8f459ceee94dd')
+source=("https://github.com/libretro/RetroArch/archive/v${pkgver}.tar.gz"
+ 'config.patch'
+ 'service'
+ 'sysusers.conf'
+ 'tmpfiles.conf')
+sha256sums=('89dae3646e4979b8685cae987eaa09816ac94bfb10d2636a2e7a8eede5fcbfa3'
+ 'b8e0909c4cdfc4dd22dd48631ba95cc1838398da853d442f0ac486d69cba6fd6'
+ '2e0fd9b160f66ed69630d562ecc0c7db06802d6373305e951f5ffecbdfc93cfb'
+ 'd4e4a5ac6c961eafb3edfc28186f75e471dc81e308791d57cfccae4f43de4dae'
+ 'e6055a91ca94379f63ff4e8437c085f8f64896a6ce2dd242c36954e48b60d29c')
prepare() {
- cd RetroArch
+ cd RetroArch-${pkgver}
- #patch -Np0 -i ../retroarch-config.patch
+ patch -Np1 -i ../config.patch
}
build() {
- cd RetroArch
+ cd RetroArch-${pkgver}
- export PKG_CONFIG_PATH="/opt/vc/lib/pkgconfig:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH="/opt/vc/lib/pkgconfig:${PKG_CONFIG_PATH}"
./configure \
- --prefix='/usr' \
+ --prefix=/usr \
--disable-cg \
--disable-jack \
--disable-oss \
+ --disable-pulse \
+ --disable-qt \
--disable-sdl \
+ --disable-sdl2 \
+ --disable-vg \
+ --disable-wayland \
+ --disable-x11 \
+ --enable-dispmanx \
--enable-opengles \
--enable-neon \
--enable-floathard \
--enable-videocore
make
- make -C libretro-common/audio/dsp_filters
- make -C gfx/video_filters
}
package() {
- cd RetroArch
+ cd RetroArch-${pkgver}
- make DESTDIR="${pkgdir}" install
-
- install -Dm 644 libretro-common/audio/dsp_filters/*.{dsp,so} -t "${pkgdir}"/usr/lib/retroarch/filters/audio/
- install -Dm 644 gfx/video_filters/*.{filt,so} -t "${pkgdir}"/usr/lib/retroarch/filters/video/
+ make DESTDIR=${pkgdir} install
+ install -Dm 644 ${srcdir}/service ${pkgdir}/usr/lib/systemd/system/retroarch.service
+ install -Dm 644 ${srcdir}/sysusers.conf ${pkgdir}/usr/lib/sysusers.d/retroarch.conf
+ install -Dm 644 ${srcdir}/tmpfiles.conf ${pkgdir}/usr/lib/tmpfiles.d/retroarch.conf
}
-
-# vim: ts=2 sw=2 et:
diff --git a/retroarch-config.patch b/config.patch
index 83445166b58..d06869f30dd 100644
--- a/retroarch-config.patch
+++ b/config.patch
@@ -1,7 +1,6 @@
-diff -rupN RetroArch.orig/retroarch.cfg RetroArch/retroarch.cfg
---- RetroArch.orig/retroarch.cfg 2018-08-31 11:42:23.948303726 +0200
-+++ RetroArch/retroarch.cfg 2018-08-31 11:46:13.736652832 +0200
-@@ -621,7 +621,7 @@
+--- RetroArch.orig/retroarch.cfg 2019-01-20 20:13:47.669304709 +0300
++++ RetroArch/retroarch.cfg 2019-01-20 20:20:02.188091209 +0300
+@@ -625,7 +625,7 @@
# menu_show_online_updater = true
# If disabled, will hide the ability to update cores (and core info files) inside the menu.
@@ -10,7 +9,7 @@ diff -rupN RetroArch.orig/retroarch.cfg RetroArch/retroarch.cfg
# If disabled, the libretro core will keep running in the background when we
# are in the menu.
-@@ -750,7 +750,7 @@
+@@ -754,7 +754,7 @@
# Assets directory. This location is queried by default when menu interfaces try to look for
# loadable assets, etc.
@@ -19,7 +18,7 @@ diff -rupN RetroArch.orig/retroarch.cfg RetroArch/retroarch.cfg
# Dynamic wallpapers directory. The place to store the wallpapers dynamically
# loaded by the menu depending on context.
-@@ -763,10 +763,10 @@
+@@ -767,10 +767,10 @@
# rgui_browser_directory =
# Core directory for libretro core implementations.
@@ -32,20 +31,3 @@ diff -rupN RetroArch.orig/retroarch.cfg RetroArch/retroarch.cfg
# Path to content database directory.
# content_database_path =
-@@ -778,13 +778,13 @@
- # cheat_database_path =
-
- # Defines a directory where CPU-based video filters are kept.
--# video_filter_dir =
-+video_filter_dir = /usr/lib/retroarch/filters/video
-
- # Directory where DSP plugins are kept.
--# audio_filter_dir =
-+audio_filter_dir = /usr/lib/retroarch/filters/audio
-
- # Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access.
--# video_shader_dir =
-+ video_shader_dir = /usr/share/libretro/shaders
-
- # Recording output directory. Where recordings are saved.
- # recording_output_directory =
diff --git a/service b/service
new file mode 100644
index 00000000000..a991141595f
--- /dev/null
+++ b/service
@@ -0,0 +1,13 @@
+[Unit]
+Description = Starts an instance of Retroarch
+After = remote-fs.target
+
+[Service]
+User = retroarch
+Group = retroarch
+Type = simple
+ExecStart = /usr/bin/retroarch
+Restart = on-failure
+
+[Install]
+WantedBy = multi-user.target
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 00000000000..54981dc847b
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u retroarch /sbin/nologin "Retroarch user" /var/lib/retroarch
diff --git a/tmpfiles.conf b/tmpfiles.conf
new file mode 100644
index 00000000000..4dac69e182c
--- /dev/null
+++ b/tmpfiles.conf
@@ -0,0 +1 @@
+d /var/lib/retroarch 0755 retroarch retroarch