%define name pari %define pari_version 2.5.3 %define release %mkrel 4 %define lib_major 3 %define lib_name %mklibname %{name} %{lib_major} %define develname %mklibname -d %{name} 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 URL: http://pari.math.u-bordeaux.fr/ Patch0: pari-arch.patch Patch2: pari-gphelp.patch Patch3: pari-runpath.patch BuildRequires: perl-devel BuildRequires: libgmp-devel BuildRequires: libx11-devel BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: tetex tetex-dvips BuildRequires: emacs Requires: perl Requires: xdg-utils Requires: %{name}-data %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 BuildArch: noarch %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 %description -n %{lib_name} This package contains the libraries needed to run pari. %package -n %{develname} Group: System/Libraries Summary: Development files for PARI shared library Requires: %{lib_name} = %{version}-%{release} Obsoletes: %{_lib}pari2-devel < 2.5 Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description -n %{develname} This package contains the header files needed to develop applications using pari. %prep %setup -q -a1 -a2 -a3 -a4 mv -f nftables data %patch0 -p1 %patch2 -p1 %patch3 -p1 %build %define pkgdocdir %{_docdir}/%{name} %define pkgdatadir %{_datadir}/%{name}-%{pari_version} # Using --libdir to properly link with newer interface # Using --disable-tls for safety due to other packages linked to pari sh Configure \ --prefix=%{_prefix} \ --includedir=%{_includedir}/%{name} \ --datadir=%{pkgdatadir}/data \ --sysdatadir=%{_libdir}/%{name} \ --share-prefix=%{_datadir} \ --host=%{_arch}-%{_os} \ --graphic=X11 \ --with-gmp \ --libdir=%{buildroot}%{_libdir} \ --disable-tls make gp doc bench %install # pari, libpari & libpari-devel %makeinstall_std \ READMEDIR='$(DESTDIR)'%{pkgdocdir} \ LIBDIR='$(DESTDIR)'%{_libdir} \ DOCDIR='$(DESTDIR)'%{pkgdocdir} # 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 %files %config(noreplace) %attr(644,root,root) %{_sysconfdir}/gprc %{_bindir}/gp-* %{_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 %files data %dir %{pkgdatadir}/data %{pkgdatadir}/data/* %files -n %{lib_name} %{_libdir}/*.so.%{version} %{_libdir}/*.so.%{lib_major} %files -n %{develname} %{_includedir}/%{name} %{_libdir}/*.so %{_libdir}/%{name}/ %changelog * Sun Jan 13 2013 umeabot <umeabot> 2.5.3-4.mga3 + Revision: 362405 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Oct 08 2012 fwang <fwang> 2.5.3-3.mga3 + Revision: 303349 - main binary should require data * Mon Oct 08 2012 fwang <fwang> 2.5.3-2.mga3 + Revision: 303320 - put config file into shorter dir * Mon Oct 08 2012 fwang <fwang> 2.5.3-1.mga3 + Revision: 303300 - update file list - update file list - about to split gp2c - drop old patch - new version 2.5.3 * Fri Sep 02 2011 tv <tv> 2.4.3.alpha-2.mga2 + Revision: 137827 - make the huge data subpackage be noarch * Fri Feb 25 2011 dmorgan <dmorgan> 2.4.3.alpha-1.mga1 + Revision: 59921 - Remove mdv macros - imported package pari