mame/mame.spec

303 lines
9.5 KiB
RPMSpec
Raw Permalink Normal View History

%define tagver %(echo %version | tr -d .)
Name: mame
Version: 0.245
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://sdlmame.wallyweek.org/
Source: https://gitlab.com/mamedev/mame.git/mame%{tagver}/mame-%{version}.tar.bz2
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libSDL2-devel
BuildRequires: libSDL2_ttf-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-devel
BuildRequires: liblua-devel
BuildRequires: libportaudio-devel
BuildRequires: libportmidi-devel
BuildRequires: libpulseaudio-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libutf8proc-devel
BuildRequires: libz-devel
BuildRequires: pugixml-devel
BuildRequires: qt5-qtbase-devel
## AUTOBUILDREQ-END
BuildRequires: python3
BuildRequires: librapidjson-devel
BuildRequires: liblua53-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
# Use system libraries
sed -e 's|\# USE_SYSTEM_LIB|USE_SYSTEM_LIB|g' -i makefile
# except for asio
sed -e 's|USE_SYSTEM_LIB_ASIO|\# USE_SYSTEM_LIB_ASIO|g' -i makefile
# Hack to force linking to lua5.3
mkdir lib
ln -s %{_libdir}/liblua5.3.so lib/liblua.so
# 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
export CFLAGS+="-I%{_includedir}/lua5.3/"
export CXXFLAGS+="-I%{_includedir}/lua5.3/"
export LDFLAGS+=" -L${PWD}/lib"
%make_build -j2 \
PYTHON_EXECUTABLE=%{__python3} \
NOWERROR=1 \
OPTIMIZE=2 \
TOOLS=1 \
ARCHOPTS=-flifetime-dse=1 \
OPT_FLAGS="$RPM_OPT_FLAGS" \
LDOPTS="$RPM_LD_FLAGS"
#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
* 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