70d86e1
Name:           pari
5169b46
Version:        2.7.6
cbb5095
Release:        2%{?dist}
70d86e1
Summary:        Number Theory-oriented Computer Algebra System
86d01a8
# No version is specified
90e0abe
License:        GPL+
81c23a1
URL:            http://pari.math.u-bordeaux.fr/
d87f6c9
Source0:        http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{version}.tar.gz
d87f6c9
Source1:        gp.desktop
cbb5095
Source2:        pari.xpm
d87f6c9
Patch0:         pari-2.5.1-xdgopen.patch
357f4e1
Patch1:         pari-2.7.0-optflags.patch
03bf23b
Patch10:        pari-2.7.2-missing-field-init.patch
357f4e1
Patch11:        pari-2.7.0-declaration-not-prototype.patch
4284d36
Patch12:        pari-2.7.1-clobbered.patch
5169b46
BuildRequires:  coreutils
5169b46
BuildRequires:  desktop-file-utils
5169b46
BuildRequires:  findutils
bd481b1
BuildRequires:  gmp-devel
5169b46
BuildRequires:  libX11-devel
5169b46
BuildRequires:  make
0737efe
BuildRequires:  perl-generators
5169b46
BuildRequires:  readline-devel
5169b46
BuildRequires:  sed
c6ceba2
BuildRequires:  tex(tex)
c6ceba2
BuildRequires:  tex(dvips)
d87f6c9
BuildRequires:  xmkmf
d87f6c9
# Test suite requirements
d87f6c9
BuildRequires:  pari-elldata
d87f6c9
BuildRequires:  pari-galdata
357f4e1
BuildRequires:  pari-galpol
d87f6c9
BuildRequires:  pari-seadata
8a12ceb
86d01a8
# Avoid doc-file dependencies and provides
d87f6c9
%global __provides_exclude_from ^%{_datadir}/pari/PARI/
d87f6c9
%global __requires_exclude_from ^%{_datadir}/pari/PARI/
70d86e1
70d86e1
%description
d87f6c9
PARI is a widely used computer algebra system designed for fast computations in
d87f6c9
number theory (factorizations, algebraic number theory, elliptic curves...),
d87f6c9
but also contains a large number of other useful functions to compute with
d87f6c9
mathematical entities such as matrices, polynomials, power series, algebraic
d87f6c9
numbers, etc., and a lot of transcendental functions.
70d86e1
70d86e1
This package contains the shared libraries. The interactive
d87f6c9
calculator PARI/GP is in package pari-gp.
70d86e1
70d86e1
%package devel
bd481b1
Summary:        Header files and libraries for PARI development
bd481b1
Requires:       %{name} = %{version}-%{release}
70d86e1
70d86e1
%description devel
70d86e1
Header files and libraries for PARI development.
70d86e1
70d86e1
%package gp
bd481b1
Summary:        PARI calculator
bd481b1
Requires:       %{name} = %{version}-%{release}
d87f6c9
Requires:       bzip2
bd481b1
Requires:       gzip
81c23a1
Requires:       xdg-utils
81c23a1
Requires:       mimehandler(application/x-dvi)
70d86e1
70d86e1
%description gp
70d86e1
PARI/GP is an advanced programmable calculator, which computes
70d86e1
symbolically as long as possible, numerically where needed, and
70d86e1
contains a wealth of number-theoretic functions.
70d86e1
d87f6c9
%prep
d87f6c9
%setup -q
70d86e1
d87f6c9
# Use xdg-open rather than xdvi to display DVI files (#530565)
d87f6c9
%patch0
70d86e1
d87f6c9
# Use our optflags, not upstream's
d87f6c9
%patch1
d87f6c9
sed -i -e 's|@OPTFLAGS@|%{optflags} -Wall -Wextra -Wstrict-prototypes|' config/get_cc
70d86e1
d87f6c9
# Fix compiler warnings
d87f6c9
# http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1316
d87f6c9
%patch10
d87f6c9
%patch11
d87f6c9
%patch12
70d86e1
d87f6c9
# Avoid unwanted rpaths
d87f6c9
sed -i "s|runpathprefix='.*'|runpathprefix=''|" config/get_ld
70d86e1
70d86e1
%build
70d86e1
./Configure \
70d86e1
    --prefix=%{_prefix} \
70d86e1
    --share-prefix=%{_datadir} \
70d86e1
    --bindir=%{_bindir} \
70d86e1
    --libdir=%{_libdir} \
70d86e1
    --mandir=%{_mandir}/man1 \
70d86e1
    --datadir=%{_datadir}/pari \
70d86e1
    --includedir=%{_includedir} \
70d86e1
    --with-gmp
