/[packages]/backports/6/mame/current/SPECS/mame.spec
ViewVC logotype

Contents of /backports/6/mame/current/SPECS/mame.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30