forked from fuel-pcbox/maxima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaxima.spec.in
379 lines (332 loc) · 9.55 KB
/
maxima.spec.in
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# -*- mode: rpm-spec -*-
# By default, this spec file will generate RPMs for clisp
# This can be changed by modifying the variables below.
%define enable_clisp 1
%define clisp_flags --enable-clisp
%define enable_ccl 0
%define ccl_flags --disable-ccl
# --with-ccl=lx86cl
%define enable_cmucl 0
%define cmucl_flags --disable-cmucl
%define enable_sbcl 0
%define sbcl_flags --disable-sbcl
%define enable_gcl 0
%define gcl_flags --disable-gcl
# Options to build language packs
# Spanish
%define enable_lang_es 1
%define lang_es_flags --enable-lang-es
# Spanish UTF-8
%define enable_lang_es_utf 1
%define lang_es_flags_utf --enable-lang-es-utf8
# Portuguese
%define enable_lang_pt 1
%define lang_pt_flags --enable-lang-pt
# Portuguese UTF-8
%define enable_lang_pt_utf 1
%define lang_pt_flags_utf --enable-lang-pt-utf8
# Brazilian Portuguese
%define enable_lang_pt_br 1
%define lang_pt_br_flags --enable-lang-pt_BR
# Brazilian Portuguese (UTF-8)
%define enable_lang_pt_br_utf 1
%define lang_pt_br_flags_utf --enable-lang-pt_BR-utf8
# Inhibit automatic compressing of info files. Compressed info
# files break maxima's internal help.
%define __spec_install_post /bin/true
Summary: Symbolic Computation Program
Name: maxima
Version: @VERSION@
Release: 1
License: GPL
Group: Sciences/Mathematics
URL: http://maxima.sourceforge.net
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: maxima-exec = %{version}
Provides: maxima-doc
%description
Maxima is a system for the manipulation of symbolic
and numerical expressions, including differentiation,
integration, Taylor series, Laplace transforms,
ordinary differential equations, systems of linear
equations, polynomials, sets, lists, vectors, matrices
and tensors.
Maxima yields high precision numeric results by using
exact fractions, arbitrary-precision integers and
arbitrary-precision floating point numbers.
Maxima can plot functions and data in two and three
dimensions, and it comes with hundreds of self tests.
Maxima is based on the original Macsyma developed
at MIT in the 1970's.
%package xmaxima
Summary: Maxima graphics program and graphical interface to Maxima
Group: Sciences/Mathematics
Requires: maxima = %{version}, tk
Provides: xmaxima
%description xmaxima
A graphical interface to the Maxima symbolic computation
program. It also provides a graphics program
that can be used from Maxima, and a Web browser that
accepts a custom html tag to execute Maxima commands from
an html page. Xmaxima is written in the Tcl/Tk language.
%if %{enable_clisp}
%package exec-clisp
Summary: Maxima compiled with clisp
Group: Sciences/Mathematics
Requires: maxima = %{version}
Provides: maxima-exec
%description exec-clisp
Maxima compiled with clisp.
%endif
%if %{enable_ccl}
%package exec-ccl
Summary: Maxima compiled with Clozure CL
Group: Sciences/Mathematics
Requires: maxima = %{version}
Provides: maxima-exec
%description exec-ccl
Maxima compiled with Clozure Common Lisp.
%endif
%if %{enable_cmucl}
%package exec-cmucl
Summary: Maxima compiled with CMUCL
Group: Sciences/Mathematics
Requires: maxima = %{version}
Provides: maxima-exec
%description exec-cmucl
Maxima compiled with CMUCL.
%endif
%if %{enable_sbcl}
%package exec-sbcl
Summary: Maxima compiled with SBCL
Group: Sciences/Mathematics
Requires: maxima = %{version}
Provides: maxima-exec
%description exec-sbcl
Maxima compiled with SBCL.
%endif
%if %{enable_gcl}
%package exec-gcl
Summary: Maxima compiled with GCL
Group: Sciences/Mathematics
Requires: maxima = %{version}
Provides: maxima-exec
%description exec-gcl
Maxima compiled with Gnu Common Lisp.
%endif
%if %{enable_lang_es}
%package lang-es
Summary: Maxima Spanish language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-es
Maxima Spanish language support.
%endif
%if %{enable_lang_es_utf}
%package lang-es-utf8
Summary: Maxima Spanish UTF-8 language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-es-utf8
Maxima Spanish language support (UTF-8).
%endif
%if %{enable_lang_pt}
%package lang-pt
Summary: Maxima Portuguese language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-pt
Maxima Portuguese language support.
%endif
%if %{enable_lang_pt_utf}
%package lang-pt-utf8
Summary: Maxima Portuguese UTF-8 language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-pt-utf8
Maxima Portuguese language support (UTF-8).
%endif
%if %{enable_lang_pt_br}
%package lang-pt_BR
Summary: Maxima Brazilian Portuguese language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-pt_BR
Maxima Brazilian Portuguese language support.
%endif
%if %{enable_lang_pt_br_utf}
%package lang-pt_BR-utf8
Summary: Maxima Brazilian Portuguese UTF-8 language pack
Group: Sciences/Mathematics
Requires: maxima = %{version}
%description lang-pt_BR-utf8
Maxima Brazilian Portuguese language support (UTF-8).
%endif
%prep
%setup -q
%configure %{?sbcl_flags:} %{?cmucl_flags:} %{?gcl_flags:} %{?clisp_flags:} %{?ccl_flags:} \
%{?lang_es_flags:} %{?lang_es_flags_utf:} \
%{?lang_pt_flags:} %{?lang_pt_flags_utf:} \
%{?lang_pt_br_flags:} %{?lang_pt_br_flags_utf:}
%build
make
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
make \
prefix=%{?buildroot:%{buildroot}}%{_prefix} \
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \
bindir=%{?buildroot:%{buildroot}}%{_bindir} \
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \
datadir=%{?buildroot:%{buildroot}}%{_datadir} \
includedir=%{?buildroot:%{buildroot}}%{_includedir} \
libdir=%{?buildroot:%{buildroot}}%{_libdir} \
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \
mandir=%{?buildroot:%{buildroot}}%{_mandir} \
infodir=%{?buildroot:%{buildroot}}%{_infodir} \
install-info
touch debugfiles.list
# Deal with info/dir
rm -f $RPM_BUILD_ROOT%{_datadir}/info/dir
%post
/sbin/install-info %{_infodir}/maxima.info %{_infodir}/dir
%postun
if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/maxima.info %{_infodir}/dir
fi
%post xmaxima
/sbin/install-info %{_infodir}/xmaxima.info %{_infodir}/dir
%postun xmaxima
if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/xmaxima.info %{_infodir}/dir
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%dir %{_datadir}/maxima
%exclude %{_datadir}/maxima/%{version}/xmaxima
%{_datadir}/maxima/%{version}
%if %{enable_lang_es}
%exclude %{_datadir}/maxima/%{version}/doc/html/es
%endif
%if %{enable_lang_pt}
%exclude %{_datadir}/maxima/%{version}/doc/html/pt
%endif
%if %{enable_lang_pt_br}
%exclude %{_datadir}/maxima/%{version}/doc/html/pt_BR
%endif
%if %{enable_lang_es_utf}
%exclude %{_datadir}/maxima/%{version}/doc/html/es.utf8
%endif
%if %{enable_lang_pt_utf}
%exclude %{_datadir}/maxima/%{version}/doc/html/pt.utf8
%endif
%if %{enable_lang_pt_br_utf}
%exclude %{_datadir}/maxima/%{version}/doc/html/pt_BR.utf8
%endif
%dir %{_libexecdir}/maxima
%{_libexecdir}/maxima/%{version}
%{_infodir}/*
%exclude %{_infodir}/xmaxima.info*
%if %{enable_lang_es}
%exclude %{_infodir}/es
%endif
%if %{enable_lang_pt}
%exclude %{_infodir}/pt
%endif
%if %{enable_lang_pt_br}
%exclude %{_infodir}/pt_BR
%endif
%if %{enable_lang_es_utf}
%exclude %{_infodir}/es.utf8
%endif
%if %{enable_lang_pt_utf}
%exclude %{_infodir}/pt.utf8
%endif
%if %{enable_lang_pt_br_utf}
%exclude %{_infodir}/pt_BR.utf8
%endif
%{_mandir}/man1/maxima.1
%{_bindir}/maxima
%{_bindir}/rmaxima
%exclude %{_datadir}/mime/packages/x-mac.xml
%doc AUTHORS COPYING INSTALL INSTALL.lisp NEWS x-mac.xml
%doc README README.lisps README.rpms README.external README.i18n
%files xmaxima
%{_bindir}/xmaxima
%{_datadir}/maxima/%{version}/xmaxima
%{_infodir}/xmaxima*
%if %{enable_clisp}
%files exec-clisp
%{_libdir}/maxima/%{version}/binary-clisp
%endif
%if %{enable_ccl}
%files exec-ccl
%{_libdir}/maxima/%{version}/binary-openmcl
%endif
%if %{enable_cmucl}
%files exec-cmucl
%{_libdir}/maxima/%{version}/binary-cmucl
%endif
%if %{enable_sbcl}
%files exec-sbcl
/usr/lib/maxima/%{version}/binary-sbcl
%endif
%if %{enable_gcl}
%files exec-gcl
%{_libdir}/maxima/%{version}/binary-gcl
%endif
%if %{enable_lang_es}
%files lang-es
%{_datadir}/maxima/%{version}/doc/html/es
%{_infodir}/es
%endif
%if %{enable_lang_es_utf}
%files lang-es-utf8
%{_datadir}/maxima/%{version}/doc/html/es.utf8
%{_infodir}/es.utf8
%endif
%if %{enable_lang_pt}
%files lang-pt
%{_datadir}/maxima/%{version}/doc/html/pt
%{_infodir}/pt
%endif
%if %{enable_lang_pt_utf}
%files lang-pt-utf8
%{_datadir}/maxima/%{version}/doc/html/pt.utf8
%{_infodir}/pt.utf8
%endif
%if %{enable_lang_pt_br}
%files lang-pt_BR
%{_datadir}/maxima/%{version}/doc/html/pt_BR
%{_infodir}/pt_BR
%endif
%if %{enable_lang_pt_br_utf}
%files lang-pt_BR-utf8
%{_datadir}/maxima/%{version}/doc/html/pt_BR.utf8
%{_infodir}/pt_BR.utf8
%endif
%doc
%changelog
* Sat Jan 20 2007 Vadim Zhytnikov <[email protected]>
- Brazilian Portuguese language packs.
* Mon Dec 11 2006 Jaime Villate <[email protected]>
- Moved xmaxima files to the maxima-xmaxima package.
- Updated description of Xmaxima.
* Wed Dec 28 2005 Vadim Zhytnikov <[email protected]>
- Spanish and Portuguese language packs.
- Package maxima subdirectories for clean uninstall.
* Sat Jan 4 2003 James Amundson <[email protected]>
- Added doc files
- Added explicit clisp version
- Added conditional to postun
- Renamed exec_* packages to exec-*
- Use rpm macros instead of hard-coded paths
- Thanks to Rex Dieter for helpful suggestions
* Sun Sep 8 2002 James Amundson <[email protected]>
- Initial build.