/[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 1139909 - (hide annotations) (download)
Sat Aug 12 12:23:40 2017 UTC (6 years, 8 months ago) by neoclust
File size: 10377 byte(s)
SILENT: Sync with fedora
1 neoclust 1139909 #The debug build is disabled by default, please use # --with debug to override
2 matteo 619589 %bcond_with debug
3    
4 neoclust 1139904 %global baseversion 188
5 matteo 619589
6     Name: mame
7     Version: 0.%{baseversion}
8 joequant 1041000 Release: %mkrel 1
9 neoclust 1139909 Group: Games/Arcade
10 matteo 619589 Summary: Multiple Arcade Machine Emulator
11 neoclust 1139909
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 matteo 619589 URL: http://mamedev.org/
22 neoclust 1139909 Source0: https://github.com/mamedev/%{name}/releases/download/%{name}0%{baseversion}/%{name}0%{baseversion}s.exe
23 joequant 1020270 Source1: http://mamedev.org/releases/whatsnew_0%{baseversion}.txt
24 matteo 619589 Patch0: %{name}-fortify.patch
25 neoclust 1139906 Patch1: %{name}-genie-systemlua.patch
26 matteo 619589
27 joequant 1020270 BuildRequires: expat-devel
28     BuildRequires: libflac-devel
29     BuildRequires: fontconfig-devel
30     BuildRequires: libjpeg-devel
31     BuildRequires: libuv-devel
32 neoclust 1139909 BuildRequires: lua-devel >= 5.3.0
33 matteo 619589 BuildRequires: p7zip
34 joequant 1020270 BuildRequires: portaudio-devel
35 matteo 619589 BuildRequires: portmidi-devel
36     BuildRequires: python
37 joequant 1020270 BuildRequires: libqt5-devel
38     BuildRequires: sdl2_ttf-devel
39     BuildRequires: sqlite3-devel
40 matteo 619589 BuildRequires: zlib-devel
41 joequant 1020270 BuildRequires: libxinerama-devel
42 matteo 619589 Requires: %{name}-data = %{version}-%{release}
43    
44 neoclust 1139909 #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 joequant 1020270 Provides: bundled(bgfx)
47 neoclust 1139909 #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 joequant 1020270 Provides: bundled(lsqlite3)
51     Provides: bundled(luafilesystem)
52 neoclust 1139909 Provides: bundled(lua-linenoise)
53 joequant 1020270 Provides: bundled(lua-zlib)
54 neoclust 1139909 #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 joequant 1020270 Provides: bundled(softfloat)
58 neoclust 1139909 #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 matteo 619589
62 joequant 1020270
63 matteo 619589 %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 neoclust 1139909 Requires: %{name}%{?_isa} = %{version}-%{release}
84 matteo 619589
85     %description tools
86     %{summary}.
87    
88     %package data
89 joequant 1020270 Summary: Data files used by MAME
90 matteo 619589
91     BuildArch: noarch
92    
93     %description data
94     %{summary}.
95    
96     %package data-software-lists
97 joequant 1020270 Summary: Software lists used by MAME
98 matteo 619589 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 neoclust 1139909 %package doc
107     Summary: Documentation for MAME
108 matteo 619589
109 neoclust 1139909 BuildArch: noarch
110    
111     %description doc
112     HTML documentation for MAME.
113    
114    
115 matteo 619589 %prep
116     %setup -qcT
117 neoclust 1139909
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 joequant 1020270 install -pm 644 %{SOURCE1} whatsnew_0%{baseversion}.txt
136    
137 neoclust 1139909 find \( -regex '.*\.\(c\|cpp\|fsh\|fx\|h\|lua\|make\|map\|md\|txt\|vsh\|xml\)$' \
138     -o -wholename ./makefile \) -exec sed -i 's@\r$@@' {} \;
139 joequant 1020270
140 matteo 619589 %patch0 -p1 -b .fortify
141 neoclust 1139909 %patch1 -p1 -b .systemlua
142 matteo 619589
143     # Create ini files
144     cat > %{name}.ini << EOF
145     # Define multi-user paths
146     artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects
147 neoclust 1139909 bgfx_path %{_datadir}/%{name}/bgfx
148 matteo 619589 cheatpath %{_datadir}/%{name}/cheat
149 joequant 1020270 crosshairpath %{_datadir}/%{name}/crosshair
150 matteo 619589 ctrlrpath %{_datadir}/%{name}/ctrlr
151     fontpath %{_datadir}/%{name}/fonts
152     hashpath %{_datadir}/%{name}/hash
153 neoclust 1139909 languagepath %{_datadir}/%{name}/language
154     pluginspath %{_datadir}/%{name}/plugins
155 matteo 619589 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 neoclust 1139909 #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 matteo 619589
179 neoclust 1139909 #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 matteo 619589 %build
185     #save some space
186 neoclust 1139909 MAME_FLAGS="NOWERROR=1 OPTIMIZE=2 VERBOSE=1 USE_SYSTEM_LIB_EXPAT=1 \
187 joequant 1020270 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 neoclust 1139909 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_UTF8PROC=1 \
190 joequant 1020270 SDL_INI_PATH=%{_sysconfdir}/%{name};"
191 matteo 619589
192 neoclust 1139909 #standard -g causes builder to run out of memory
193     RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@")
194 joequant 1020270
195 matteo 619589 %if %{with debug}
196 neoclust 1139909 %make_build $MAME_FLAGS DEBUG=1 TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \
197     LDOPTS="$RPM_LD_FLAGS"
198 matteo 619589 %else
199 neoclust 1139909 %make_build $MAME_FLAGS TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \
200     LDOPTS="$RPM_LD_FLAGS"
201 matteo 619589 %endif
202    
203 neoclust 1139909 pushd docs
204     %make_build html
205     popd
206    
207    
208 matteo 619589 %install
209 neoclust 1139909 rm -rf $RPM_BUILD_ROOT
210    
211 matteo 619589 # create directories
212 joequant 1020270 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
213 matteo 619589 for folder in cfg comments diff ini inp memcard nvram snap sta
214     do
215 joequant 1020270 install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.%{name}/$folder
216 matteo 619589 done
217 joequant 1020270 install -d $RPM_BUILD_ROOT%{_bindir}
218 neoclust 1139909 for folder in artwork bgfx chds cheats ctrlr effects fonts hash language \
219     plugins hlsl keymaps roms samples shader
220 matteo 619589 do
221 joequant 1020270 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder
222 matteo 619589 done
223 joequant 1020270 install -d $RPM_BUILD_ROOT%{_mandir}/man1
224     install -d $RPM_BUILD_ROOT%{_mandir}/man6
225 matteo 619589
226     # install files
227 joequant 1020270 install -pm 644 %{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
228 matteo 619589 %if %{with debug}
229 joequant 1020270 install -pm 755 %{name}d $RPM_BUILD_ROOT%{_bindir}/%{name}d || \
230     install -pm 755 %{name}64d $RPM_BUILD_ROOT%{_bindir}/%{name}d
231 matteo 619589 %else
232 joequant 1020270 install -pm 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} || \
233     install -pm 755 %{name}64 $RPM_BUILD_ROOT%{_bindir}/%{name}
234 matteo 619589 %endif
235 joequant 1020270 install -pm 755 castool chdman floptool imgtool jedutil ldresample ldverify \
236 neoclust 1139909 nltool nlwav pngcmp romcmp unidasm $RPM_BUILD_ROOT%{_bindir}
237 matteo 619589 for tool in regrep split src2html srcclean
238     do
239 joequant 1020270 install -pm 755 $tool $RPM_BUILD_ROOT%{_bindir}/%{name}-$tool
240 matteo 619589 done
241 neoclust 1139909 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 joequant 1020270 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 neoclust 1139909 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 joequant 1020270 pushd src/osd/modules/opengl
261 neoclust 1139909 install -pm 644 shader/*.?sh $RPM_BUILD_ROOT%{_datadir}/%{name}/shader
262 joequant 1020270 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 matteo 619589 popd
268 neoclust 1139909 find $RPM_BUILD_ROOT%{_datadir}/%{name} -name LICENSE -exec rm {} \;
269 matteo 619589
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 joequant 1020270 %{_mandir}/man6/mess.6*
282 matteo 619589
283     %files tools
284 joequant 1020270 %{_bindir}/castool
285 matteo 619589 %{_bindir}/chdman
286 joequant 1020270 %{_bindir}/floptool
287     %{_bindir}/imgtool
288 neoclust 1139909 %{_bindir}/jedutil
289 matteo 619589 %{_bindir}/ldresample
290     %{_bindir}/ldverify
291     %{_bindir}/nltool
292 neoclust 1139909 %{_bindir}/nlwav
293 matteo 619589 %{_bindir}/pngcmp
294 neoclust 1139909 %{_bindir}/%{name}-regrep
295 matteo 619589 %{_bindir}/romcmp
296     %{_bindir}/%{name}-split
297     %{_bindir}/%{name}-src2html
298     %{_bindir}/%{name}-srcclean
299     %{_bindir}/unidasm
300 joequant 1020270 %{_mandir}/man1/castool.1*
301 matteo 619589 %{_mandir}/man1/chdman.1*
302 joequant 1020270 %{_mandir}/man1/floptool.1*
303     %{_mandir}/man1/imgtool.1*
304 matteo 619589 %{_mandir}/man1/jedutil.1*
305     %{_mandir}/man1/ldresample.1*
306     %{_mandir}/man1/ldverify.1*
307     %{_mandir}/man1/romcmp.1*
308    
309     %files data
310 neoclust 1139909 %doc README.md whatsnew*.txt
311     %license LICENSE.md LICENSE.BSD3 LICENSE.CC0 LICENSE.MIT
312 matteo 619589 %{_datadir}/%{name}
313     %exclude %{_datadir}/%{name}/hash/*
314    
315     %files data-software-lists
316     %{_datadir}/%{name}/hash/*
317 neoclust 1139909
318     %files doc
319     %doc docs/build/html
320    

  ViewVC Help
Powered by ViewVC 1.1.30