Blob Blame History Raw
Summary:       Small, portable symbolic math program
Name:          mathomatic
Version:       16.0.5
Release:       4%{?dist} 
License:       LGPLv2
Group:         Applications/Engineering
URL:           http://www.mathomatic.org/math/
Source0:       http://mathomatic.org/mathomatic-%{version}.tar.bz2
Patch0:        mathomatic-16.0.5-libedit.patch
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
BuildRequires: libedit-devel
BuildRequires: htmldoc
BuildRequires: ImageMagick
# for make test
BuildRequires: time
Requires:      m4
Requires:      rlwrap

%description
Mathomatic is a small, portable symbolic math program that can
automatically solve, simplify, differentiate, combine, and compare
algebraic equations, perform polynomial and complex arithmetic,
etc. It was written by George Gesslein II and has been under
development since 1986.

%package tools
Summary:  Various small math tools from mathomatic
Group:    Applications/Engineering
Requires: %{name} = %{version}-%{release}

%description tools
This package contains small math tools from mathomatic to
 - calculate Pascal's triangle
 - compute any number of consecutive prime numbers
 - find the minimum number of positive integers that when squared 
   and added together, equal the given number

%prep
%setup -q
%patch0 -p1

%build
%{__make} %{?_smp_mflags} OPTFLAGS="%{optflags}" EDITLINE=1 prefix=%{_prefix} 
#{__make} pdf
pushd primes
%{__make} %{?_smp_mflags} prefix=%{_prefix} CFLAGS="%{optflags}"

%install
%{__rm} -rf %{buildroot}
%{__make} m4install-degrees DESTDIR=%{buildroot} prefix=%{_prefix}
%{__ln_s} %{name}.1.gz %{buildroot}/%{_mandir}/man1/rmath.1.gz
%{__ln_s} %{name}.1.gz %{buildroot}/%{_mandir}/man1/matho.1.gz
%{__rm} -rf %{buildroot}%{_datadir}/doc/%{name}
desktop-file-install --delete-original \
    --dir %{buildroot}%{_datadir}/applications  \
    %{buildroot}%{_datadir}/applications/%{name}.desktop
pushd primes
%{__make} install prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir}
convert  %{buildroot}%{_datadir}/pixmaps/%{name}.xpm \
         %{buildroot}%{_datadir}/pixmaps/%{name}.png
%{__rm} -f %{buildroot}%{_datadir}/pixmaps/%{name}.xpm

%check
%{__make} test
pushd primes
%{__make} test

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING README.txt changes.txt doc
%{_bindir}/%{name}
%{_bindir}/rmath
%{_bindir}/matho
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/rmath.1*
%{_mandir}/man1/matho.1*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}

%files tools
%defattr(-, root, root, -)
%{_bindir}/matho-sum
%{_bindir}/matho-mult
%{_bindir}/matho-pascal
%{_bindir}/matho-primes
%{_bindir}/matho-sumsq
%{_bindir}/primorial
%{_mandir}/man1/matho-sum.1*
%{_mandir}/man1/matho-mult.1*
%{_mandir}/man1/matho-pascal.1*
%{_mandir}/man1/matho-primes.1*
%{_mandir}/man1/matho-sumsq.1*
%{_mandir}/man1/primorial.1*

%changelog
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 16.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 16.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Dec 26 2012 Terje Rosten <terje.rosten@ntnu.no> - 16.0.5-2
- Switch to libedit
- Disable pdf build (htmldoc crashes)

* Mon Nov 19 2012 Terje Rosten <terje.rosten@ntnu.no> - 16.0.5-1
- 16.0.5

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Apr 21 2012 Terje Rosten <terje.rosten@ntnu.no> - 15.8.2-1
- 15.8.2

* Wed Feb 01 2012 Terje Rosten <terje.rosten@ntnu.no> - 15.7.3-1
- 15.7.3

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.6.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Oct 18 2011 Terje Rosten <terje.rosten@ntnu.no> - 15.6.5-1
- 15.6.5

* Thu Jul 21 2011 Terje Rosten <terje.rosten@ntnu.no> - 15.6.2-1
- 15.6.2

* Sat Mar 05 2011 Terje Rosten <terje.rosten@ntnu.no> - 15.5.0-1
- 15.5.0
- Fix rmath support

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan 17 2011 Terje Rosten <terje.rosten@ntnu.no> - 15.4.0-1
- 15.4.0
- Add rmath (#661410)

* Fri Nov  5 2010 Terje Rosten <terje.rosten@ntnu.no> - 15.3.2-1
- 15.3.2

* Sat Jul 31 2010 Terje Rosten <terje.rosten@ntnu.no> - 15.1.5-1
- 15.1.5

* Thu Jun 17 2010 Terje Rosten <terje.rosten@ntnu.no> - 15.1.3-1
- 15.1.3

* Thu Apr 29 2010 Terje Rosten <terje.rosten@ntnu.no> - 15.0.7-1
- 15.0.7

* Sat Dec  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 15.0.0-1
- 15.0.0

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb  8 2009 Terje Rosten <terje.rosten@ntnu.no> - 14.3.1-1
- 14.3.1

* Mon Jan  5 2009 Terje Rosten <terje.rosten@ntnu.no> - 14.2.8-1
- 14.2.8

* Fri Aug 22 2008 Terje Rosten <terje.rosten@ntnu.no> - 14.1.4-1
- 14.1.4
- add build patch (add optflags, dont strip)

* Wed Jun  4 2008 Terje Rosten <terje.rosten@ntnu.no> - 14.0.4-1
- 14.0.4

* Wed May 21 2008 Terje Rosten <terje.rosten@ntnu.no> - 14.0.3-1
- 14.0.3
- cleanup
- build with readline support
- add tools subpackage

* Mon Nov  5 2007 Dries Verachtert - 12.7.9-1
- Updated to release 12.7.9.

* Tue Apr 27 2004 Dries Verachtert - 11.0e-1
- Initial package.