1 |
neoclust |
1139909 |
#The debug build is disabled by default, please use # --with debug to override |
2 |
matteo |
619589 |
%bcond_with debug |
3 |
|
|
|
4 |
neoclust |
1139904 |
%global baseversion 188 |
5 |
matteo |
619589 |
|
6 |
|
|
Name: mame |
7 |
|
|
Version: 0.%{baseversion} |
8 |
joequant |
1041000 |
Release: %mkrel 1 |
9 |
neoclust |
1139909 |
Group: Games/Arcade |
10 |
matteo |
619589 |
Summary: Multiple Arcade Machine Emulator |
11 |
neoclust |
1139909 |
|
12 |
|
|
#LGPLv2+: |
13 |
|
|
#src/mame/audio/snes_snd.cpp: LGPL (v2 or later) |
14 |
|
|
#src/devices/sound/tiasound.cpp: LGPL (v2) (with incorrect FSF address) |
15 |
|
|
#src/devices/sound/tiasound.h: LGPL (v2) (with incorrect FSF address) |
16 |
|
|
# |
17 |
|
|
#ASL 2.0 |
18 |
|
|
#3rdparty/bgfx |
19 |
|
|
|
20 |
|
|
License: GPLv2+ and LGPLv2+ and ASL 2.0 |
21 |
matteo |
619589 |
URL: http://mamedev.org/ |
22 |
neoclust |
1139909 |
Source0: https://github.com/mamedev/%{name}/releases/download/%{name}0%{baseversion}/%{name}0%{baseversion}s.exe |
23 |
joequant |
1020270 |
Source1: http://mamedev.org/releases/whatsnew_0%{baseversion}.txt |
24 |
matteo |
619589 |
Patch0: %{name}-fortify.patch |
25 |
neoclust |
1139906 |
Patch1: %{name}-genie-systemlua.patch |
26 |
matteo |
619589 |
|
27 |
joequant |
1020270 |
BuildRequires: expat-devel |
28 |
|
|
BuildRequires: libflac-devel |
29 |
|
|
BuildRequires: fontconfig-devel |
30 |
|
|
BuildRequires: libjpeg-devel |
31 |
|
|
BuildRequires: libuv-devel |
32 |
neoclust |
1140004 |
BuildRequires: lua5.3-devel >= 5.3.0 |
33 |
matteo |
619589 |
BuildRequires: p7zip |
34 |
joequant |
1020270 |
BuildRequires: portaudio-devel |
35 |
matteo |
619589 |
BuildRequires: portmidi-devel |
36 |
|
|
BuildRequires: python |
37 |
joequant |
1020270 |
BuildRequires: libqt5-devel |
38 |
|
|
BuildRequires: sdl2_ttf-devel |
39 |
|
|
BuildRequires: sqlite3-devel |
40 |
matteo |
619589 |
BuildRequires: zlib-devel |
41 |
joequant |
1020270 |
BuildRequires: libxinerama-devel |
42 |
neoclust |
1139994 |
BuildRequires: utf8proc-devel |
43 |
neoclust |
1139998 |
BuildRequires: python-sphinx |
44 |
neoclust |
1140002 |
BuildRequires: python-sphinx_rtd_theme |
45 |
|
|
|
46 |
matteo |
619589 |
Requires: %{name}-data = %{version}-%{release} |
47 |
|
|
|
48 |
neoclust |
1139909 |
#bx and bgfx are not made to be linked to dynamically as per http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=104437 |
49 |
|
|
Provides: bundled(bx) |
50 |
joequant |
1020270 |
Provides: bundled(bgfx) |
51 |
neoclust |
1139909 |
#fedora contains linenoise package but it is not compatible |
52 |
|
|
Provides: bundled(linenoise) |
53 |
|
|
#Below have no fedora packages ATM and are very tiny |
54 |
joequant |
1020270 |
Provides: bundled(lsqlite3) |
55 |
|
|
Provides: bundled(luafilesystem) |
56 |
neoclust |
1139909 |
Provides: bundled(lua-linenoise) |
57 |
joequant |
1020270 |
Provides: bundled(lua-zlib) |
58 |
neoclust |
1139909 |
#lzma is not made to be linked dynamically |
59 |
|
|
Provides: bundled(lzma-sdk) = 16.04 |
60 |
|
|
#softfloat is not made to be linked dynamically |
61 |
joequant |
1020270 |
Provides: bundled(softfloat) |
62 |
neoclust |
1139909 |
#ldplayer has been turned into a regular mame driver in 0.180 cycle |
63 |
|
|
Provides: %{name}-ldplayer = %{version}-%{release} |
64 |
|
|
Obsoletes: %{name}-ldplayer < 0.179-4 |
65 |
matteo |
619589 |
|
66 |
joequant |
1020270 |
|
67 |
matteo |
619589 |
%description |
68 |
|
|
MAME stands for Multiple Arcade Machine Emulator. When used in conjunction |
69 |
|
|
with an arcade game's data files (ROMs), MAME will more or less faithfully |
70 |
|
|
reproduce that game on a PC. |
71 |
|
|
|
72 |
|
|
The ROM images that MAME utilizes are "dumped" from arcade games' original |
73 |
|
|
circuit-board ROM chips. MAME becomes the "hardware" for the games, taking |
74 |
|
|
the place of their original CPUs and support chips. Therefore, these games |
75 |
|
|
are NOT simulations, but the actual, original games that appeared in arcades. |
76 |
|
|
|
77 |
|
|
MAME's purpose is to preserve these decades of video-game history. As gaming |
78 |
|
|
technology continues to rush forward, MAME prevents these important "vintage" |
79 |
|
|
games from being lost and forgotten. This is achieved by documenting the |
80 |
|
|
hardware and how it functions, thanks to the talent of programmers from the |
81 |
|
|
MAME team and from other contributors. Being able to play the games is just |
82 |
|
|
a nice side-effect, which doesn't happen all the time. MAME strives for |
83 |
|
|
emulating the games faithfully. |
84 |
|
|
|
85 |
|
|
%package tools |
86 |
|
|
Summary: Additional tools for MAME |
87 |
neoclust |
1139909 |
Requires: %{name}%{?_isa} = %{version}-%{release} |
88 |
matteo |
619589 |
|
89 |
|
|
%description tools |
90 |
|
|
%{summary}. |
91 |
|
|
|
92 |
|
|
%package data |
93 |
joequant |
1020270 |
Summary: Data files used by MAME |
94 |
matteo |
619589 |
|
95 |
|
|
BuildArch: noarch |
96 |
|
|
|
97 |
|
|
%description data |
98 |
|
|
%{summary}. |
99 |
|
|
|
100 |
|
|
%package data-software-lists |
101 |
joequant |
1020270 |
Summary: Software lists used by MAME |
102 |
matteo |
619589 |
Requires: %{name}-data = %{version}-%{release} |
103 |
|
|
|
104 |
|
|
BuildArch: noarch |
105 |
|
|
|
106 |
|
|
%description data-software-lists |
107 |
|
|
%{summary}. These are split from the main -data |
108 |
|
|
subpackage due to relatively large size. |
109 |
|
|
|
110 |
neoclust |
1139909 |
%package doc |
111 |
|
|
Summary: Documentation for MAME |
112 |
matteo |
619589 |
|
113 |
neoclust |
1139909 |
BuildArch: noarch |
114 |
|
|
|
115 |
|
|
%description doc |
116 |
|
|
HTML documentation for MAME. |
117 |
|
|
|
118 |
|
|
|
119 |
matteo |
619589 |
%prep |
120 |
|
|
%setup -qcT |
121 |
neoclust |
1139909 |
|
122 |
|
|
#do not extract system libs or document themes to ensure system ones are used |
123 |
|
|
7za x \ |
124 |
|
|
-xr!3rdparty/expat \ |
125 |
|
|
-xr!3rdparty/genie/src/host/lua-5.3.0 \ |
126 |
|
|
-xr!3rdparty/libflac \ |
127 |
|
|
-xr!3rdparty/libjpeg \ |
128 |
|
|
-xr!3rdparty/lua \ |
129 |
|
|
-xr!3rdparty/portaudio \ |
130 |
|
|
-xr!3rdparty/portmidi \ |
131 |
|
|
-xr!3rdparty/SDL2 \ |
132 |
|
|
-xr!3rdparty/SDL2-override \ |
133 |
|
|
-xr!3rdparty/sqlite3 \ |
134 |
|
|
-xr!3rdparty/utf8proc \ |
135 |
|
|
-xr!3rdparty/zlib \ |
136 |
|
|
-xr!docs/themes \ |
137 |
|
|
%{SOURCE0} |
138 |
|
|
|
139 |
joequant |
1020270 |
install -pm 644 %{SOURCE1} whatsnew_0%{baseversion}.txt |
140 |
|
|
|
141 |
neoclust |
1139909 |
find \( -regex '.*\.\(c\|cpp\|fsh\|fx\|h\|lua\|make\|map\|md\|txt\|vsh\|xml\)$' \ |
142 |
|
|
-o -wholename ./makefile \) -exec sed -i 's@\r$@@' {} \; |
143 |
joequant |
1020270 |
|
144 |
matteo |
619589 |
%patch0 -p1 -b .fortify |
145 |
neoclust |
1140006 |
%patch1 -p1 -b .systemlua |
146 |
matteo |
619589 |
|
147 |
|
|
# Create ini files |
148 |
|
|
cat > %{name}.ini << EOF |
149 |
|
|
# Define multi-user paths |
150 |
|
|
artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects |
151 |
neoclust |
1139909 |
bgfx_path %{_datadir}/%{name}/bgfx |
152 |
matteo |
619589 |
cheatpath %{_datadir}/%{name}/cheat |
153 |
joequant |
1020270 |
crosshairpath %{_datadir}/%{name}/crosshair |
154 |
matteo |
619589 |
ctrlrpath %{_datadir}/%{name}/ctrlr |
155 |
|
|
fontpath %{_datadir}/%{name}/fonts |
156 |
|
|
hashpath %{_datadir}/%{name}/hash |
157 |
neoclust |
1139909 |
languagepath %{_datadir}/%{name}/language |
158 |
|
|
pluginspath %{_datadir}/%{name}/plugins |
159 |
matteo |
619589 |
rompath %{_datadir}/%{name}/roms;%{_datadir}/%{name}/chds |
160 |
|
|
samplepath %{_datadir}/%{name}/samples |
161 |
|
|
|
162 |
|
|
# Allow user to override ini settings |
163 |
|
|
inipath \$HOME/.%{name}/ini;%{_sysconfdir}/%{name} |
164 |
|
|
|
165 |
|
|
# Set paths for local storage |
166 |
|
|
cfg_directory \$HOME/.%{name}/cfg |
167 |
|
|
comment_directory \$HOME/.%{name}/comments |
168 |
|
|
diff_directory \$HOME/.%{name}/diff |
169 |
|
|
input_directory \$HOME/.%{name}/inp |
170 |
|
|
nvram_directory \$HOME/.%{name}/nvram |
171 |
|
|
snapshot_directory \$HOME/.%{name}/snap |
172 |
|
|
state_directory \$HOME/.%{name}/sta |
173 |
|
|
|
174 |
|
|
# Fedora custom defaults |
175 |
|
|
video opengl |
176 |
|
|
autosave 1 |
177 |
|
|
EOF |
178 |
|
|
|
179 |
neoclust |
1139909 |
#ensure genie uses $RPM_OPT_FLAGS and $RPM_LD_FLAGS |
180 |
|
|
sed -i "s@-Wall -Wextra -Os@$RPM_OPT_FLAGS@" 3rdparty/genie/build/gmake.linux/genie.make |
181 |
|
|
sed -i "s@\. -s@\. $RPM_LD_FLAGS@" 3rdparty/genie/build/gmake.linux/genie.make |
182 |
matteo |
619589 |
|
183 |
neoclust |
1139909 |
#rename various license files so that they can be installed with %%license |
184 |
|
|
mv artwork/LICENSE LICENSE.CC0 |
185 |
|
|
mv bgfx/LICENSE LICENSE.BSD3 |
186 |
|
|
mv plugins/json/LICENSE LICENSE.MIT |
187 |
|
|
|
188 |
matteo |
619589 |
%build |
189 |
|
|
#save some space |
190 |
neoclust |
1139909 |
MAME_FLAGS="NOWERROR=1 OPTIMIZE=2 VERBOSE=1 USE_SYSTEM_LIB_EXPAT=1 \ |
191 |
joequant |
1020270 |
USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1 \ |
192 |
|
|
USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_PORTMIDI=1 \ |
193 |
neoclust |
1139909 |
USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_UTF8PROC=1 \ |
194 |
joequant |
1020270 |
SDL_INI_PATH=%{_sysconfdir}/%{name};" |
195 |
matteo |
619589 |
|
196 |
neoclust |
1139909 |
#standard -g causes builder to run out of memory |
197 |
|
|
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@") |
198 |
joequant |
1020270 |
|
199 |
matteo |
619589 |
%if %{with debug} |
200 |
neoclust |
1139909 |
%make_build $MAME_FLAGS DEBUG=1 TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \ |
201 |
|
|
LDOPTS="$RPM_LD_FLAGS" |
202 |
matteo |
619589 |
%else |
203 |
neoclust |
1139909 |
%make_build $MAME_FLAGS TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \ |
204 |
|
|
LDOPTS="$RPM_LD_FLAGS" |
205 |
matteo |
619589 |
%endif |
206 |
|
|
|
207 |
neoclust |
1139909 |
pushd docs |
208 |
|
|
%make_build html |
209 |
|
|
popd |
210 |
|
|
|
211 |
|
|
|
212 |
matteo |
619589 |
%install |
213 |
neoclust |
1139909 |
rm -rf $RPM_BUILD_ROOT |
214 |
|
|
|
215 |
matteo |
619589 |
# create directories |
216 |
joequant |
1020270 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} |
217 |
matteo |
619589 |
for folder in cfg comments diff ini inp memcard nvram snap sta |
218 |
|
|
do |
219 |
joequant |
1020270 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.%{name}/$folder |
220 |
matteo |
619589 |
done |
221 |
joequant |
1020270 |
install -d $RPM_BUILD_ROOT%{_bindir} |
222 |
neoclust |
1139909 |
for folder in artwork bgfx chds cheats ctrlr effects fonts hash language \ |
223 |
|
|
plugins hlsl keymaps roms samples shader |
224 |
matteo |
619589 |
do |
225 |
joequant |
1020270 |
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder |
226 |
matteo |
619589 |
done |
227 |
joequant |
1020270 |
install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
228 |
|
|
install -d $RPM_BUILD_ROOT%{_mandir}/man6 |
229 |
matteo |
619589 |
|
230 |
|
|
# install files |
231 |
joequant |
1020270 |
install -pm 644 %{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name} |
232 |
matteo |
619589 |
%if %{with debug} |
233 |
joequant |
1020270 |
install -pm 755 %{name}d $RPM_BUILD_ROOT%{_bindir}/%{name}d || \ |
234 |
|
|
install -pm 755 %{name}64d $RPM_BUILD_ROOT%{_bindir}/%{name}d |
235 |
matteo |
619589 |
%else |
236 |
joequant |
1020270 |
install -pm 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} || \ |
237 |
|
|
install -pm 755 %{name}64 $RPM_BUILD_ROOT%{_bindir}/%{name} |
238 |
matteo |
619589 |
%endif |
239 |
joequant |
1020270 |
install -pm 755 castool chdman floptool imgtool jedutil ldresample ldverify \ |
240 |
neoclust |
1139909 |
nltool nlwav pngcmp romcmp unidasm $RPM_BUILD_ROOT%{_bindir} |
241 |
matteo |
619589 |
for tool in regrep split src2html srcclean |
242 |
|
|
do |
243 |
joequant |
1020270 |
install -pm 755 $tool $RPM_BUILD_ROOT%{_bindir}/%{name}-$tool |
244 |
matteo |
619589 |
done |
245 |
neoclust |
1139909 |
pushd artwork |
246 |
|
|
find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork/{} \; |
247 |
|
|
find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork/{} \; |
248 |
|
|
popd |
249 |
|
|
pushd bgfx |
250 |
|
|
find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/bgfx/{} \; |
251 |
|
|
find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/bgfx/{} \; |
252 |
|
|
popd |
253 |
joequant |
1020270 |
install -pm 644 hash/* $RPM_BUILD_ROOT%{_datadir}/%{name}/hash |
254 |
|
|
install -pm 644 hlsl/*.fx $RPM_BUILD_ROOT%{_datadir}/%{name}/hlsl |
255 |
|
|
install -pm 644 keymaps/* $RPM_BUILD_ROOT%{_datadir}/%{name}/keymaps |
256 |
neoclust |
1139909 |
pushd language |
257 |
|
|
find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/language/{} \; |
258 |
|
|
find -type f -name \*.mo -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/language/{} \; |
259 |
|
|
popd |
260 |
|
|
pushd plugins |
261 |
|
|
find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/{} \; |
262 |
|
|
find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/{} \; |
263 |
|
|
popd |
264 |
joequant |
1020270 |
pushd src/osd/modules/opengl |
265 |
neoclust |
1139909 |
install -pm 644 shader/*.?sh $RPM_BUILD_ROOT%{_datadir}/%{name}/shader |
266 |
joequant |
1020270 |
popd |
267 |
|
|
pushd docs/man |
268 |
|
|
install -pm 644 castool.1 chdman.1 imgtool.1 floptool.1 jedutil.1 ldresample.1 \ |
269 |
|
|
ldverify.1 romcmp.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
270 |
|
|
install -pm 644 mame.6 mess.6 $RPM_BUILD_ROOT%{_mandir}/man6 |
271 |
matteo |
619589 |
popd |
272 |
neoclust |
1139909 |
find $RPM_BUILD_ROOT%{_datadir}/%{name} -name LICENSE -exec rm {} \; |
273 |
matteo |
619589 |
|
274 |
|
|
|
275 |
|
|
%files |
276 |
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini |
277 |
|
|
%dir %{_sysconfdir}/%{name} |
278 |
|
|
%{_sysconfdir}/skel/.%{name} |
279 |
|
|
%if %{with debug} |
280 |
|
|
%{_bindir}/%{name}d |
281 |
|
|
%else |
282 |
|
|
%{_bindir}/%{name} |
283 |
|
|
%endif |
284 |
|
|
%{_mandir}/man6/mame.6* |
285 |
joequant |
1020270 |
%{_mandir}/man6/mess.6* |
286 |
matteo |
619589 |
|
287 |
|
|
%files tools |
288 |
joequant |
1020270 |
%{_bindir}/castool |
289 |
matteo |
619589 |
%{_bindir}/chdman |
290 |
joequant |
1020270 |
%{_bindir}/floptool |
291 |
|
|
%{_bindir}/imgtool |
292 |
neoclust |
1139909 |
%{_bindir}/jedutil |
293 |
matteo |
619589 |
%{_bindir}/ldresample |
294 |
|
|
%{_bindir}/ldverify |
295 |
|
|
%{_bindir}/nltool |
296 |
neoclust |
1139909 |
%{_bindir}/nlwav |
297 |
matteo |
619589 |
%{_bindir}/pngcmp |
298 |
neoclust |
1139909 |
%{_bindir}/%{name}-regrep |
299 |
matteo |
619589 |
%{_bindir}/romcmp |
300 |
|
|
%{_bindir}/%{name}-split |
301 |
|
|
%{_bindir}/%{name}-src2html |
302 |
|
|
%{_bindir}/%{name}-srcclean |
303 |
|
|
%{_bindir}/unidasm |
304 |
joequant |
1020270 |
%{_mandir}/man1/castool.1* |
305 |
matteo |
619589 |
%{_mandir}/man1/chdman.1* |
306 |
joequant |
1020270 |
%{_mandir}/man1/floptool.1* |
307 |
|
|
%{_mandir}/man1/imgtool.1* |
308 |
matteo |
619589 |
%{_mandir}/man1/jedutil.1* |
309 |
|
|
%{_mandir}/man1/ldresample.1* |
310 |
|
|
%{_mandir}/man1/ldverify.1* |
311 |
|
|
%{_mandir}/man1/romcmp.1* |
312 |
|
|
|
313 |
|
|
%files data |
314 |
neoclust |
1139909 |
%doc README.md whatsnew*.txt |
315 |
|
|
%license LICENSE.md LICENSE.BSD3 LICENSE.CC0 LICENSE.MIT |
316 |
matteo |
619589 |
%{_datadir}/%{name} |
317 |
|
|
%exclude %{_datadir}/%{name}/hash/* |
318 |
|
|
|
319 |
|
|
%files data-software-lists |
320 |
|
|
%{_datadir}/%{name}/hash/* |
321 |
neoclust |
1139909 |
|
322 |
|
|
%files doc |
323 |
|
|
%doc docs/build/html |
324 |
|
|
|