d87f6c9
make %{?_smp_mflags} gp
70d86e1
70d86e1
%install
d87f6c9
make install \
d87f6c9
  DESTDIR=%{buildroot} \
d87f6c9
  INSTALL="install -p" \
d87f6c9
  STRIP=/bin/true
70d86e1
d87f6c9
# We move pari.cfg to the docdir
ce73d57
rm -fr %{buildroot}%{_prefix}/lib/pari
70d86e1
d87f6c9
# Site-wide gprc
d87f6c9
mkdir -p %{buildroot}%{_sysconfdir}
d87f6c9
install -p -m 644 misc/gprc.dft %{buildroot}%{_sysconfdir}/gprc
70d86e1
d87f6c9
# Desktop menu entry
ce73d57
mkdir -p %{buildroot}%{_datadir}/applications
70d86e1
desktop-file-install \
ce73d57
    --dir %{buildroot}%{_datadir}/applications \
d87f6c9
    %{SOURCE1}
cbb5095
install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pari/misc/
70d86e1
d87f6c9
# Don't bother installing the simple gp wrapper script, so avoiding the
d87f6c9
# need to patch it to fix the path to the executable
5169b46
find %{buildroot} -name xgp -delete
70d86e1
d87f6c9
# Placate rpmlint regarding binary and library permissions
d87f6c9
%{_fixperms} %{buildroot}{%{_bindir},%{_libdir}}
70d86e1
d87f6c9
%check
d87f6c9
make test-all
70d86e1
70d86e1
%post -p /sbin/ldconfig
70d86e1
70d86e1
%postun -p /sbin/ldconfig
70d86e1
70d86e1
%files
03bf23b
%if 0%{?_licensedir:1}
03bf23b
%license COPYING
03bf23b
%else
03bf23b
%doc COPYING
03bf23b
%endif
03bf23b
%doc AUTHORS CHANGES* COMPAT NEW README
70d86e1
%doc Olinux-*/pari.cfg
d87f6c9
%{_libdir}/libpari-gmp.so.%{version}
357f4e1
%{_libdir}/libpari-gmp.so.4
70d86e1
70d86e1
%files gp
d87f6c9
%{_bindir}/gp
357f4e1
%{_bindir}/gp-2.7
d87f6c9
%{_bindir}/gphelp
d87f6c9
%{_bindir}/tex2mail
d87f6c9
%config(noreplace) %{_sysconfdir}/gprc
bd481b1
%dir %{_datadir}/pari/
bd481b1
%doc %{_datadir}/pari/PARI/
bd481b1
%doc %{_datadir}/pari/doc/
bd481b1
%doc %{_datadir}/pari/examples/
bd481b1
%{_datadir}/pari/misc/
bd481b1
%{_datadir}/pari/pari.desc
0c6fd32
%{_datadir}/applications/*gp.desktop
357f4e1
%{_mandir}/man1/gp-2.7.1*
d87f6c9
%{_mandir}/man1/gp.1*
d87f6c9
%{_mandir}/man1/gphelp.1*
d87f6c9
%{_mandir}/man1/pari.1*
d87f6c9
%{_mandir}/man1/tex2mail.1*
70d86e1
70d86e1
%files devel
bd481b1
%{_includedir}/pari/
d87f6c9
%{_libdir}/libpari.so
70d86e1
70d86e1
%changelog
cbb5095
* Tue Jun 20 2017 Paul Howarth <paul@city-fan.org> - 2.7.6-2
cbb5095
- Include pari/gp desktop icon, dropped from upstream releases after 2.5.x
cbb5095
  (#1462987)
cbb5095
- Drop redundant Group: tags
cbb5095
5169b46
* Tue Jun 21 2016 Paul Howarth <paul@city-fan.org> - 2.7.6-1
5169b46
- Update to 2.7.6 (see CHANGES for details)
5169b46
- Simplify find command using -delete
5169b46
- Specify all build requirements
5169b46
1308baf
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.5-2
1308baf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1308baf
f1c8820
* Tue Nov 10 2015 Paul Howarth <paul@city-fan.org> - 2.7.5-1
f1c8820
- Update to 2.7.5 (see CHANGES for details)
f1c8820
6aee1be
* Sat Jun 20 2015 Paul Howarth <paul@city-fan.org> - 2.7.4-1
6aee1be
- Update to 2.7.4 (see CHANGES for details)
6aee1be
5b26777
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-2
5b26777
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5b26777
8b1cea4
* Thu Feb 19 2015 Paul Howarth <paul@city-fan.org> - 2.7.3-1
8b1cea4
- Update to 2.7.3 (see CHANGES for details)
8b1cea4
03bf23b
* Fri Sep 19 2014 Paul Howarth <paul@city-fan.org> - 2.7.2-1
03bf23b
- Update to 2.7.2 (see CHANGES for details)
03bf23b
- Update patches as needed
03bf23b
- Drop libpari-gmp.so.3 compat library
03bf23b
- Use %%license where possible
03bf23b
631a0f5
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-5
631a0f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
631a0f5
d9cf81b
* Mon Jul  7 2014 Paul Howarth <paul@city-fan.org> - 2.7.1-4
d9cf81b
- Fix crash in ellmul with obsolete use of E=[a1,a2,a3,a4,a6]
d9cf81b
  (#1104802, upstream bug #1589)
d9cf81b
3f8afa1
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-3
3f8afa1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3f8afa1
0ebc098
* Thu May 22 2014 Paul Howarth <paul@city-fan.org> - 2.7.1-2
0ebc098
- Temporarily include old version of library to avoid broken deps whilst
0ebc098
  migration to pari 2.7 happens in Rawhide
0ebc098
4284d36
* Fri May 16 2014 Paul Howarth <paul@city-fan.org> - 2.7.1-1
4284d36
- Update to 2.7.1 (see CHANGES for details)
4284d36
357f4e1
* Mon Mar 24 2014 Paul Howarth <paul@city-fan.org> - 2.7.0-1
357f4e1
- Update to 2.7.0 (see NEW for details)
357f4e1
- Update patches as needed
357f4e1
- BR: pari-galpol for additional test coverage
357f4e1
3896920
* Sat Sep 21 2013 Paul Howarth <paul@city-fan.org> - 2.5.5-1
357f4e1
- Update to 2.5.5 (see CHANGES for details)
3896920
c4b5f01
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-3
c4b5f01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c4b5f01
89c913d
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 2.5.4-2
89c913d
- Perl 5.18 rebuild
89c913d
03a8a08
* Tue May 14 2013 Paul Howarth <paul@city-fan.org> - 2.5.4-1
03a8a08
- update to 2.5.4 (see CHANGES for details)
03a8a08
- update missing-field-init patch
03a8a08
03a8a08
* Wed May  1 2013 Jon Ciesla <limburgher@gmail.com> - 2.5.3-3
03a8a08
- drop desktop vendor tag
0c6fd32
6a81714
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.3-2
03a8a08
- rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6a81714
87fecc4
* Thu Oct  4 2012 Paul Howarth <paul@city-fan.org> - 2.5.3-1
87fecc4
- update to 2.5.3 (see CHANGES for details)
87fecc4
- further compiler warning fixes after discussion with upstream
87fecc4
- drop upstreamed parts of declaration-not-prototype patch
87fecc4
6114a68
* Mon Aug  6 2012 Paul Howarth <paul@city-fan.org> - 2.5.2-1
6114a68
- update to 2.5.2 (see CHANGES for details)
6114a68
- drop upstreamed gcc 4.7, bug#1264 and FSF address patches
6114a68
8299e9c
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-2
6114a68
- rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8299e9c
d87f6c9
* Wed May  9 2012 Paul Howarth <paul@city-fan.org> - 2.5.1-1
d87f6c9
- update to 2.5.1 (#821191; see NEW for details)
d87f6c9
- use rpm 4.9.x requires/provides filtering
d87f6c9
- update xdg-open patch
d87f6c9
- drop emacs sub-package; the PARI Emacs shell is now a separate project
d87f6c9
- drop %%defattr, redundant since rpm 4.4
d87f6c9
- gp sub-package requires bzip2 for support of bzipped files
d87f6c9
- make %%files list more explicit
d87f6c9
- drop redundant buildroot definition and cleaning
d87f6c9
- BR: xmkmf for X11 detection
d87f6c9
- make sure we use our %%{optflags} and only those
d87f6c9
- call pari_init_defaults() before gp_expand_path() (upstream #1264)
d87f6c9
- fix scoping issue that manifests as a test suite failure with gcc 4.7.x and
d87f6c9
  -ftree-dse (#821918, upstream #1314)
d87f6c9
- fix desktop file categories
d87f6c9
- install site-wide /etc/gprc
d87f6c9
- update FSF address (upstream #1315)
d87f6c9
- fix various compiler warnings (upstream #1316)
d87f6c9
- run the full test suite in %%check
d87f6c9
- add buildreqs for data packages needed by full test suite
d87f6c9
- hardcode %%{_datadir} in gp.desktop so no need to fiddle with it in %%prep
d87f6c9
ce73d57
* Sat Jan  7 2012 Paul Howarth <paul@city-fan.org> - 2.3.5-4
ce73d57
- s/\$RPM_BUILD_ROOT/%%{buildroot}/g for tidyness
ce73d57
- update source URL as 2.3.5 is now an OLD version
ce73d57
1aaed01
* Wed Oct 26 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2.3.5-3.2
1aaed01
- rebuild with new gmp without compat lib
1aaed01
5c9e51e
* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 2.3.5-3.1
5c9e51e
- rebuild with new gmp
5c9e51e
ce73d57
* Tue Feb  8 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.5-3
ce73d57
- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7a63415
c6ceba2
* Fri Oct  1 2010 Mark Chappell <tremble@fedoraproject.org> - 2.3.5-2
ce73d57
- switch the latex dependencies over to tex(...)
c6ceba2
86d01a8
* Fri Jul  9 2010 Paul Howarth <paul@city-fan.org> - 2.3.5-1
86d01a8
- update to 2.3.5 (see CHANGES for details)
86d01a8
- filter out perl dependencies from %%{_datadir}/pari/PARI/
86d01a8
bd481b1
* Thu Jul  8 2010 Paul Howarth <paul@city-fan.org> - 2.3.4-5
bd481b1
- various clean-ups to pacify rpmlint:
bd481b1
  - uses spaces instead of tabs consistently
bd481b1
  - mark %%{_datadir}/emacs/site-lisp/pari/pariemacs.txt as %%doc
bd481b1
  - mark %%{_datadir}/pari/{PARI,doc,examples} as %%doc
bd481b1
  - fix permissions of gp
bd481b1
- don't strip gp so we get debuginfo for it
bd481b1
- move here documents out to separate source files
bd481b1
- make gp subpackage require same version-release of main package
bd481b1
81c23a1
* Wed Jul  7 2010 Paul Howarth <paul@city-fan.org> - 2.3.4-4
81c23a1
- apply patch from Patrice Dumas to use xdg-open rather than xdvi to display
81c23a1
  DVI content, and move the xdg-open requirement from the main package to the
81c23a1
  gp sub-package (#530565)
81c23a1
d492e9f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-3
d492e9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d492e9f
9aaacf0
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-2
9aaacf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9aaacf0
248be10
* Mon Dec 22 2008 Gerard Milmeister <gemi@bluewin.ch> - 2.3.4-1
248be10
- new release 2.3.4
248be10
90e0abe
* Wed Aug 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.3.3-2
90e0abe
- fix license tag
90e0abe
e137f40
* Sat Feb 23 2008 Gerard Milmeister <gemi@bluewin.ch> - 2.3.3-1
e137f40
- new release 2.3.3
e137f40
9a2c29d
* Sat Feb 23 2008 Gerard Milmeister <gemi@bluewin.ch> - 2.3.1-3
9a2c29d
- corrected desktop file
9a2c29d
fe5e524
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.3.1-2
fe5e524
- Autorebuild for GCC 4.3
fe5e524
d45dd1a
* Fri Dec 29 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.1-1
d45dd1a
- new version 2.3.1
d45dd1a
8a12ceb
* Fri Dec 29 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.0-5
8a12ceb
- added -fno-strict-aliasing to CFLAGS and enabled ppc build
0438223
100ebae
* Mon Aug 28 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.0-4
100ebae
- Rebuild for FE6
100ebae
b99543b
* Fri May 26 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.0-3
b99543b
- Exclude ppc for now, since test fails
b99543b
70d86e1
* Fri May 26 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.0-2
70d86e1
- added %%check section
70d86e1
- use gmp
70d86e1
70d86e1
* Thu May 25 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.3.0-1
70d86e1
- new version 2.3.0
70d86e1
70d86e1
* Fri May 19 2006 Orion Poplawski <orion@cora.nwra.com> - 2.1.7-4
70d86e1
- Fix shared library builds
70d86e1
70d86e1
* Fri Dec  2 2005 Gerard Milmeister <gemi@bluewin.ch> - 2.1.7-3
70d86e1
- Use none for architecture to guarantee working 64bit builds
70d86e1
70d86e1
* Fri Oct 21 2005 Gerard Milmeister <gemi@bluewin.ch> - 2.1.7-2
70d86e1
- some cleanup
70d86e1
70d86e1
* Fri Sep 30 2005 Gerard Milmeister <gemi@bluewin.ch> - 2.1.7-1
70d86e1
- New Version 2.1.7
70d86e1
70d86e1
* Sun Mar  6 2005 Gerard Milmeister <gemi@bluewin.ch> - 2.1.6-1
70d86e1
- New Version 2.1.6
70d86e1
70d86e1
* Mon Nov 22 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:2.1.5-0.fdr.2
70d86e1
- Fixed problem with readline
70d86e1
70d86e1
* Wed Nov 12 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:2.1.5-0.fdr.x
70d86e1
- First Fedora release