3 %bcond_without tex # don't build tex documentation
5 %include /usr/lib/rpm/macros.perl
6 %define pari_version 2.5.5
7 %define gp2c_version 0.0.8
8 %define math_pari_version 2.01080605
9 Summary: Number Theory-oriented Computer Algebra System
10 Summary(pl.UTF-8): Komputerowy system obliczeń algebraicznych zorientowany na metody teorii liczb
12 Version: %{pari_version}
15 Group: Applications/Math
16 Source0: ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz
17 # Source0-md5: fbd6402f8d3d3213b0633ab9ef4a63d0
18 Source1: ftp://megrez.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz
19 # Source1-md5: f9f61b2930757a785b568e5d307a7d75
20 Source2: ftp://megrez.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz
21 # Source2-md5: b29599e06aea3b0a7d370de3d955fdb2
22 Source3: http://www.cpan.org/modules/by-module/Math/Math-Pari-%{math_pari_version}.tar.gz
23 # Source3-md5: ccb3da2bdce184a5df3f52cfa8b43a85
24 Source4: %{name}.desktop
26 Patch0: %{name}-target_arch.patch
27 Patch1: %{name}-termcap.patch
28 Patch2: %{name}-arch.patch
29 Patch3: perl-Math-Pari-crash-workaround.patch
30 Patch4: perl-Math-Pari-update.patch
31 Patch5: %{name}-noproccpuinfo.patch
32 Patch6: gmp-version.patch
33 URL: http://pari.math.u-bordeaux.fr/
34 BuildRequires: autoconf
36 BuildRequires: gmp-devel
37 BuildRequires: perl-devel >= 1:5.8.0
38 BuildRequires: readline-devel >= 4.2
39 BuildRequires: rpm-perlprov >= 3.0.3-16
41 BuildRequires: texlive
42 BuildRequires: texlive-amstex
43 BuildRequires: texlive-csplain
44 BuildRequires: texlive-dvips
45 BuildRequires: texlive-fonts-cm
46 BuildRequires: texlive-format-pdflatex
47 BuildRequires: texlive-plain
48 BuildRequires: texlive-pdftex
49 BuildRequires: texlive-tex-babel
50 BuildRequires: texlive-tex-ruhyphen
52 BuildRequires: xorg-lib-libX11-devel
53 BuildRequires: xorg-util-imake
54 Requires: pari = %{pari_version}-%{release}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 PARI/GP is a package which is aimed at efficient computations in
60 number theory, but also contains a large number of other useful
61 functions. It is somewhat related to a Computer Algebra System, but is
62 not really one since it treats symbolic expressions as mathematical
63 entities such as matrices, polynomials, series, etc..., and not as
64 expressions per se. However it is often much faster than other CAS,
65 and contains a large number of specific functions not found elsewhere,
66 essentially for use in number theory.
68 %description -l pl.UTF-8
69 System PARI/GP jest przeznaczony do wydajnych obliczeń z zakresu
70 teorii liczb, ale zawiera również inne przydatne funkcje. Jest nieco
71 spokrewniony z Komputerowymi Systemami Algebraicznymi, ale nie
72 identyczny, ponieważ traktuje wyrażenia symboliczne jako obiekty
73 matematyczne (macierze, wielomiany, szeregi itp.) a nie jako wyrażenia
74 same w sobie. Jest jednak często znacznie szybszy od innych KSA-ów a
75 ponadto zawiera wiele innych funkcji nie spotykanych gdzie indziej, a
76 przydatnych zwłaszcza w teorii liczb.
79 Summary: Shared PARI library (required by the parigp package)
80 Summary(pl.UTF-8): Biblioteka współdzielona PARI (wymagana przez pakiet parigp)
84 Shared PARI library. You need it to run PARI/GP.
86 %description -n pari -l pl.UTF-8
87 Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia
90 %package -n pari-devel
91 Summary: Include files for PARI shared library
92 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki współdzielonej PARI
93 Group: Development/Libraries
94 Requires: pari = %{pari_version}-%{release}
96 %description -n pari-devel
97 Include files for shared PARI library. You need them to use PARI
98 routines in you own programs.
100 %description -n pari-devel -l pl.UTF-8
101 Pliki nagłówkowe biblioteki współdzielonej PARI. Będziesz ich
102 potrzebował, jeżeli będziesz chciał wykorzystywać procedury PARI w
105 %package -n pari-static
106 Summary: Static PARI library
107 Summary(pl.UTF-8): Statyczna biblioteka PARI
108 Group: Development/Libraries
109 Requires: pari-devel = %{pari_version}-%{release}
111 %description -n pari-static
112 Static PARI library. You need it to statically link your programs with
115 %description -n pari-static -l pl.UTF-8
116 Biblioteka statyczna PARI. Potrzebujesz jej do konsolidowania
117 statycznego swoich programów korzystających z biblioteki PARI.
120 Summary: Example PARI/GP scripts
121 Summary(pl.UTF-8): Przykładowe skrypty pisane w języku PARI/GP
122 Group: Applications/Math
123 Requires: %{name} = %{pari_version}-%{release}
126 Example PARI/GP scripts. You can write such programs on your own.
128 %description demos -l pl.UTF-8
129 Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać.
132 Summary: Galois data resolvents for PARI/GP
133 Summary(pl.UTF-8): Reprezentacje danych Galois fla PARI/GP
134 Group: Applications/Math
135 Requires: %{name} = %{pari_version}-%{release}
138 Galois data resolvents for PARI/GP.
140 %description galdata -l pl.UTF-8
141 Reprezentacje danych Galois do PARI/GP.
144 Summary: PARI/GP to C translator
145 Summary(pl.UTF-8): Konwerter skryptów PARI/GP do języka C
146 Version: %{gp2c_version}
148 Group: Development/Tools
149 Requires: pari-devel = %{pari_version}-%{release}
150 Requires: %{name} = %{pari_version}-%{release}
153 PARI/GP to C translator. Use it to compile your own C programs which
154 use pari library, without necessarily being a C programmer. Note: use
155 gp2c-run to run your programs inside the PARI/GP environment.
157 %description gp2c -l pl.UTF-8
158 Konwerter skryptów PARI/GP do języka C. Można nim tworzyć własne
159 programy w C korzystające z biblioteki pari. Znajomość języka C nie
160 jest wymagana. Uwaga: do uruchamiania programów w środowisku PARI/GP
161 należy używać gp2c-run.
163 %package -n perl-Math-Pari
164 Summary: Math-Pari perl module
165 Summary(pl.UTF-8): Moduł perla Math-Pari
166 Version: %{math_pari_version}
167 Group: Development/Languages/Perl
169 %description -n perl-Math-Pari
170 The Perl interface to the PARI part of GP/PARI.
172 %description -n perl-Math-Pari -l pl.UTF-8
173 Interfejs Perla do biblioteki PARI.
176 %setup -q -n pari-%{pari_version} -a 2 -a 3
188 --target=%{_target_cpu} \
189 --prefix=%{_prefix} \
190 --libdir=%{_libdir} \
191 --sysdatadir=%{_libdir}/parigp \
192 --datadir=%{_datadir}/parigp \
193 --share-prefix=%{_datadir} \
194 --with-readline-lib=%{_libdir} \
195 --with-ncurses-lib=%{_libdir} \
196 --with-gmp-lib=%{_libdir}
199 %{__make} -C Olinux-%{_target_cpu} all \
201 CFLAGS="%{rpmcflags} -fno-strict-aliasing -fomit-frame-pointer -fPIC"
205 %{?with_tex:%{__make} -j1 -C doc docpdf}
207 ln -s Olinux-%{_target_cpu} Olinux-x86_64
210 ln -s Olinux-%{_target_cpu} Olinux-ix86
212 %ifarch sparc sparc64
213 # allow building sparc package on sparc64
214 ln -s Olinux-sparc Olinux-sparc64
218 cd gp2c-%{gp2c_version}
223 --datadir=%{_datadir}/parigp
226 %{?with_tex:%{__make} -j1 -C doc docall}
231 cd Math-Pari-%{math_pari_version}
232 cp -f ../Olinux-%{_target_cpu}/paricfg.h libPARI/paricfg.h
233 echo '#define DL_DFLT_NAME NULL' >>libPARI/paricfg.h
235 %{__perl} Makefile.PL \
239 OPTIMIZE="%{rpmcflags} -I$(pwd)/../Olinux-%{_target_cpu}"
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT{%{_datadir}/parigp/galdata,%{_examplesdir}/parigp} \
246 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
248 # parigp, pari & pari-devel
250 DESTDIR=$RPM_BUILD_ROOT
252 install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc
253 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
254 install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
257 install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a
260 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp
263 tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_datadir}/parigp/galdata
266 %{__make} install -C gp2c-%{gp2c_version} \
267 DESTDIR=$RPM_BUILD_ROOT
270 %{__make} install -C Math-Pari-%{math_pari_version} \
271 DESTDIR=$RPM_BUILD_ROOT
273 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
274 echo ".so gp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
276 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/parigp/{examples,doc}
277 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Math/libPARI*.pod
280 rm -rf $RPM_BUILD_ROOT
282 %post -n pari -p /sbin/ldconfig
283 %postun -n pari -p /sbin/ldconfig
286 %defattr(644,root,root,755)
287 %doc AUTHORS CHANGES* COMPAT MACHINES NEW README examples/Inputrc %{?with_tex:doc/*.pdf}
288 %attr(755,root,root) %{_bindir}/gp-2.5
289 %attr(755,root,root) %{_bindir}/gp
290 %attr(755,root,root) %{_bindir}/gphelp
291 %attr(755,root,root) %{_bindir}/tex2mail
292 %dir %{_datadir}/parigp
293 %{_datadir}/parigp/PARI
294 %{_datadir}/parigp/misc
295 %{_datadir}/parigp/pari.desc
296 %{_mandir}/man1/[!g]*.1*
297 %{_mandir}/man1/gp.1*
298 %{_mandir}/man1/gp-*.1*
299 %{_mandir}/man1/gphelp.1*
300 %{_desktopdir}/parigp.desktop
301 %{_pixmapsdir}/parigp.png
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/libpari-gmp.so.*.*.*
306 %ghost %attr(755,root,root) %{_libdir}/libpari-gmp.so.3
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_libdir}/libpari.so
314 %files -n pari-static
315 %defattr(644,root,root,755)
319 %defattr(644,root,root,755)
320 %doc examples/EXPLAIN
321 %{_examplesdir}/parigp
324 %defattr(644,root,root,755)
325 %{_datadir}/parigp/galdata
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_bindir}/gp2c*
330 %doc gp2c-%{gp2c_version}/{AUTHORS,ChangeLog,NEWS,README,BUGS,doc/*.{html,png}}
331 %{?with_tex:%doc gp2c-%{gp2c_version}/doc/gp2c.pdf}
332 %{_datadir}/parigp/gp2c
333 %{_mandir}/man1/gp2c*.1*
335 %files -n perl-Math-Pari
336 %defattr(644,root,root,755)
337 %doc Math-Pari-%{math_pari_version}/{Changes,README,TODO}
338 %{perl_vendorarch}/Math/Pari.pm
339 %{perl_vendorarch}/Math/PariInit.pm
340 %dir %{perl_vendorarch}/auto/Math/Pari
341 %attr(755,root,root) %{perl_vendorarch}/auto/Math/Pari/Pari.so
342 %{_mandir}/man3/Math::Pari.3pm*
343 %{_mandir}/man3/Math::PariInit.3pm*
344 %{_mandir}/man3/Math::libPARI.3pm*
345 %{_mandir}/man3/Math::libPARI.dumb.3pm*