/[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 619589 - (show annotations) (download)
Fri May 2 16:14:17 2014 UTC (9 years, 11 months ago) by matteo
Original Path: cauldron/mame/current/SPECS/mame.spec
File size: 11656 byte(s)
Imported Fedora package
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
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 #these flags are already included in the Makefile
215 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-O2 -g -pipe -Wall //')
216
217 %if %{with simd}
218 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-mtune=generic/-march=corei7-avx/')
219 %endif
220
221 #save some space
222 MAME_FLAGS="NOWERROR=1 SYMBOLS=1 OPTIMIZE=2 BUILD_EXPAT=0 BUILD_ZLIB=0 \
223 BUILD_FLAC=0 BUILD_JPEGLIB=0 BUILD_MIDILIB=0 SUFFIX64="
224
225 #only use assembly on supported architectures
226 %ifnarch %{ix86} x86_64 ppc ppc64
227 MAME_FLAGS="$MAME_FLAGS NOASM=1"
228 %endif
229
230 %if %{with ldplayer}
231 make %{?_smp_mflags} $MAME_FLAGS TARGET=ldplayer \
232 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'"
233 %endif
234 %if %{with debug}
235 make %{?_smp_mflags} $MAME_FLAGS DEBUG=1 \
236 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'" all
237 find obj -type f -not -name \*.lh -and -not -name drivlist.c -exec rm {} \;
238 make %{?_smp_mflags} $MAME_FLAGS DEBUG=1 TARGET=mess \
239 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/mess;\"'" all
240 %else
241 make %{?_smp_mflags} $MAME_FLAGS \
242 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/%{name};\"'" all
243 find obj -type f -not -name \*.lh -and -not -name drivlist.c -exec rm {} \;
244 make %{?_smp_mflags} $MAME_FLAGS TARGET=mess\
245 OPT_FLAGS="$RPM_OPT_FLAGS -DINI_PATH='\"%{_sysconfdir}/mess;\"'" all
246 %endif
247
248
249 %install
250 rm -rf $RPM_BUILD_ROOT
251
252 # create directories
253 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
254 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mess
255 for folder in cfg comments diff ini inp memcard nvram snap sta
256 do
257 install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.%{name}/$folder
258 install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.mess/$folder
259 done
260 install -d $RPM_BUILD_ROOT%{_bindir}
261 for folder in artwork chds cheats ctrlr effects fonts hash hlsl keymaps roms \
262 samples shader
263 do
264 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder
265 done
266 for folder in artwork chds cheats ctrlr effects fonts hash hlsl keymaps roms \
267 samples shader software
268 do
269 install -d $RPM_BUILD_ROOT%{_datadir}/mess/$folder
270 done
271 install -d $RPM_BUILD_ROOT%{_mandir}/man1
272 install -d $RPM_BUILD_ROOT%{_mandir}/man6
273
274 # install files
275 install -pm 644 %{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
276 install -pm 644 mess.ini $RPM_BUILD_ROOT%{_sysconfdir}/mess
277 %if %{with ldplayer}
278 install -pm 755 ldplayer $RPM_BUILD_ROOT%{_bindir}
279 %endif
280 %if %{with debug}
281 install -pm 755 %{name}d $RPM_BUILD_ROOT%{_bindir}
282 install -pm 755 messd $RPM_BUILD_ROOT%{_bindir}
283 %else
284 install -pm 755 %{name} $RPM_BUILD_ROOT%{_bindir}
285 install -pm 755 mess $RPM_BUILD_ROOT%{_bindir}
286 %endif
287 install -pm 755 chdman jedutil ldresample ldverify romcmp testkeys unidasm \
288 castool floptool imgtool pngcmp nltool $RPM_BUILD_ROOT%{_bindir}
289 #for tool in regrep runtest split src2html srcclean
290 for tool in regrep split src2html srcclean
291 do
292 install -pm 755 $tool $RPM_BUILD_ROOT%{_bindir}/%{name}-$tool
293 done
294 install -pm 644 artwork/* $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork
295 install -pm 644 hash/* $RPM_BUILD_ROOT%{_datadir}/%{name}/hash
296 install -pm 644 hlsl/* $RPM_BUILD_ROOT%{_datadir}/%{name}/hlsl
297 install -pm 644 keymaps/* $RPM_BUILD_ROOT%{_datadir}/%{name}/keymaps
298 pushd src/osd/sdl
299 install -pm 644 shader/*.?sh $RPM_BUILD_ROOT%{_datadir}/%{name}/shader
300 for folder in artwork hash hlsl keymaps shader
301 do
302 pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder
303 for i in *
304 do
305 ln -s ../../%{name}/$folder/$i ../../mess/$folder/$i
306 done
307 popd
308 done
309 pushd man
310 %if %{with ldplayer}
311 install -pm 644 ldplayer.1 $RPM_BUILD_ROOT%{_mandir}/man1
312 %endif
313 install -pm 644 castool.1 chdman.1 imgtool.1 jedutil.1 ldresample.1 ldverify.1 \
314 romcmp.1 testkeys.1 $RPM_BUILD_ROOT%{_mandir}/man1
315 install -pm 644 mame.6 mess.6 $RPM_BUILD_ROOT%{_mandir}/man6
316 popd
317 popd
318
319
320 %files
321 %doc docs/config.txt docs/hlsl.txt docs/license.txt docs/mame.txt
322 %doc docs/newvideo.txt docs/nscsi.txt
323 %if !0%{?svn}
324 %doc whatsnew*.txt
325 %endif
326 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
327 %dir %{_sysconfdir}/%{name}
328 %{_sysconfdir}/skel/.%{name}
329 %if %{with debug}
330 %{_bindir}/%{name}d
331 %else
332 %{_bindir}/%{name}
333 %endif
334 %{_mandir}/man6/mame.6*
335
336 %files tools
337 %{_bindir}/chdman
338 %{_bindir}/jedutil
339 %{_bindir}/ldresample
340 %{_bindir}/ldverify
341 %{_bindir}/%{name}-regrep
342 %{_bindir}/nltool
343 %{_bindir}/pngcmp
344 %{_bindir}/romcmp
345 #%{_bindir}/%{name}-runtest
346 %{_bindir}/%{name}-split
347 %{_bindir}/%{name}-src2html
348 %{_bindir}/%{name}-srcclean
349 %{_bindir}/testkeys
350 %{_bindir}/unidasm
351 %{_mandir}/man1/chdman.1*
352 %{_mandir}/man1/jedutil.1*
353 %{_mandir}/man1/ldresample.1*
354 %{_mandir}/man1/ldverify.1*
355 %{_mandir}/man1/romcmp.1*
356 %{_mandir}/man1/testkeys.1*
357
358 %if %{with ldplayer}
359 %files ldplayer
360 %{_bindir}/ldplayer
361 %{_mandir}/man1/ldplayer.1*
362 %endif
363
364 %files -n mess
365 %if !0%{?svn}
366 %doc messnew*.txt
367 %endif
368 %config(noreplace) %{_sysconfdir}/mess/mess.ini
369 %dir %{_sysconfdir}/mess
370 %{_sysconfdir}/skel/.mess
371 %if %{with debug}
372 %{_bindir}/messd
373 %else
374 %{_bindir}/mess
375 %endif
376 %{_mandir}/man6/mess.6*
377
378 %files -n mess-tools
379 %doc docs/imgtool.txt
380 %{_bindir}/castool
381 %{_bindir}/floptool
382 %{_bindir}/imgtool
383 %{_mandir}/man1/castool.1*
384 %{_mandir}/man1/imgtool.1*
385
386 %files data
387 %{_datadir}/%{name}
388 %exclude %{_datadir}/%{name}/hash/*
389 %{_datadir}/mess
390 %exclude %{_datadir}/mess/hash/*
391
392 %files data-software-lists
393 %{_datadir}/%{name}/hash/*
394 %{_datadir}/mess/hash/*
395
396

  ViewVC Help
Powered by ViewVC 1.1.30