RetroArch/Packaging
Application
Build parameters
RetroArch has many build options. Many useful features are disabled by default. Please check this file for all available parameters and their default values.
Configuration patch
The default configuration looks for cores, assets and database in users' home directory. This means users have to manually download many things to make it work. The patch will change these directories to:
- Cores: /usr/lib64/libretro
- Assets: /usr/share/libretro/assets
- Joystick auto config: /usr/share/libretro/autoconfig
- Core info: /usr/share/libretro/coreinfo
- Database: /usr/share/libretro/database
Data packages
Every time you update retroarch package, make sure to update the following packages at the same time:
- retroarch-assets
- retroarch-joypad-autoconfig
- libretro-core-info
- libretro-database
retroarch-assets and retroarch-joypad-autoconfig are required even without any cores. So they are prefixed with retroarch-. libretro-core-info and libretro-database are related to emulation cores. So the package name has libretro- prefix.
Cores
How to build
The official build script is the best information for packaging cores.
- x64 (main)
- x86 (optional, for 32bit specific compiler options)
- arm7neonhf (optional, for arm specific compiler options)
- arm7neonhf (optional, for arm specific compiler options)
- recipes.info (explain how the recipe is structured)
Each line of the build recipes is configuration of a core.
nestopia uses Makefile without much options
nestopia libretro-nestopia https://github.com/libretro/nestopia.git master YES GENERIC Makefile libretro
- CORENAME: nestopia (generated binary is nestopia_libretro.so)
- COREDIR: libretro-nestopia (use it as package name)
- URL: https://github.com/libretro/nestopia.git
- BRANCH: master (URL and BRANCH is used in _service file, only git version, no release tags)
- ENABLED: YES (if it is NO, we don't need to package it)
- COMMAND: GENERIC (GENERIC means make, CMAKE means cmake && make)
- MAKEFILE: Makefile (if it is
Makefile.libretro
, we need to runmake -f Makefile.libretro
) - SUBDIR: libretro (if it is not
.
, we need tocd
to this directory before build) - ARGS: - (if any, put it in your make command)
Here is a script and generated spec files: https://github.com/guoyunhe/libretro-packaging You may need to add some extra build dependencies. For example, Mesa-devel is required for emulator cores that support 3D graphics.
Each core is compiled to a single *_libretro.so file, which should be installed at /usr/lib64/libretro/
directory (/usr/lib/libretro/
on 32 bit system).
License
Note, every core has its own license. And some are not even FOSS.
- cannonball core is a non-free OutRun remake. We just skipped it. Users can play original OutRun through MAME core.
- MAME (latest) is GPL licensed. But MAME 2003 ~ MAME 2010 are not.