/[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 1139998 - (hide annotations) (download)
Sat Aug 12 19:21:43 2017 UTC (6 years, 8 months ago) by neoclust
File size: 10439 byte(s)
SILENT: Fix BR
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 1139911 #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 neoclust 1139994 BuildRequires: utf8proc-devel
43 neoclust 1139998 BuildRequires: python-sphinx
44 matteo 619589 Requires: %{name}-data = %{version}-%{release}
45    
46 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
47     Provides: bundled(bx)
48 joequant 1020270 Provides: bundled(bgfx)
49 neoclust 1139909 #fedora contains linenoise package but it is not compatible
50     Provides: bundled(linenoise)
51     #Below have no fedora packages ATM and are very tiny
52 joequant 1020270 Provides: bundled(lsqlite3)
53     Provides: bundled(luafilesystem)
54 neoclust 1139909 Provides: bundled(lua-linenoise)
55 joequant 1020270 Provides: bundled(lua-zlib)
56 neoclust 1139909 #lzma is not made to be linked dynamically
57     Provides: bundled(lzma-sdk) = 16.04
58     #softfloat is not made to be linked dynamically
59 joequant 1020270 Provides: bundled(softfloat)
60 neoclust 1139909 #ldplayer has been turned into a regular mame driver in 0.180 cycle
61     Provides: %{name}-ldplayer = %{version}-%{release}
62     Obsoletes: %{name}-ldplayer < 0.179-4
63 matteo 619589
64 joequant 1020270
65 matteo 619589 %description
66     MAME stands for Multiple Arcade Machine Emulator. When used in conjunction
67     with an arcade game's data files (ROMs), MAME will more or less faithfully
68     reproduce that game on a PC.
69    
70     The ROM images that MAME utilizes are "dumped" from arcade games' original
71     circuit-board ROM chips. MAME becomes the "hardware" for the games, taking
72     the place of their original CPUs and support chips. Therefore, these games
73     are NOT simulations, but the actual, original games that appeared in arcades.
74    
75     MAME's purpose is to preserve these decades of video-game history. As gaming
76     technology continues to rush forward, MAME prevents these important "vintage"
77     games from being lost and forgotten. This is achieved by documenting the
78     hardware and how it functions, thanks to the talent of programmers from the
79     MAME team and from other contributors. Being able to play the games is just
80     a nice side-effect, which doesn't happen all the time. MAME strives for
81     emulating the games faithfully.
82    
83     %package tools
84     Summary: Additional tools for MAME
85 neoclust 1139909 Requires: %{name}%{?_isa} = %{version}-%{release}
86 matteo 619589
87     %description tools
88     %{summary}.
89    
90     %package data
91 joequant 1020270 Summary: Data files used by MAME
92 matteo 619589
93     BuildArch: noarch
94    
95     %description data
96     %{summary}.
97    
98     %package data-software-lists
99 joequant 1020270 Summary: Software lists used by MAME
100 matteo 619589 Requires: %{name}-data = %{version}-%{release}
101    
102     BuildArch: noarch
103    
104     %description data-software-lists
105     %{summary}. These are split from the main -data
106     subpackage due to relatively large size.
107    
108 neoclust 1139909 %package doc
109     Summary: Documentation for MAME
110 matteo 619589
111 neoclust 1139909 BuildArch: noarch
112    
113     %description doc
114     HTML documentation for MAME.
115    
116    
117 matteo 619589 %prep
118     %setup -qcT
119 neoclust 1139909
120     #do not extract system libs or document themes to ensure system ones are used
121     7za x \
122     -xr!3rdparty/expat \
123     -xr!3rdparty/genie/src/host/lua-5.3.0 \
124     -xr!3rdparty/libflac \
125     -xr!3rdparty/libjpeg \
126     -xr!3rdparty/lua \
127     -xr!3rdparty/portaudio \
128     -xr!3rdparty/portmidi \
129     -xr!3rdparty/SDL2 \
130     -xr!3rdparty/SDL2-override \
131     -xr!3rdparty/sqlite3 \
132     -xr!3rdparty/utf8proc \
133     -xr!3rdparty/zlib \
134     -xr!docs/themes \
135     %{SOURCE0}
136    
137 joequant 1020270 install -pm 644 %{SOURCE1} whatsnew_0%{baseversion}.txt
138    
139 neoclust 1139909 find \( -regex '.*\.\(c\|cpp\|fsh\|fx\|h\|lua\|make\|map\|md\|txt\|vsh\|xml\)$' \
140     -o -wholename ./makefile \) -exec sed -i 's@\r$@@' {} \;
141 joequant 1020270
142 matteo 619589 %patch0 -p1 -b .fortify
143 neoclust 1139911 #patch1 -p1 -b .systemlua
144 matteo 619589
145     # Create ini files
146     cat > %{name}.ini << EOF
147     # Define multi-user paths
148     artpath %{_datadir}/%{name}/artwork;%{_datadir}/%{name}/effects
149 neoclust 1139909 bgfx_path %{_datadir}/%{name}/bgfx
150 matteo 619589 cheatpath %{_datadir}/%{name}/cheat
151 joequant 1020270 crosshairpath %{_datadir}/%{name}/crosshair
152 matteo 619589 ctrlrpath %{_datadir}/%{name}/ctrlr
153     fontpath %{_datadir}/%{name}/fonts
154     hashpath %{_datadir}/%{name}/hash
155 neoclust 1139909 languagepath %{_datadir}/%{name}/language
156     pluginspath %{_datadir}/%{name}/plugins
157 matteo 619589 rompath %{_datadir}/%{name}/roms;%{_datadir}/%{name}/chds
158     samplepath %{_datadir}/%{name}/samples
159    
160     # Allow user to override ini settings
161     inipath \$HOME/.%{name}/ini;%{_sysconfdir}/%{name}
162    
163     # Set paths for local storage
164     cfg_directory \$HOME/.%{name}/cfg
165     comment_directory \$HOME/.%{name}/comments
166     diff_directory \$HOME/.%{name}/diff
167     input_directory \$HOME/.%{name}/inp
168     nvram_directory \$HOME/.%{name}/nvram
169     snapshot_directory \$HOME/.%{name}/snap
170     state_directory \$HOME/.%{name}/sta
171    
172     # Fedora custom defaults
173     video opengl
174     autosave 1
175     EOF
176    
177 neoclust 1139909 #ensure genie uses $RPM_OPT_FLAGS and $RPM_LD_FLAGS
178     sed -i "s@-Wall -Wextra -Os@$RPM_OPT_FLAGS@" 3rdparty/genie/build/gmake.linux/genie.make
179     sed -i "s@\. -s@\. $RPM_LD_FLAGS@" 3rdparty/genie/build/gmake.linux/genie.make
180 matteo 619589
181 neoclust 1139909 #rename various license files so that they can be installed with %%license
182     mv artwork/LICENSE LICENSE.CC0
183     mv bgfx/LICENSE LICENSE.BSD3
184     mv plugins/json/LICENSE LICENSE.MIT
185    
186 matteo 619589 %build
187     #save some space
188 neoclust 1139909 MAME_FLAGS="NOWERROR=1 OPTIMIZE=2 VERBOSE=1 USE_SYSTEM_LIB_EXPAT=1 \
189 joequant 1020270 USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1 \
190     USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_PORTMIDI=1 \
191 neoclust 1139909 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_UTF8PROC=1 \
192 joequant 1020270 SDL_INI_PATH=%{_sysconfdir}/%{name};"
193 matteo 619589
194 neoclust 1139909 #standard -g causes builder to run out of memory
195     RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@")
196 joequant 1020270
197 matteo 619589 %if %{with debug}
198 neoclust 1139909 %make_build $MAME_FLAGS DEBUG=1 TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \
199     LDOPTS="$RPM_LD_FLAGS"
200 matteo 619589 %else
201 neoclust 1139909 %make_build $MAME_FLAGS TOOLS=1 OPT_FLAGS="$RPM_OPT_FLAGS" \
202     LDOPTS="$RPM_LD_FLAGS"
203 matteo 619589 %endif
204    
205 neoclust 1139909 pushd docs
206     %make_build html
207     popd
208    
209    
210 matteo 619589 %install
211 neoclust 1139909 rm -rf $RPM_BUILD_ROOT
212    
213 matteo 619589 # create directories
214 joequant 1020270 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
215 matteo 619589 for folder in cfg comments diff ini inp memcard nvram snap sta
216     do
217 joequant 1020270 install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel/.%{name}/$folder
218 matteo 619589 done
219 joequant 1020270 install -d $RPM_BUILD_ROOT%{_bindir}
220 neoclust 1139909 for folder in artwork bgfx chds cheats ctrlr effects fonts hash language \
221     plugins hlsl keymaps roms samples shader
222 matteo 619589 do
223 joequant 1020270 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/$folder
224 matteo 619589 done
225 joequant 1020270 install -d $RPM_BUILD_ROOT%{_mandir}/man1
226     install -d $RPM_BUILD_ROOT%{_mandir}/man6
227 matteo 619589
228     # install files
229 joequant 1020270 install -pm 644 %{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
230 matteo 619589 %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 neoclust 1139909 nltool nlwav 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 neoclust 1139909 pushd artwork
244     find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork/{} \;
245     find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/artwork/{} \;
246     popd
247     pushd bgfx
248     find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/bgfx/{} \;
249     find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/bgfx/{} \;
250     popd
251 joequant 1020270 install -pm 644 hash/* $RPM_BUILD_ROOT%{_datadir}/%{name}/hash
252     install -pm 644 hlsl/*.fx $RPM_BUILD_ROOT%{_datadir}/%{name}/hlsl
253     install -pm 644 keymaps/* $RPM_BUILD_ROOT%{_datadir}/%{name}/keymaps
254 neoclust 1139909 pushd language
255     find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/language/{} \;
256     find -type f -name \*.mo -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/language/{} \;
257     popd
258     pushd plugins
259     find -type d -exec install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/{} \;
260     find -type f -exec install -pm 644 {} $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/{} \;
261     popd
262 joequant 1020270 pushd src/osd/modules/opengl
263 neoclust 1139909 install -pm 644 shader/*.?sh $RPM_BUILD_ROOT%{_datadir}/%{name}/shader
264 joequant 1020270 popd
265     pushd docs/man
266     install -pm 644 castool.1 chdman.1 imgtool.1 floptool.1 jedutil.1 ldresample.1 \
267     ldverify.1 romcmp.1 $RPM_BUILD_ROOT%{_mandir}/man1
268     install -pm 644 mame.6 mess.6 $RPM_BUILD_ROOT%{_mandir}/man6
269 matteo 619589 popd
270 neoclust 1139909 find $RPM_BUILD_ROOT%{_datadir}/%{name} -name LICENSE -exec rm {} \;
271 matteo 619589
272    
273     %files
274     %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
275     %dir %{_sysconfdir}/%{name}
276     %{_sysconfdir}/skel/.%{name}
277     %if %{with debug}
278     %{_bindir}/%{name}d
279     %else
280     %{_bindir}/%{name}
281     %endif
282     %{_mandir}/man6/mame.6*
283 joequant 1020270 %{_mandir}/man6/mess.6*
284 matteo 619589
285     %files tools
286 joequant 1020270 %{_bindir}/castool
287 matteo 619589 %{_bindir}/chdman
288 joequant 1020270 %{_bindir}/floptool
289     %{_bindir}/imgtool
290 neoclust 1139909 %{_bindir}/jedutil
291 matteo 619589 %{_bindir}/ldresample
292     %{_bindir}/ldverify
293     %{_bindir}/nltool
294 neoclust 1139909 %{_bindir}/nlwav
295 matteo 619589 %{_bindir}/pngcmp
296 neoclust 1139909 %{_bindir}/%{name}-regrep
297 matteo 619589 %{_bindir}/romcmp
298     %{_bindir}/%{name}-split
299     %{_bindir}/%{name}-src2html
300     %{_bindir}/%{name}-srcclean
301     %{_bindir}/unidasm
302 joequant 1020270 %{_mandir}/man1/castool.1*
303 matteo 619589 %{_mandir}/man1/chdman.1*
304 joequant 1020270 %{_mandir}/man1/floptool.1*
305     %{_mandir}/man1/imgtool.1*
306 matteo 619589 %{_mandir}/man1/jedutil.1*
307     %{_mandir}/man1/ldresample.1*
308     %{_mandir}/man1/ldverify.1*
309     %{_mandir}/man1/romcmp.1*
310    
311     %files data
312 neoclust 1139909 %doc README.md whatsnew*.txt
313     %license LICENSE.md LICENSE.BSD3 LICENSE.CC0 LICENSE.MIT
314 matteo 619589 %{_datadir}/%{name}
315     %exclude %{_datadir}/%{name}/hash/*
316    
317     %files data-software-lists
318     %{_datadir}/%{name}/hash/*
319 neoclust 1139909
320     %files doc
321     %doc docs/build/html
322    

  ViewVC Help
Powered by ViewVC 1.1.30