forked from atari800/atari800
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atari800.spec
253 lines (190 loc) · 5.15 KB
/
atari800.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# generic defines used by all distributions.
#
%define ver 5.0.0
# When adding a target, add an $options_<target_name> variable to the %build
# section, and add %{_bindir}/%{name}-<target_name> to the files list in the
# %files section.
%define targets sdl
%define maintarget sdl
%define myrelease 1
%define mybuild 1
%define _rel %{myrelease}.%{mybuild}
# define the package groups. If they all followed the same naming convention,
# these would be the same. They don't, and so they aren't :(
#
%define suse_group System/Emulators/Other
%define mandriva_group Console/Emulators
%define fedora_group Console/Emulators
# defaults
#
%define group Console/Emulators
%define rel %{_rel}
%define my_suse 0
%define my_mandriva 0
%define my_fedora 0
%define my_centos 0
%if 0%{?suse_version:1}%{?sles_version:1}
%define my_suse 1
%endif
# if present, use %distversion to find out which Mandriva version is being built
#
%if 0%{?distversion:1}
%if 0%{?!mandriva_version:1}
%define mandriva_version %(echo $[%{distversion}/10])
%endif
%endif
%if 0%{?mandriva_version:1}
%define my_mandriva 1
%define my_vendor mandriva
%endif
# if present, decode %dist to find out which OS package is being built on
#
%if 0%{?dist:1}
# Centos or Fedora
#
%define my_which_os %(i=%{dist} ; if [ "${i::3}" == ".fc" ] ; then echo "1" ; else echo "0" ; fi )
%if %{my_which_os}
%if 0%{?!fedora_version:1}
%define fedora_version %(i=%{dist} ; echo "${i:3}" )
%endif
%else
%if 0%{?!centos_version:1}
%define centos_version %(i=%{dist} ; echo "${i:3}00" )
%endif
%endif
%endif
%if 0%{?fedora_version:1}
%define my_fedora 1
%define my_vendor fedora
%endif
%if 0%{?centos_version:1}
%define my_centos 1
%define my_vendor centos
%endif
%if %{my_suse}
%if %{suse_version}
%define rel %{myrelease}.suse%(echo $[%suse_version/10]).%{mybuild}
%else
%define rel %{myrelease}.sles%{sles_version}.%{mybuild}
%endif
%define group %{suse_group}
%endif
# building on a Mandriva/Mandrake Linux system.
#
# this should create a release that conforms to the Mandriva naming conventions.
#
%if %{my_mandriva}
%define rel %{myrelease}.mdv%{mandriva_version}.%{mybuild}
%define group %{mandriva_group}
%endif
# building on a Fedora Core Linux system.
#
# this should create a release that conforms to the Fedora naming conventions.
#
%if %{my_fedora}
%if 0%{?!fedora_version:1}
%define fedora_version %(i="%dist" ; echo "${i:3}")
%endif
%if 0%{?!dist:1}
%define dist .fc%{fedora_version}
%endif
%define rel %{myrelease}%{dist}.%{mybuild}
%define group %{fedora_group}
%endif
# building on a Centos Linux system.
#
# this should create a release that conforms to the Centos naming conventions.
#
%if %{my_centos}
%if 0%{?!centos_version:1}
%define centos_version %(i="%dist" ; echo "${i:3}")
%endif
%if 0%{?!dist:1}
%define dist .el%{centos_version}
%endif
%define rel %{myrelease}%{dist}.%{mybuild}
%define group %{fedora_group}
%endif
%if %{my_suse}
Requires: SDL >= 1.2.10
BuildRequires: SDL-devel >= 1.2.10
%endif
%if %{my_mandriva}
Requires: libSDL >= 1.2.10
BuildRequires: libSDL-devel >= 1.2.10
%endif
%if %{my_fedora}
Requires: SDL >= 1.2.10
BuildRequires: SDL-devel >= 1.2.10
%endif
# Now for the meat of the spec file
#
Name: atari800
Version: %{ver}
Summary: An emulator of 8-bit Atari personal computers
License: GPLv2
URL: http://atari800.github.io/
Source: http://prdownloads.sourceforge.net/atari800/%{name}-%{version}.tar.gz
Group: %{group}
Release: %{rel}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: zlib-devel
BuildRequires: libpng-devel
BuildRequires: readline-devel
%description
Atari800 is an emulator for Atari 8-bit computer systems including the 400,
800, 1200XL, 600XL, 800XL, 65XE, 130XE, 800XE and the XE Game System, and also
for the Atari 5200 SuperSystem console. It can be used on console, FrameBuffer
or X11. It features excellent compatibility, HIFI sound support, artifacting
emulation, precise cycle-exact ANTIC/GTIA emulation and more.
Authors:
David Firth
and Atari800 Development Team (see CREDITS for a full list)
%prep
%setup -q -n %{name}-%{version}
%build
options_sdl="--with-video=sdl --with-sound=sdl"
#options_ncurses="--with-video=ncurses --with-sound=oss"
#options_x11="--target=x11 --with-sound=oss"
for target in %{targets}
do
%configure `eval echo \\\$options_${target}`
%{__make} %{?jobs:-j%jobs}
mv src/%{name} src/%{name}-${target}
%{__make} clean
done
touch atari800
%install
cd src
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_mandir}/man1
for target in %{targets}
do
install -m 755 %{name}-$target %{buildroot}/%{_bindir}
done
(
cd %{buildroot}/%{_bindir}
ln -sf %{name}-%{maintarget} %{name}
)
mv %{name}.man %{name}.1
install -m 644 %{name}.1 %{buildroot}/%{_mandir}/man1/
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}-%{maintarget}
%{_mandir}/man1/%{name}.1.*
%doc COPYING
%doc README.TXT
%doc DOC/BUGS
%doc DOC/ChangeLog
%doc DOC/CREDITS
%doc DOC/FAQ
%doc DOC/INSTALL
%doc DOC/NEWS
%doc DOC/PORTING
%doc DOC/README
%doc DOC/TODO
%doc DOC/USAGE
%clean
%{__rm} -rf %{buildroot}
%{__rm} -rf %{_builddir}/%{name}-%{version}-%{release}-buildroot