383 lines
12 KiB
RPMSpec
383 lines
12 KiB
RPMSpec
%define tagver %(echo %version | tr -d .)
|
|
Name: mame
|
|
Version: 0.272
|
|
Release: 1mamba
|
|
Summary: A virtual environment where you can run software written for other platforms, namely old arcades
|
|
Group: Applications/Emulators
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://www.mamedev.org/
|
|
Source: https://gitlab.com/mamedev/mame.git/mame%{tagver}/mame-%{version}.tar.bz2
|
|
License: BSD
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libQt6Core
|
|
BuildRequires: libQt6Gui
|
|
BuildRequires: libQt6Widgets
|
|
BuildRequires: libSDL2-devel
|
|
BuildRequires: libX11-devel
|
|
BuildRequires: libXext-devel
|
|
BuildRequires: libXi-devel
|
|
BuildRequires: libXinerama-devel
|
|
BuildRequires: libalsa-devel
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libflac-devel
|
|
BuildRequires: libfontconfig-devel
|
|
BuildRequires: libfreetype-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libglvnd-devel
|
|
BuildRequires: libjpeg-turbo
|
|
BuildRequires: libportaudio-devel
|
|
BuildRequires: libportmidi-devel
|
|
BuildRequires: libpulseaudio-devel
|
|
BuildRequires: libsdl2_ttf-devel
|
|
BuildRequires: libsqlite-devel
|
|
BuildRequires: libstdc++6-devel
|
|
BuildRequires: libutf8proc-devel
|
|
BuildRequires: libwayland-egl-devel
|
|
BuildRequires: libz-devel
|
|
BuildRequires: libzstd-devel
|
|
BuildRequires: pugixml-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: libportmidi-devel >= 1:2.0.4-1mamba
|
|
BuildRequires: libutf8proc-devel >= 2.9.0-1mamba
|
|
BuildRequires: python3
|
|
BuildRequires: librapidjson-devel
|
|
Requires: %{name}-data = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description
|
|
MAME stands for "Multiple Arcade Machine Emulator". It provides a virtual environment where you can run software written for other platforms, namely old arcades.
|
|
|
|
%package tools
|
|
Group: Applications/Games
|
|
Summary: Additional tools for MAME
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description tools
|
|
%{summary}.
|
|
|
|
%package data
|
|
Group: Applications/Games
|
|
Summary: Data files used by MAME
|
|
|
|
%description data
|
|
%{summary}.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q
|
|
#-D -T
|
|
#:<< _EOF
|
|
#remove system libs or document themes to ensure system ones are used
|
|
#remove 3rdparty code not needed on Linux
|
|
rm -rf \
|
|
3rdparty/asio \
|
|
3rdparty/compat \
|
|
3rdparty/dxsdk \
|
|
3rdparty/expat \
|
|
3rdparty/glm \
|
|
3rdparty/flac \
|
|
3rdparty/libjpeg \
|
|
3rdparty/portaudio \
|
|
3rdparty/portmidi \
|
|
3rdparty/pugixml \
|
|
3rdparty/rapidjson \
|
|
3rdparty/sqlite3 \
|
|
3rdparty/tap-windows6 \
|
|
3rdparty/utf8proc \
|
|
3rdparty/zlib \
|
|
3rdparty/zstd \
|
|
docs/themes
|
|
|
|
# Create ini file
|
|
cat > %{name}.ini << EOF
|
|
# Define multi-user paths
|
|
artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects
|
|
bgfx_path %{_datadir}/%{name}/bgfx
|
|
cheatpath %{_datadir}/%{name}/cheat
|
|
crosshairpath %{_datadir}/%{name}/crosshair
|
|
ctrlrpath %{_datadir}/%{name}/ctrlr
|
|
fontpath %{_datadir}/%{name}/fonts
|
|
hashpath %{_datadir}/%{name}/hash
|
|
languagepath %{_datadir}/%{name}/language
|
|
pluginspath %{_datadir}/%{name}/plugins
|
|
rompath %{_datadir}/%{name}/roms;%{_datadir}/%{name}/chds
|
|
samplepath %{_datadir}/%{name}/samples
|
|
|
|
# Allow user to override ini settings
|
|
inipath \$HOME/.%{name}/ini;%{_sysconfdir}/%{name}
|
|
|
|
# Set paths for local storage
|
|
cfg_directory \$HOME/.%{name}/cfg
|
|
comment_directory \$HOME/.%{name}/comments
|
|
diff_directory \$HOME/.%{name}/diff
|
|
input_directory \$HOME/.%{name}/inp
|
|
nvram_directory \$HOME/.%{name}/nvram
|
|
snapshot_directory \$HOME/.%{name}/snap
|
|
state_directory \$HOME/.%{name}/sta
|
|
|
|
# openmamba custom defaults
|
|
video opengl
|
|
autosave 1
|
|
EOF
|
|
|
|
%build
|
|
#:<< _EOF
|
|
|
|
# From Fedora
|
|
#standard -g caused problems with OOM or relocation overflows
|
|
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@")
|
|
#32-bit architectures need even more measures
|
|
%ifarch %{ix86} arm
|
|
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed "s@-O2@-Os@")
|
|
RPM_LD_FLAGS="$RPM_LD_FLAGS -Wl,--no-keep-memory -fuse-ld=gold"
|
|
%endif
|
|
|
|
%make \
|
|
PYTHON_EXECUTABLE=%{__python3} \
|
|
NOWERROR=1 \
|
|
OPTIMIZE=2 \
|
|
VERBOSE=1 \
|
|
TOOLS=1 \
|
|
QT_HOME=%{_libdir}/qt6 \
|
|
USE_SYSTEM_LIB_ASIO=1 \
|
|
USE_SYSTEM_LIB_EXPAT=1 \
|
|
USE_SYSTEM_LIB_FLAC=1 \
|
|
USE_SYSTEM_LIB_GLM=1 \
|
|
USE_SYSTEM_LIB_JPEG=1 \
|
|
USE_SYSTEM_LIB_PORTAUDIO=1 \
|
|
USE_SYSTEM_LIB_PORTMIDI=1 \
|
|
USE_SYSTEM_LIB_PUGIXML=1 \
|
|
USE_SYSTEM_LIB_RAPIDJSON=1 \
|
|
USE_SYSTEM_LIB_SQLITE3=1 \
|
|
USE_SYSTEM_LIB_UTF8PROC=1 \
|
|
USE_SYSTEM_LIB_ZLIB=1 \
|
|
USE_SYSTEM_LIB_ZSTD=1 \
|
|
USE_WAYLAND=1 \
|
|
ARCHOPTS=-flifetime-dse=1 \
|
|
LDOPTS="$RPM_LD_FLAGS" \
|
|
OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
|
|
# OPT_FLAGS="$RPM_OPT_FLAGS" \
|
|
#%ifarch %{ix86} arm
|
|
# LDOPTS="$RPM_LD_FLAGS"
|
|
#%endif
|
|
|
|
#cd docs
|
|
#% make html
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
# create directories
|
|
install -d %{buildroot}%{_sysconfdir}/%{name}
|
|
for folder in cfg comments diff ini inp memcard nvram snap sta
|
|
do
|
|
install -d %{buildroot}%{_sysconfdir}/skel/.%{name}/$folder
|
|
done
|
|
|
|
for folder in artwork bgfx chds cheats ctrlr effects fonts hash language \
|
|
plugins keymaps roms samples shader
|
|
do
|
|
install -d %{buildroot}%{_datadir}/%{name}/$folder
|
|
done
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
install -d %{buildroot}%{_mandir}/man6
|
|
|
|
# install files
|
|
install -pm 644 %{name}.ini %{buildroot}%{_sysconfdir}/%{name}
|
|
install -D -pm 755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
ln -s mame %{buildroot}%{_bindir}/sdlmame
|
|
|
|
install -pm 755 castool chdman floptool imgtool jedutil ldresample ldverify \
|
|
nltool nlwav pngcmp romcmp unidasm %{buildroot}%{_bindir}
|
|
for tool in regrep split srcclean
|
|
do
|
|
install -pm 755 $tool %{buildroot}%{_bindir}/%{name}-$tool
|
|
done
|
|
pushd artwork
|
|
find -type d -exec install -d %{buildroot}%{_datadir}/%{name}/artwork/{} \;
|
|
find -type f -exec install -pm 644 {} %{buildroot}%{_datadir}/%{name}/artwork/{} \;
|
|
popd
|
|
pushd bgfx
|
|
find -type d -a ! -wholename \*dx\* -a ! -wholename \*metal\* -exec install -d %{buildroot}%{_datadir}/%{name}/bgfx/{} \;
|
|
find -type f -a ! -wholename \*dx\* -a ! -wholename \*metal\* -exec install -pm 644 {} %{buildroot}%{_datadir}/%{name}/bgfx/{} \;
|
|
popd
|
|
install -pm 644 hash/* %{buildroot}%{_datadir}/%{name}/hash
|
|
install -pm 644 keymaps/* %{buildroot}%{_datadir}/%{name}/keymaps
|
|
pushd language
|
|
find -type d -exec install -d %{buildroot}%{_datadir}/%{name}/language/{} \;
|
|
find -type f -name \*.mo -exec install -pm 644 {} %{builroot}%{_datadir}/%{name}/language/{} \;
|
|
# flag the translation files as %%lang
|
|
grep -r --include=*.po Language: | grep -v Source | sed -r 's@(.*)/strings\.po:".*Language: ([[:alpha:]]{2}(_[[:alpha:]]{2})?)\\n"@%lang(\2) %{_datadir}/%{name}/language/\1@' > ../%{name}.lang
|
|
popd
|
|
pushd plugins
|
|
find -type d -exec install -d %{buildroot}%{_datadir}/%{name}/plugins/{} \;
|
|
find -type f -exec install -pm 644 {} %{buildroot}%{_datadir}/%{name}/plugins/{} \;
|
|
popd
|
|
pushd src/osd/modules/opengl
|
|
install -pm 644 shader/*.?sh %{buildroot}%{_datadir}/%{name}/shader
|
|
popd
|
|
pushd docs/man
|
|
install -pm 644 castool.1 chdman.1 imgtool.1 floptool.1 jedutil.1 ldresample.1 \
|
|
ldplayer.1 ldverify.1 romcmp.1 %{buildroot}%{_mandir}/man1
|
|
install -pm 644 mame.6 %{buildroot}%{_mandir}/man6
|
|
popd
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
|
|
%dir %{_sysconfdir}/%{name}
|
|
%{_sysconfdir}/skel/.%{name}
|
|
%{_bindir}/mame
|
|
%{_bindir}/sdlmame
|
|
%{_mandir}/man6/mame.6*
|
|
%doc COPYING
|
|
|
|
%files tools
|
|
%defattr(-,root,root)
|
|
%{_bindir}/castool
|
|
%{_bindir}/chdman
|
|
%{_bindir}/floptool
|
|
%{_bindir}/imgtool
|
|
%{_bindir}/jedutil
|
|
%{_bindir}/ldresample
|
|
%{_bindir}/ldverify
|
|
%{_bindir}/nltool
|
|
%{_bindir}/nlwav
|
|
%{_bindir}/pngcmp
|
|
%{_bindir}/%{name}-regrep
|
|
%{_bindir}/romcmp
|
|
%{_bindir}/%{name}-split
|
|
%{_bindir}/%{name}-srcclean
|
|
%{_bindir}/unidasm
|
|
%{_mandir}/man1/castool.1*
|
|
%{_mandir}/man1/chdman.1*
|
|
%{_mandir}/man1/floptool.1*
|
|
%{_mandir}/man1/imgtool.1*
|
|
%{_mandir}/man1/jedutil.1*
|
|
%{_mandir}/man1/ldplayer.1*
|
|
%{_mandir}/man1/ldresample.1*
|
|
%{_mandir}/man1/ldverify.1*
|
|
%{_mandir}/man1/romcmp.1*
|
|
|
|
%files data -f %{name}.lang
|
|
%defattr(-,root,root)
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/%{name}/artwork
|
|
%{_datadir}/%{name}/bgfx
|
|
%{_datadir}/%{name}/chds
|
|
%{_datadir}/%{name}/cheats
|
|
%{_datadir}/%{name}/effects
|
|
%{_datadir}/%{name}/fonts
|
|
%{_datadir}/%{name}/keymaps
|
|
%dir %{_datadir}/%{name}/language
|
|
%{_datadir}/%{name}/plugins
|
|
%{_datadir}/%{name}/roms
|
|
%{_datadir}/%{name}/samples
|
|
%{_datadir}/%{name}/shader
|
|
%{_datadir}/%{name}/hash
|
|
%license COPYING docs/legal/*
|
|
|
|
%changelog
|
|
* Sun Dec 01 2024 Automatic Build System <autodist@openmamba.org> 0.272-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Nov 16 2024 Automatic Build System <autodist@mambasoft.it> 0.271-2mamba
|
|
- rebuilt by autoport with build requirements: libportmidi-devel>=1:2.0.4-1mamba
|
|
|
|
* Fri Nov 01 2024 Automatic Build System <autodist@openmamba.org> 0.271-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Sep 27 2024 Automatic Build System <autodist@openmamba.org> 0.270-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Aug 29 2024 Automatic Build System <autodist@openmamba.org> 0.269-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Jul 31 2024 Automatic Build System <autodist@openmamba.org> 0.268-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Jul 06 2024 Automatic Build System <autodist@openmamba.org> 0.267-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Feb 06 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 0.262-1mamba
|
|
- update to 0.262
|
|
|
|
* Sat Nov 18 2023 Automatic Build System <autodist@mambasoft.it> 0.252-2mamba
|
|
- rebuilt by autoport with build requirements: libutf8proc-devel>=2.9.0-1mamba
|
|
|
|
* Wed Feb 22 2023 Automatic Build System <autodist@mambasoft.it> 0.252-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Dec 31 2022 Automatic Build System <autodist@mambasoft.it> 0.251-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Nov 30 2022 Automatic Build System <autodist@mambasoft.it> 0.250-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Oct 28 2022 Automatic Build System <autodist@mambasoft.it> 0.249-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Sep 28 2022 Automatic Build System <autodist@mambasoft.it> 0.248-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Sep 01 2022 Automatic Build System <autodist@mambasoft.it> 0.247-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon Aug 01 2022 Automatic Build System <autodist@mambasoft.it> 0.246-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Jul 15 2022 Automatic Build System <autodist@mambasoft.it> 0.245-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Apr 30 2022 Automatic Build System <autodist@mambasoft.it> 0.243-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Apr 02 2022 Automatic Build System <autodist@mambasoft.it> 0.242-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Feb 25 2022 Automatic Build System <autodist@mambasoft.it> 0.241-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Jan 30 2022 Automatic Build System <autodist@mambasoft.it> 0.240-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Jan 09 2022 Automatic Build System <autodist@mambasoft.it> 0.239-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Nov 24 2021 Automatic Build System <autodist@mambasoft.it> 0.238-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Oct 27 2021 Automatic Build System <autodist@mambasoft.it> 0.237-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Sep 30 2021 Automatic Build System <autodist@mambasoft.it> 0.236-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Aug 27 2021 Automatic Build System <autodist@mambasoft.it> 0.235-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Jul 28 2021 Automatic Build System <autodist@mambasoft.it> 0.234-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Jul 01 2021 Automatic Build System <autodist@mambasoft.it> 0.233-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun May 30 2021 Automatic Build System <autodist@mambasoft.it> 0.232-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon May 10 2021 Automatic Build System <autodist@mambasoft.it> 0.231-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Mar 09 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 0.229-1mamba
|
|
- update to 0.229
|
|
|
|
* Sun Dec 29 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.151-1mamba
|
|
- package created using the webbuild interface
|