%define name giac
%define version 1.9.0
%define release 1

Name: %{name} 
Summary: Computer Algebra System
Version: %{version} 
Release: %{release} 
License: see /usr/share/doc/giac/COPYING
Source0: giac-1.4.9.tar.bz2
URL: http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Group: Sciences/Mathematics
Vendor: Bernard Parisse
BuildRoot: %{_tmppath}/%{name}-buildroot 
BuildRequires: gcc-c++
BuildRequires: gmp-devel, gsl-devel

%description
CAS

%package devel
Summary: Development files for libgiac
Requires: %{name}

%description devel
Development files for libgiac.

%prep 
##rm -rf $RPM_BUILD_ROOT/
%setup -q

%build 
LDFLAGS+='-L/usr32/lib -lX11'
export LDFLAGS
CFLAGS+='-m32 -I/usr32/include'
export CFLAGS
CXXFLAGS+='-m32 -I/usr32/include'
export CXXFLAGS
##export LIBS='/usr/local/lib/libpari.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a'

%configure
%__make

%install
%__rm -rf $RPM_BUILD_ROOT
%__make DESTDIR=$RPM_BUILD_ROOT install

%clean
%__rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/libgiac.so*
%{_libdir}/libgiac.la
%{_datadir}/giac
%{_datadir}/doc/giac
%{_datadir}/info/giac_*.info.gz
%{_datadir}/locale/*/LC_MESSAGES/giac.mo
##%{_datadir}/info/dir
%{_datadir}/applications/xcas.desktop
%{_datadir}/application-registry/xcas.applications
%{_datadir}/pixmaps/xcas.xpm
##%{_datadir}/man/man1/*

%files devel
%defattr(-,root,root)
%{_includedir}/giac
%{_libdir}/libgiac.a

%changelog 
* Sun Sep 10 2017 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 1.4.9
Alpha release
* Wed Nov 24 2010 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.9.1
Alpha release
* Wed Sep 26 2007 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.8.1
Alpha release
* Mon Jul  2 2007 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.7.1
Alpha release
* Wed Feb 28 2007 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.6.3
Unstable release
* Sat Aug  5 2006 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.6.2
Unstable release
* Sat Aug  5 2006 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.6.1
Unstable release
* Wed Oct 12 2005 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.5.1
Stable release
* Wed Dec 01 2004 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.5.0
Stable release
* Mon Mar 15 2004 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.3.0-9
First stable release candidate
* Tue Oct 21 2003 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.3.0-4
Updated
* Fri Apr 17 2003 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.3.0-1
Revision 0.3.0
* Mon Dec 09 2002 Bernard Parisse <parisse@fourier.ujf-grenoble.fr> 0.2.4-2 
First RPM-packaged version
