/[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 619744 - (show annotations) (download)
Fri May 2 21:52:05 2014 UTC (9 years, 11 months ago) by matteo
Original Path: cauldron/mame/current/SPECS/mame.spec
File size: 11543 byte(s)
- add Group
- switch $RPM_BUILD_ROOT to %buildroot
- setup compilation flags (invoke %setup_compile_flags)

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 153
9 #global sourceupdate 1
10 #global svn 21418
11
12 %if 0%{?svn}
13 %global svnrelease .%{svn}svn
14 %endif
15
16 # work around low memory on the RPM Fusion builder
17 %bcond_without lowmem
18 %if %{with lowmem}
19 %global _find_debuginfo_dwz_opts %{nil}
20 %endif
21
22 Name: mame
23 %if 0%{?sourceupdate}
24 Version: 0.%{baseversion}u%{sourceupdate}
25 %else
26 Version: 0.%{baseversion}
27 %endif
28
29 Release: %mkrel 1
30 Summary: Multiple Arcade Machine Emulator
31 Group: Emulators
32 License: MAME License and BSD
33 URL: http://mamedev.org/
34 %if 0%{?svn}
35 Source0: %{name}-svn%{svn}.tar.xz
36 %else
37 Source0: http://mamedev.org/downloader.php?file=releases/%{name}0%{baseversion}s.exe
38 #Source100: whatsnew.zip
39 %if 0%{?sourceupdate}
40 #Source updates
41 #Source1: http://mamedev.org/updates/0%{baseversion}u1_diff.zip
42 #Source2: http://mamedev.org/updates/0%{baseversion}u2_diff.zip
43 #Source3: http://mamedev.org/updates/0%{baseversion}u3_diff.zip
44 #Source4: http://mamedev.org/updates/0%{baseversion}u4_diff.zip
45 #Source5: http://mamedev.org/updates/0%{baseversion}u5_diff.zip
46 #Source6: http://mamedev.org/updates/0%{baseversion}u6_diff.zip
47 #Source7: http://mamedev.org/updates/0%{baseversion}u7_diff.zip
48 #Source8: http://mamedev.org/updates/0%{baseversion}u8_diff.zip
49 #Source9: http://mamedev.org/updates/0%{baseversion}u9_diff.zip
50 %endif
51 %endif
52 Patch0: %{name}-fortify.patch
53 Patch2: %{name}-verbosebuild.patch
54
55 BuildRequires: pkgconfig(expat)
56 BuildRequires: pkgconfig(flac)
57 BuildRequires: jpeg-devel
58 %if !0%{?svn}
59 BuildRequires: p7zip
60 %endif
61 BuildRequires: portmidi-devel
62 BuildRequires: python
63 BuildRequires: qt4-devel
64 BuildRequires: SDL_ttf-devel
65 BuildRequires: zlib-devel
66 Requires: %{name}-data = %{version}-%{release}
67
68 Provides: bundled(lzma-sdk) = 9.22
69
70 %description
71 MAME stands for Multiple Arcade Machine Emulator. When used in conjunction
72 with an arcade game's data files (ROMs), MAME will more or less faithfully
73 reproduce that game on a PC.
74
75 The ROM images that MAME utilizes are "dumped" from arcade games' original
76 circuit-board ROM chips. MAME becomes the "hardware" for the games, taking
77 the place of their original CPUs and support chips. Therefore, these games
78 are NOT simulations, but the actual, original games that appeared in arcades.
79
80 MAME's purpose is to preserve these decades of video-game history. As gaming
81 technology continues to rush forward, MAME prevents these important "vintage"
82 games from being lost and forgotten. This is achieved by documenting the
83 hardware and how it functions, thanks to the talent of programmers from the
84 MAME team and from other contributors. Being able to play the games is just
85 a nice side-effect, which doesn't happen all the time. MAME strives for
86 emulating the games faithfully.
87
88 %package tools
89 Summary: Additional tools for MAME
90 Requires: %{name} = %{version}-%{release}
91
92 %description tools
93 %{summary}.
94
95 %if %{with ldplayer}
96 %package ldplayer
97 Summary: Standalone laserdisc player based on MAME
98
99 %description ldplayer
100 %{summary}.
101 %endif
102
103 %package -n mess
104 Summary: Multi Emulator Super System
105 Requires: mess-data = %{version}-%{release}
106
107 %if 0%{?fedora} < 18
108 Provides: bundled(libjpeg) = 8c
109 %endif
110 Provides: bundled(lzma-sdk) = 9.22
111
112 %description -n mess
113 MESS is an acronym that stands for Multi Emulator Super System. MESS will
114 more or less faithfully reproduce computer and console systems on a PC.
115
116 MESS emulates the hardware of the systems and sometimes utilizes ROM images to
117 load programs and games. Therefore, these systems are NOT simulations, but
118 the actual emulations of the hardware.
119
120 %package -n mess-tools
121 Summary: Additional tools for MESS
122 Requires: mess = %{version}-%{release}
123
124 %description -n mess-tools
125 %{summary}.
126
127 %package data
128 Summary: Data files used by both MAME and MESS
129
130 Provides: mess-data = %{version}-%{release}
131
132 BuildArch: noarch
133
134 %description data
135 %{summary}.
136
137 %package data-software-lists
138 Summary: Software lists used by both MAME and MESS
139 Requires: %{name}-data = %{version}-%{release}
140
141 Provides: mess-data-software-lists = %{version}-%{release}
142 Obsoletes: mess-data < 0.146-2
143
144 BuildArch: noarch
145
146 %description data-software-lists
147 %{summary}. These are split from the main -data
148 subpackage due to relatively large size.
149
150
151 %prep
152 %if 0%{?svn}
153 %setup -qn %{name}-export
154 %else
155 %setup -qcT
156 for sourcefile in %{sources}; do
157 7za x $sourcefile
158 done
159 find . -type f -not -name *.png -exec sed -i 's/\r//' {} \;
160 %if 0%{?sourceupdate}
161 i=1
162 while [ $i -le %{sourceupdate} ]; do
163 patch -p0 -E < 0%{baseversion}u${i}.diff
164 i=`expr $i + 1`
165 done
166 %endif
167 %endif
168 %patch0 -p1 -b .fortify
169 %patch2 -p1 -b .verbosebuild
170
171 # Fix encoding
172 for whatsnew in whatsnew.txt messnew.txt; do
173 iconv -f iso8859-1 -t utf-8 $whatsnew > $whatsnew.conv
174 mv -f $whatsnew.conv $whatsnew
175 done
176
177 # Create ini files
178 cat > %{name}.ini << EOF
179 # Define multi-user paths
180 artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects
181 cheatpath %{_datadir}/%{name}/cheat
182 ctrlrpath %{_datadir}/%{name}/ctrlr
183 fontpath %{_datadir}/%{name}/fonts
184 hashpath %{_datadir}/%{name}/hash
185 rompath %{_datadir}/%{name}/roms;%{_datadir}/%{name}/chds
186 samplepath %{_datadir}/%{name}/samples
187
188 # Allow user to override ini settings
189 inipath \$HOME/.%{name}/ini;%{_sysconfdir}/%{name}
190
191 # Set paths for local storage
192 cfg_directory \$HOME/.%{name}/cfg
193 comment_directory \$HOME/.%{name}/comments
194 diff_directory \$HOME/.%{name}/diff
195 input_directory \$HOME/.%{name}/inp
196 memcard_directory \$HOME/.%{name}/memcard
197 nvram_directory \$HOME/.%{name}/nvram
198 snapshot_directory \$HOME/.%{name}/snap
199 state_directory \$HOME/.%{name}/sta
200
201 # Fedora custom defaults
202 video opengl
203 autosave 1
204 EOF
205
206 #make a copy for MESS
207 sed 's/%{name}/mess/g' %{name}.ini > mess.ini
208
209 %if %{with simd}
210 sed -i 's/USE_SIMD (0)/USE_SIMD (1)/' src/emu/cpu/rsp/rsp.h
211 %endif
212
213 %build
214 %setup_compile_flags
215 #these flags are already included in the Makefile
216 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-O2 -g -pipe -Wall //')
217
218 %if %{with simd}
219 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-mtune=generic/-march=corei7-avx/')
220 %endif
221
222 #save some space
223 MAME_FLAGS="NOWERROR=1 SYMBOLS=1 OPTIMIZE=2 BUILD_EXPAT=0 BUILD_ZLIB=0 \
224 BUILD_FLAC=0 BUILD_JPEGLIB=0 BUILD_MIDILIB=0 SUFFIX64="
225
226 #only use assembly on supported architectures
227 %ifnarch %{ix86} x86_64 ppc ppc64
228 MAME_FLAGS="$MAME_FLAGS NOASM=1"
229 %endif
230
231 %if %{with ldplayer}
232 %make $MAME_FLAGS TARGET=ldplayer \
233 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'"
234 %endif
235 %if %{with debug}
236 %make $MAME_FLAGS DEBUG=1 \
237 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'" all
238 find obj -type f -not -name \*.lh -and -not -name drivlist.c -exec rm {} \;
239 %make $MAME_FLAGS DEBUG=1 TARGET=mess \
240 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/mess;\"'" all
241 %else
242 %make $MAME_FLAGS \
243 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'" all
244 find obj -type f -not -name \*.lh -and -not -name drivlist.c -exec rm {} \;
245 %make $MAME_FLAGS TARGET=mess\
246 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/mess;\"'" all
247 %endif
248
249
250 %install
251 rm -rf %{buildroot}
252
253 # create directories
254 install -d %{buildroot}%{_sysconfdir}/%{name}
255 install -d %{buildroot}%{_sysconfdir}/mess
256 for folder in cfg comments diff ini inp memcard nvram snap sta
257 do
258 install -d %{buildroot}%{_sysconfdir}/skel/.%{name}/$folder
259 install -d %{buildroot}%{_sysconfdir}/skel/.mess/$folder
260 done
261 install -d %{buildroot}%{_bindir}
262 for folder in artwork chds cheats ctrlr effects fonts hash hlsl keymaps roms \
263 samples shader
264 do
265 install -d %{buildroot}%{_datadir}/%{name}/$folder
266 done
267 for folder in artwork chds cheats ctrlr effects fonts hash hlsl keymaps roms \
268 samples shader software
269 do
270 install -d %{buildroot}%{_datadir}/mess/$folder
271 done
272 install -d %{buildroot}%{_mandir}/man1
273 install -d %{buildroot}%{_mandir}/man6
274
275 # install files
276 install -pm 644 %{name}.ini %{buildroot}%{_sysconfdir}/%{name}
277 install -pm 644 mess.ini %{buildroot}%{_sysconfdir}/mess
278 %if %{with ldplayer}
279 install -pm 755 ldplayer %{buildroot}%{_bindir}
280 %endif
281 %if %{with debug}
282 install -pm 755 %{name}d %{buildroot}%{_bindir}
283 install -pm 755 messd %{buildroot}%{_bindir}
284 %else
285 install -pm 755 %{name} %{buildroot}%{_bindir}
286 install -pm 755 mess %{buildroot}%{_bindir}
287 %endif
288 install -pm 755 chdman jedutil ldresample ldverify romcmp testkeys unidasm \
289 castool floptool imgtool pngcmp nltool %{buildroot}%{_bindir}
290 #for tool in regrep runtest split src2html srcclean
291 for tool in regrep split src2html srcclean
292 do
293 install -pm 755 $tool %{buildroot}%{_bindir}/%{name}-$tool
294 done
295 install -pm 644 artwork/* %{buildroot}%{_datadir}/%{name}/artwork
296 install -pm 644 hash/* %{buildroot}%{_datadir}/%{name}/hash
297 install -pm 644 hlsl/* %{buildroot}%{_datadir}/%{name}/hlsl
298 install -pm 644 keymaps/* %{buildroot}%{_datadir}/%{name}/keymaps
299 pushd src/osd/sdl
300 install -pm 644 shader/*.?sh %{buildroot}%{_datadir}/%{name}/shader
301 for folder in artwork hash hlsl keymaps shader
302 do
303 pushd %{buildroot}%{_datadir}/%{name}/$folder
304 for i in *
305 do
306 ln -s ../../%{name}/$folder/$i ../../mess/$folder/$i
307 done
308 popd
309 done
310 pushd man
311 %if %{with ldplayer}
312 install -pm 644 ldplayer.1 %{buildroot}%{_mandir}/man1
313 %endif
314 install -pm 644 castool.1 chdman.1 imgtool.1 jedutil.1 ldresample.1 ldverify.1 \
315 romcmp.1 testkeys.1 %{buildroot}%{_mandir}/man1
316 install -pm 644 mame.6 mess.6 %{buildroot}%{_mandir}/man6
317 popd
318 popd
319
320
321 %files
322 %doc docs/config.txt docs/hlsl.txt docs/license.txt docs/mame.txt
323 %doc docs/newvideo.txt docs/nscsi.txt
324 %if !0%{?svn}
325 %doc whatsnew*.txt
326 %endif
327 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
328 %dir %{_sysconfdir}/%{name}
329 %{_sysconfdir}/skel/.%{name}
330 %if %{with debug}
331 %{_bindir}/%{name}d
332 %else
333 %{_bindir}/%{name}
334 %endif
335 %{_mandir}/man6/mame.6*
336
337 %files tools
338 %{_bindir}/chdman
339 %{_bindir}/jedutil
340 %{_bindir}/ldresample
341 %{_bindir}/ldverify
342 %{_bindir}/%{name}-regrep
343 %{_bindir}/nltool
344 %{_bindir}/pngcmp
345 %{_bindir}/romcmp
346 #%{_bindir}/%{name}-runtest
347 %{_bindir}/%{name}-split
348 %{_bindir}/%{name}-src2html
349 %{_bindir}/%{name}-srcclean
350 %{_bindir}/testkeys
351 %{_bindir}/unidasm
352 %{_mandir}/man1/chdman.1*
353 %{_mandir}/man1/jedutil.1*
354 %{_mandir}/man1/ldresample.1*
355 %{_mandir}/man1/ldverify.1*
356 %{_mandir}/man1/romcmp.1*
357 %{_mandir}/man1/testkeys.1*
358
359 %if %{with ldplayer}
360 %files ldplayer
361 %{_bindir}/ldplayer
362 %{_mandir}/man1/ldplayer.1*
363 %endif
364
365 %files -n mess
366 %if !0%{?svn}
367 %doc messnew*.txt
368 %endif
369 %config(noreplace) %{_sysconfdir}/mess/mess.ini
370 %dir %{_sysconfdir}/mess
371 %{_sysconfdir}/skel/.mess
372 %if %{with debug}
373 %{_bindir}/messd
374 %else
375 %{_bindir}/mess
376 %endif
377 %{_mandir}/man6/mess.6*
378
379 %files -n mess-tools
380 %doc docs/imgtool.txt
381 %{_bindir}/castool
382 %{_bindir}/floptool
383 %{_bindir}/imgtool
384 %{_mandir}/man1/castool.1*
385 %{_mandir}/man1/imgtool.1*
386
387 %files data
388 %{_datadir}/%{name}
389 %exclude %{_datadir}/%{name}/hash/*
390 %{_datadir}/mess
391 %exclude %{_datadir}/mess/hash/*
392
393 %files data-software-lists
394 %{_datadir}/%{name}/hash/*
395 %{_datadir}/mess/hash/*
396
397

  ViewVC Help
Powered by ViewVC 1.1.30