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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1020506 - (hide annotations) (download)
Tue Jun 7 04:53:57 2016 UTC (7 years, 10 months ago) by joequant
Original Path: cauldron/mame/current/SPECS/mame.spec
File size: 9583 byte(s)
fix lowmem build on arm

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

  ViewVC Help
Powered by ViewVC 1.1.30