1 |
Name: mathomatic |
2 |
Version: 15.3.7 |
3 |
Release: %mkrel 1 |
4 |
Epoch: 0 |
5 |
Summary: General purpose CAS (Computer Algebra System) |
6 |
URL: http://mathomatic.orgserve.de/math/ |
7 |
Source0: http://www.panix.com/~gesslein/%{name}-%{version}.tar.bz2 |
8 |
License: LGPLv2 |
9 |
Group: Sciences/Mathematics |
10 |
Requires(post): desktop-file-utils |
11 |
Requires(postun): desktop-file-utils |
12 |
BuildRequires: desktop-file-utils |
13 |
BuildRequires: ncurses-devel |
14 |
BuildRequires: readline-devel |
15 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
16 |
|
17 |
%description |
18 |
Mathomatic is a portable, general purpose CAS (Computer Algebra System) |
19 |
written entirely in C. It is free software (GNU LGPL license). This is a |
20 |
console mode application and library that easily compiles and runs under |
21 |
any operating system with a C compiler. There are no dependencies other |
22 |
than the standard C libraries. Mathomatic has been under development |
23 |
since 1986 and now stands at 16,000 lines of highly efficient code. The |
24 |
author is George Gesslein II. |
25 |
|
26 |
%prep |
27 |
%setup -q |
28 |
%{__cat} > makefile.lib << EOF |
29 |
all: |
30 |
EOF |
31 |
%{__mkdir_p} lib |
32 |
%{__cp} -a makefile.lib lib/makefile |
33 |
%{__mkdir_p} %{name}_secure |
34 |
%{__mkdir_p} %{name}_secure/lib |
35 |
%{__cp} -a makefile.lib %{name}_secure/lib/makefile |
36 |
%{__cp} -a *.[ch] makefile VERSION %{name}_secure |
37 |
|
38 |
%build |
39 |
%{__sed} -e 's/-O3 /%{optflags} /' makefile > makefile.opt |
40 |
%{make} CC=%{__cc} READLINE=1 LDFLAGS="%{ldflags}" AOUT=%{name} -f makefile.opt |
41 |
%{make} CC=%{__cc} READLINE=1 LDFLAGS="%{ldflags}" AOUT=%{name} -f makefile.opt check |
42 |
cd %{name}_secure |
43 |
%{__ln_s} ../%{name}.1 . |
44 |
%{__ln_s} ../doc . |
45 |
%{__ln_s} ../primes . |
46 |
%{__sed} -e 's/-O3 /%{optflags} -DSECURE -DTIMEOUT_SECONDS=3600 /' makefile > makefile.secure |
47 |
%{make} CC=%{__cc} READLINE=1 LDFLAGS="%{ldflags}" AOUT=%{name}_secure -f makefile.secure |
48 |
cd .. |
49 |
|
50 |
%install |
51 |
%{__rm} -rf %{buildroot} |
52 |
%makeinstall docdir=%{buildroot}%{_docdir}/%{name} |
53 |
%{__rm} -rf %{buildroot}%{_docdir}/%{name} |
54 |
%{__rm} -rf doc/%{name}.1 |
55 |
cd %{name}_secure |
56 |
%{__install} -m 755 %{name}_secure %{buildroot}%{_bindir}/%{name}_secure |
57 |
cd .. |
58 |
%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/mathomatic.desktop |
59 |
|
60 |
%post |
61 |
%{update_desktop_database} |
62 |
|
63 |
%postun |
64 |
%{clean_desktop_database} |
65 |
|
66 |
%clean |
67 |
%{__rm} -rf %{buildroot} |
68 |
|
69 |
%files |
70 |
%defattr(0644,root,root,0755) |
71 |
%doc changes.txt README.txt VERSION doc/ tests/ |
72 |
%defattr(-,root,root) |
73 |
%{_bindir}/%{name} |
74 |
%{_bindir}/%{name}_secure |
75 |
%{_mandir}/man1/mathomatic.1* |
76 |
%{_datadir}/applications/mathomatic.desktop |
77 |
%{_datadir}/pixmaps/mathomatic.png |
78 |
%{_datadir}/pixmaps/mathomatic.xpm |
79 |
|
80 |
|