/[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 1020353 - (show annotations) (download)
Mon Jun 6 12:47:06 2016 UTC (7 years, 9 months ago) by joequant
Original Path: cauldron/mame/current/SPECS/mame.spec
File size: 9539 byte(s)
fix mga tag

1 # ldplayer can be disabled by --without ldplayer or by changing to %bcond_with
2 # if it does not build. The debug build is disabled by default, please use
3 # --with debug to override
4 %bcond_without ldplayer
5 %bcond_with debug
6 %bcond_with simd
7
8 %global baseversion 174
9
10 # work around low memory on the RPM Fusion builder
11 %bcond_without lowmem
12 %if %{with lowmem}
13 %global _find_debuginfo_dwz_opts %{nil}
14 %endif
15
16 Name: mame
17 Version: 0.%{baseversion}
18 Release: %mkrel 1
19 Summary: Multiple Arcade Machine Emulator
20 Group: Games/Arcade
21 License: BSD and GPLv2+ and LGPLv2+ and Public Domain and zlib
22 URL: http://mamedev.org/
23 Source0: https://github.com/mamedev/mame/releases/download/mame0%{baseversion}/mame0%{baseversion}s.exe
24 Source1: http://mamedev.org/releases/whatsnew_0%{baseversion}.txt
25 Patch0: %{name}-fortify.patch
26 Patch1: %{name}-lua52.patch
27
28 BuildRequires: expat-devel
29 BuildRequires: libflac-devel
30 BuildRequires: fontconfig-devel
31 BuildRequires: libjpeg-devel
32 BuildRequires: libuv-devel
33 BuildRequires: lua-devel
34 BuildRequires: p7zip
35 BuildRequires: portaudio-devel
36 BuildRequires: portmidi-devel
37 BuildRequires: python
38 BuildRequires: libqt5-devel
39 BuildRequires: sdl2_ttf-devel
40 BuildRequires: sqlite3-devel
41 BuildRequires: zlib-devel
42 BuildRequires: libxinerama-devel
43 Requires: %{name}-data = %{version}-%{release}
44
45 Provides: bundled(bgfx)
46 Provides: bundled(http-parser)
47 Provides: bundled(lsqlite3)
48 Provides: bundled(luafilesystem)
49 Provides: bundled(lua-zlib)
50 Provides: bundled(lua) = 5.3.0
51 Provides: bundled(lzma-sdk) = 9.22
52 Provides: bundled(softfloat)
53 Provides: mess = %{version}-%{release}
54 Obsoletes: mess < 0.160-2
55
56
57 %description
58 MAME stands for Multiple Arcade Machine Emulator. When used in conjunction
59 with an arcade game's data files (ROMs), MAME will more or less faithfully
60 reproduce that game on a PC.
61
62 The ROM images that MAME utilizes are "dumped" from arcade games' original
63 circuit-board ROM chips. MAME becomes the "hardware" for the games, taking
64 the place of their original CPUs and support chips. Therefore, these games
65 are NOT simulations, but the actual, original games that appeared in arcades.
66
67 MAME's purpose is to preserve these decades of video-game history. As gaming
68 technology continues to rush forward, MAME prevents these important "vintage"
69 games from being lost and forgotten. This is achieved by documenting the
70 hardware and how it functions, thanks to the talent of programmers from the
71 MAME team and from other contributors. Being able to play the games is just
72 a nice side-effect, which doesn't happen all the time. MAME strives for
73 emulating the games faithfully.
74
75 %package tools
76 Summary: Additional tools for MAME
77 Requires: %{name} = %{version}-%{release}
78
79 Provides: mess-tools = %{version}-%{release}
80 Obsoletes: mess-tools < 0.160-2
81
82 %description tools
83 %{summary}.
84
85 %if %{with ldplayer}
86 %package ldplayer
87 Summary: Standalone laserdisc player based on MAME
88
89 %description ldplayer
90 %{summary}.
91 %endif
92
93 %package data
94 Summary: Data files used by MAME
95
96 Provides: mess-data = %{version}-%{release}
97
98 BuildArch: noarch
99
100 %description data
101 %{summary}.
102
103 %package data-software-lists
104 Summary: Software lists used by MAME
105 Requires: %{name}-data = %{version}-%{release}
106
107 Provides: mess-data-software-lists = %{version}-%{release}
108 Obsoletes: mess-data < 0.146-2
109
110 BuildArch: noarch
111
112 %description data-software-lists
113 %{summary}. These are split from the main -data
114 subpackage due to relatively large size.
115
116
117 %prep
118 %setup -qcT
119 7za x %{SOURCE0}
120 install -pm 644 %{SOURCE1} whatsnew_0%{baseversion}.txt
121
122 find \( -regex '.*\.\(c\|fsh\|fx\|h\|lua\|map\|md\|txt\|vsh\|xml\)$' \
123 -o -wholename ./makefile \) -exec sed -i 's@\r@@' {} \;
124
125 %patch0 -p1 -b .fortify
126 %patch1 -p1 -b .lua52
127
128 # Fix encoding
129 #for whatsnew in whatsnew_0162.txt; do
130 # iconv -f iso8859-1 -t utf-8 $whatsnew > $whatsnew.conv
131 # mv -f $whatsnew.conv $whatsnew
132 #done
133
134 # Create ini files
135 cat > %{name}.ini << EOF
136 # Define multi-user paths
137 artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects
138 cheatpath %{_datadir}/%{name}/cheat
139 crosshairpath %{_datadir}/%{name}/crosshair
140 ctrlrpath %{_datadir}/%{name}/ctrlr
141 fontpath %{_datadir}/%{name}/fonts
142 hashpath %{_datadir}/%{name}/hash
143 rompath %{_datadir}/%{name}/roms;%{_datadir}/%{name}/chds
144 samplepath %{_datadir}/%{name}/samples
145
146 # Allow user to override ini settings
147 inipath \$HOME/.%{name}/ini;%{_sysconfdir}/%{name}
148
149 # Set paths for local storage
150 cfg_directory \$HOME/.%{name}/cfg
151 comment_directory \$HOME/.%{name}/comments
152 diff_directory \$HOME/.%{name}/diff
153 input_directory \$HOME/.%{name}/inp
154 nvram_directory \$HOME/.%{name}/nvram
155 snapshot_directory \$HOME/.%{name}/snap
156 state_directory \$HOME/.%{name}/sta
157
158 # Fedora custom defaults
159 video opengl
160 autosave 1
161 EOF
162
163 %if %{with simd}
164 sed -i 's@USE_SIMD (0)@USE_SIMD (1)@' src/emu/cpu/rsp/rsp.h
165 %endif
166
167 %build
168 #these flags are already included in the genie.lua
169 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's@-O2 -g -pipe -Wall @@')
170
171 %if %{with simd}
172 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's@-mtune=generic@-march=corei7-avx@')
173 %endif
174
175 #save some space
176 MAME_FLAGS="NOWERROR=1 SYMBOLS=1 OPTIMIZE=2 VERBOSE=1 USE_SYSTEM_LIB_EXPAT=1 \
177 USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1 \
178 USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_PORTMIDI=1 \
179 USE_SYSTEM_LIB_PORTAUDIO=1 \
180 USE_SYSTEM_LIB_UV=1 \
181 SDL_INI_PATH=%{_sysconfdir}/%{name};"
182
183 %if %{with lowmem}
184 MAME_FLAGS="$MAME_FLAGS LDOPTS=-Wl,--no-keep-memory,--reduce-memory-overheads \
185 SYMLEVEL=1"
186 %endif
187
188 #only use assembly on supported architectures
189 %ifnarch %{ix86} x86_64 ppc ppc64
190 MAME_FLAGS="$MAME_FLAGS NOASM=1"
191 %endif
192
193 %if %{with ldplayer}
194 make %{?_smp_mflags} $MAME_FLAGS TARGET=ldplayer OPT_FLAGS="$RPM_OPT_FLAGS"
195 %endif
196 %if %{with debug}
197 make %{?_smp_mflags} $MAME_FLAGS DEBUG=1 TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS"
198 %else
199 make %{?_smp_mflags} $MAME_FLAGS TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS"
200 %endif
201
202
203 %install
204 # create directories
205 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
206 for folder in cfg comments diff ini inp memcard nvram snap sta
207 do
208 install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.%{name}/$folder
209 done
210 install -d $RPM_BUILD_ROOT%{_bindir}
211 for folder in artwork chds cheats ctrlr effects fonts hash hlsl keymaps roms \
212 samples shader
213 do
214 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder
215 done
216 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/hlsl/artwork_support
217 install -d $RPM_BUILD_ROOT%{_mandir}/man1
218 install -d $RPM_BUILD_ROOT%{_mandir}/man6
219
220 # install files
221 install -pm 644 %{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
222 %if %{with ldplayer}
223 install -pm 755 ldplayer $RPM_BUILD_ROOT%{_bindir}/ldplayer || \
224 install -pm 755 ldplayer64 $RPM_BUILD_ROOT%{_bindir}/ldplayer
225 %endif
226 %if %{with debug}
227 install -pm 755 %{name}d $RPM_BUILD_ROOT%{_bindir}/%{name}d || \
228 install -pm 755 %{name}64d $RPM_BUILD_ROOT%{_bindir}/%{name}d
229 %else
230 install -pm 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} || \
231 install -pm 755 %{name}64 $RPM_BUILD_ROOT%{_bindir}/%{name}
232 %endif
233 install -pm 755 castool chdman floptool imgtool jedutil ldresample ldverify \
234 nltool pngcmp romcmp unidasm $RPM_BUILD_ROOT%{_bindir}
235 for tool in regrep split src2html srcclean
236 do
237 install -pm 755 $tool $RPM_BUILD_ROOT%{_bindir}/%{name}-$tool
238 done
239 cp -r -p artwork/* $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork
240 install -pm 644 hash/* $RPM_BUILD_ROOT%{_datadir}/%{name}/hash
241 install -pm 644 hlsl/*.fx $RPM_BUILD_ROOT%{_datadir}/%{name}/hlsl
242 install -pm 644 keymaps/* $RPM_BUILD_ROOT%{_datadir}/%{name}/keymaps
243 pushd src/osd/modules/opengl
244 install -pm 644 shader/*.?sh $RPM_BUILD_ROOT%{_datadir}/%{name}/shader
245 popd
246 pushd docs/man
247 %if %{with ldplayer}
248 install -pm 644 ldplayer.1 $RPM_BUILD_ROOT%{_mandir}/man1
249 %endif
250 install -pm 644 castool.1 chdman.1 imgtool.1 floptool.1 jedutil.1 ldresample.1 \
251 ldverify.1 romcmp.1 $RPM_BUILD_ROOT%{_mandir}/man1
252 install -pm 644 mame.6 mess.6 $RPM_BUILD_ROOT%{_mandir}/man6
253 popd
254
255
256 %files
257 %doc docs/config.txt docs/floppy.txt docs/hlsl.txt docs/luaengine.md
258 %doc docs/m6502.txt docs/mame.txt docs/newvideo.txt
259 %doc docs/nscsi.txt docs/SDL.txt README.md
260 %doc whatsnew_*.txt
261 %license docs/LICENSE
262 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
263 %dir %{_sysconfdir}/%{name}
264 %{_sysconfdir}/skel/.%{name}
265 %if %{with debug}
266 %{_bindir}/%{name}d
267 %else
268 %{_bindir}/%{name}
269 %endif
270 %{_mandir}/man6/mame.6*
271 %{_mandir}/man6/mess.6*
272
273 %files tools
274 %doc docs/imgtool.txt
275 %{_bindir}/castool
276 %{_bindir}/chdman
277 %{_bindir}/jedutil
278 %{_bindir}/floptool
279 %{_bindir}/imgtool
280 %{_bindir}/ldresample
281 %{_bindir}/ldverify
282 %{_bindir}/%{name}-regrep
283 %{_bindir}/nltool
284 %{_bindir}/pngcmp
285 %{_bindir}/romcmp
286 %{_bindir}/%{name}-split
287 %{_bindir}/%{name}-src2html
288 %{_bindir}/%{name}-srcclean
289 %{_bindir}/unidasm
290 %{_mandir}/man1/castool.1*
291 %{_mandir}/man1/chdman.1*
292 %{_mandir}/man1/floptool.1*
293 %{_mandir}/man1/imgtool.1*
294 %{_mandir}/man1/jedutil.1*
295 %{_mandir}/man1/ldresample.1*
296 %{_mandir}/man1/ldverify.1*
297 %{_mandir}/man1/romcmp.1*
298
299 %if %{with ldplayer}
300 %files ldplayer
301 %{_bindir}/ldplayer
302 %{_mandir}/man1/ldplayer.1*
303 %endif
304
305 %files data
306 %{_datadir}/%{name}
307 %exclude %{_datadir}/%{name}/hash/*
308
309 %files data-software-lists
310 %{_datadir}/%{name}/hash/*

  ViewVC Help
Powered by ViewVC 1.1.30