%define name pari %define pari_version 2.3.5 %define gp2c_version 0.0.5pl9 %define release %mkrel 7 %define lib_name_orig lib%{name} %define lib_major 2 %define lib_name %mklibname %{name} %{lib_major} Summary: PARI/GP - Number Theory-oriented Computer Algebra System Name: %{name} Version: %{pari_version} Release: %{release} License: GPL Group: Sciences/Mathematics Source0: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz Source1: http://pari.math.u-bordeaux.fr/pub/pari/packages/elldata.tgz Source2: http://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz Source3: http://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz Source4: http://pari.math.u-bordeaux.fr/pub/pari/packages/nftables.tgz Source5: http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz URL: http://pari.math.u-bordeaux.fr/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Patch0: pari-arch.patch Patch1: pari-Werror=format.patch BuildRequires: perl-devel BuildRequires: libgmp-devel BuildRequires: libx11-devel BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: tetex tetex-dvips BuildRequires: emacs Requires: perl Suggests: xdvi %description PARI/GP is a widely used computer algebra system designed for fast computations in number theory (factorizations, algebraic number theory, elliptic curves...), but also contains a large number of other useful functions to compute with mathematical entities such as matrices, polynomials, power series, algebraic numbers, etc., and a lot of transcendental functions. PARI is also available as a C library to allow for faster computations. %package data Group: Sciences/Mathematics Summary: Optional pari data packages Requires: %{name} > 2.2.10 %description data elldata is PARI/GP version of J. E. Cremona Elliptic Curve Data, needed by ellsearch and ellidentify. galdata is needed by polgalois to compute Galois group in degrees 8 through 11. seadata is needed by ellap for large primes. nftables is a repackaging of the historical megrez number field tables (errors fixed, 1/10th the size, easier to use). %package -n %{lib_name} Group: System/Libraries Summary: Shared PARI library Provides: %{lib_name_orig} = %{version}-%{release} %description -n %{lib_name} This package contains the libraries needed to run pari. %package -n %{lib_name}-devel Group: System/Libraries Summary: Development files for PARI shared library Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-devel = %{version}-%{release} %description -n %{lib_name}-devel This package contains the header files needed to develop applications using pari. %package -n gp2c Summary: PARI/GP to C translator Version: %{gp2c_version} Group: Development/C Requires: pari %description -n gp2c PARI/GP to C translator. Use it to compile your own C programs which use pari library, without necessarily being a C programmer. Note: use gp2c-run to run your programs inside the PARI/GP environment. %prep %setup -q -a1 -a2 -a3 -a4 -a5 mv -f nftables data %patch0 -p1 %patch1 -p1 %build %define pkgdocdir %{_docdir}/%{name} %define pkgdatadir %{_datadir}/%{name}-%{pari_version} sh Configure \ --prefix=%{_prefix} \ --includedir=%{_includedir}/%{name} \ --datadir=%{pkgdatadir}/data \ --sysdatadir=%{_libdir}/%{name}-%{pari_version} \ --share-prefix=%{_datadir} \ --host=%{_arch}-%{_os} \ --graphic=X11 \ --with-gmp make gp doc bench # gp2c cd gp2c-%{gp2c_version} %configure --datadir=%{pkgdatadir} \ --with-paricfg=../Olinux-%{_arch}/pari.cfg make cd .. %install rm -rf %{buildroot} # pari, libpari & libpari-devel %makeinstall_std \ READMEDIR='$(DESTDIR)'%{pkgdocdir} \ LIBDIR='$(DESTDIR)'%{_libdir} \ DOCDIR='$(DESTDIR)'%{pkgdocdir} # gp2c cd gp2c-%{gp2c_version} %makeinstall_std \ docdir=%{_docdir} cd .. # Install global configuration file. mkdir %{buildroot}/%{_sysconfdir} # Add some more reasonable "commented" sample configurations sed -e 's@/usr/local/@%{_prefix}/@' \ -e 's@path =.*@path = "%{pkgdatadir}:.:~/gpdir"@' \ -e 's@lib/gpalias@misc/gpalias@' \ misc/gprc.dft > %{buildroot}/%{_sysconfdir}/gprc # don't need to install this file... rm -f %{pkgdocdir}/%{name}/Makefile # gphelp wants docs in %{pkgdatadir}/data/doc (removing the /data/ requirement) ln -sf %{pkgdocdir} %{buildroot}%{pkgdatadir}/doc perl -pi -e 's@%{pkgdatadir}/data@%{pkgdatadir}@;' \ %{buildroot}/%{_bindir}/gphelp %clean rm -rf %{buildroot} %if %mdkversion < 200900 %post -n %{lib_name} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{lib_name} -p /sbin/ldconfig %endif %files %defattr(-,root,root) %config(noreplace) %attr(644,root,root) %{_sysconfdir}/gprc %{_bindir}/gp-2.3 %{_bindir}/gp %{_bindir}/gphelp %{_bindir}/tex2mail %{_mandir}/man1/[^g]*.1* %{_mandir}/man1/gp.1* %{_mandir}/man1/gp-*.1* %{_mandir}/man1/gphelp.1* %doc AUTHORS CHANGES COMPAT MACHINES README %dir %{pkgdatadir} %{pkgdatadir}/doc %dir %{_datadir}/emacs/site-lisp/pari %{_datadir}/emacs/site-lisp/pari/* %files data %defattr(-,root,root) %dir %{pkgdatadir}/data %{pkgdatadir}/data/* %files -n %{lib_name} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{lib_name}-devel %defattr(-,root,root) %{_includedir}/%{name} %{_libdir}/*.so %dir %{_libdir}/%{name}-%{pari_version} %dir %{_libdir}/%{name}-%{pari_version}/* %files -n gp2c %defattr(-,root,root) %attr(755,root,root) %{_bindir}/gp2c* %doc gp2c-%{gp2c_version}/{AUTHORS,ChangeLog,NEWS,README,BUGS} %{pkgdatadir}/gp2c %{_mandir}/man1/gp2c*.1* %changelog * Wed Feb 10 2010 Funda Wang <fwang@mandriva.org> 2.3.5-7mdv2010.1 + Revision: 503562 - New version 2.3.5 - rebuild for new gmp * Wed Feb 03 2010 Paulo Andrade <pcpa@mandriva.com.br> 2.3.4-5mdv2010.1 + Revision: 499828 - Update to gpc-0.0.5pl9 - Change from requires to suggests of xdvi + Thierry Vignaud <tvignaud@mandriva.com> - rebuild * Wed Feb 25 2009 Guillaume Rousse <guillomovitch@mandriva.org> 2.3.4-3mdv2009.1 + Revision: 344843 - rebuild against new readline * Fri Feb 20 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.3.4-2mdv2009.1 + Revision: 343068 - Use gmp instead of builtin math library. gmp is significantly faster for calculations with large numbers. Correct gphelp, that was expecting to find documentation outside %%{_docdir}. xdvi is now required, as it is used to view documentation. xdvi cannot be installed due to bug #48029; as an alternative, temporary solution, it is possible to either use patch in #38016, or set the GPXDVI environment variable (a good option is the okular program). * Wed Feb 18 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.3.4-1mdv2009.1 + Revision: 342731 - Update to latest upstream release, version 2.3.4 o gp2c updated to 0.0.5pl7. o Corrected spec bug that set pari version to gp2c one. o Added extra optional pari data packages to the -data rpm. o Added missing BuildRequires and Requires. + Thierry Vignaud <tvignaud@mandriva.com> - rebuild - parallel build is broken - BuildRequires tetex tetex-dvips - rebuild - kill re-definition of %%buildroot on Pixel's request + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Mon Aug 14 2006 Olivier Thauvin <nanardon@mandriva.org> + 08/14/06 21:09:04 (56078) - rebuild - use our optflags - cleanup * Mon Aug 14 2006 Olivier Thauvin <nanardon@mandriva.org> + 08/14/06 20:51:28 (56075) Import pari * Fri Jan 06 2006 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.7-2mdk - Add BuildRequires * Wed Jan 04 2006 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.7-1mdk - New release 2.1.7 (pari) - New release 0.0.4pl3 (gp2c) * Fri Sep 30 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.6-3mdk - buildrequires * Mon Apr 25 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.1.6-2mdk - Fixed %%install stage for X86-64. * Sun Jan 23 2005 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 2.1.6-1mdk - 2.1.6 - update gp2c to 0.0.3pl4 - proper use of %%mklibname * Sat Jan 22 2005 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 2.1.5-3mdk - bah, don't use different release tag for subpackage * Sat Jan 22 2005 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 2.1.5-2mdk - rebuild for new readline * Fri Nov 07 2003 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 2.1.5-1mdk - New release and first Mandrake package - Modify the Configure file to use -O2 instead of -O3 - Add libs and a devel package - Add gp2c to the same srpm