]>
Commit | Line | Data |
---|---|---|
56f71478 | 1 | # |
90c38ece | 2 | # Conditional build: |
3 | %bcond_without tex # don't build tex documentation | |
56f71478 | 4 | # |
c1170d84 | 5 | %define pari_version 2.5.5 |
0c7245da | 6 | %define gp2c_version 0.0.12 |
bc327ffe | 7 | %define math_pari_version 2.01080605 |
dd89a8b7 | 8 | Summary: Number Theory-oriented Computer Algebra System |
434b919b | 9 | Summary(pl.UTF-8): Komputerowy system obliczeń algebraicznych zorientowany na metody teorii liczb |
dd89a8b7 | 10 | Name: parigp |
c8d4b162 | 11 | Version: %{pari_version} |
44715cdc | 12 | Release: 18 |
67867ee0 | 13 | License: GPL v2+ |
dd89a8b7 | 14 | Group: Applications/Math |
34b4d8a3 | 15 | Source0: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz |
c1170d84 | 16 | # Source0-md5: fbd6402f8d3d3213b0633ab9ef4a63d0 |
34b4d8a3 | 17 | Source1: http://pari.math.u-bordeaux.fr/pub/pari/packages/galdata.tgz |
2fe27273 | 18 | # Source1-md5: f9f61b2930757a785b568e5d307a7d75 |
0c7245da JR |
19 | Source2: http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-%{gp2c_version}.tar.gz |
20 | # Source2-md5: ab29c383985d1b7d339189ecff31d40a | |
6087df7e | 21 | Source3: http://www.cpan.org/modules/by-module/Math/Math-Pari-%{math_pari_version}.tar.gz |
bc327ffe | 22 | # Source3-md5: ccb3da2bdce184a5df3f52cfa8b43a85 |
1d785e6a | 23 | Source4: %{name}.desktop |
95882164 | 24 | Source5: %{name}.png |
24b72da1 JR |
25 | Patch0: %{name}-target_arch.patch |
26 | Patch1: %{name}-termcap.patch | |
27 | Patch2: %{name}-arch.patch | |
c1170d84 MK |
28 | Patch3: perl-Math-Pari-crash-workaround.patch |
29 | Patch4: perl-Math-Pari-update.patch | |
5b9ede90 | 30 | Patch5: %{name}-noproccpuinfo.patch |
e6713c66 | 31 | Patch6: gmp-version.patch |
71b8978e JR |
32 | Patch7: Math-Pari-escape-left-braces-in-regex.patch |
33 | Patch8: escape-left-braces-in-regex.patch | |
34 | Patch9: perl-no-dot-in-inc.patch | |
3c0d90f0 | 35 | URL: http://pari.math.u-bordeaux.fr/ |
c8d4b162 | 36 | BuildRequires: autoconf |
bc327ffe | 37 | BuildRequires: ctags |
e6713c66 | 38 | BuildRequires: gmp-devel |
56f71478 | 39 | BuildRequires: perl-devel >= 1:5.8.0 |
e07df94b | 40 | BuildRequires: readline-devel >= 4.2 |
c8d4b162 | 41 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
34b4d8a3 | 42 | BuildRequires: rpmbuild(macros) >= 1.745 |
90c38ece | 43 | %if %{with tex} |
88d21d33 JR |
44 | BuildRequires: texlive |
45 | BuildRequires: texlive-amstex | |
46 | BuildRequires: texlive-csplain | |
47 | BuildRequires: texlive-dvips | |
48 | BuildRequires: texlive-fonts-cm | |
65cd5e24 | 49 | BuildRequires: texlive-format-pdflatex |
88d21d33 JR |
50 | BuildRequires: texlive-plain |
51 | BuildRequires: texlive-pdftex | |
52 | BuildRequires: texlive-tex-babel | |
53 | BuildRequires: texlive-tex-ruhyphen | |
90c38ece | 54 | %endif |
101d00e8 | 55 | BuildRequires: xorg-lib-libX11-devel |
24b72da1 | 56 | BuildRequires: xorg-util-imake |
56f71478 | 57 | Requires: pari = %{pari_version}-%{release} |
9a83e110 | 58 | Requires: xdvi |
f3b4af7f | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
dd89a8b7 | 60 | |
dd89a8b7 | 61 | %description |
c4d271de | 62 | PARI/GP is a package which is aimed at efficient computations in |
f3b4af7f | 63 | number theory, but also contains a large number of other useful |
64 | functions. It is somewhat related to a Computer Algebra System, but is | |
65 | not really one since it treats symbolic expressions as mathematical | |
66 | entities such as matrices, polynomials, series, etc..., and not as | |
67 | expressions per se. However it is often much faster than other CAS, | |
68 | and contains a large number of specific functions not found elsewhere, | |
69 | essentially for use in number theory. | |
dd89a8b7 | 70 | |
6f6f7023 JR |
71 | %description -l pl.UTF-8 |
72 | System PARI/GP jest przeznaczony do wydajnych obliczeń z zakresu | |
73 | teorii liczb, ale zawiera również inne przydatne funkcje. Jest nieco | |
f3b4af7f | 74 | spokrewniony z Komputerowymi Systemami Algebraicznymi, ale nie |
6f6f7023 JR |
75 | identyczny, ponieważ traktuje wyrażenia symboliczne jako obiekty |
76 | matematyczne (macierze, wielomiany, szeregi itp.) a nie jako wyrażenia | |
77 | same w sobie. Jest jednak często znacznie szybszy od innych KSA-ów a | |
f3b4af7f | 78 | ponadto zawiera wiele innych funkcji nie spotykanych gdzie indziej, a |
6f6f7023 | 79 | przydatnych zwłaszcza w teorii liczb. |
dd89a8b7 RW |
80 | |
81 | %package -n pari | |
82 | Summary: Shared PARI library (required by the parigp package) | |
434b919b | 83 | Summary(pl.UTF-8): Biblioteka współdzielona PARI (wymagana przez pakiet parigp) |
f3b4af7f | 84 | Group: Libraries |
dd89a8b7 RW |
85 | |
86 | %description -n pari | |
c4d271de | 87 | Shared PARI library. You need it to run PARI/GP. |
dd89a8b7 | 88 | |
6f6f7023 JR |
89 | %description -n pari -l pl.UTF-8 |
90 | Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia | |
434a9a07 | 91 | PARI/GP. |
dd89a8b7 RW |
92 | |
93 | %package -n pari-devel | |
94 | Summary: Include files for PARI shared library | |
434b919b | 95 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki współdzielonej PARI |
f3b4af7f | 96 | Group: Development/Libraries |
56f71478 | 97 | Requires: pari = %{pari_version}-%{release} |
dd89a8b7 RW |
98 | |
99 | %description -n pari-devel | |
f3b4af7f | 100 | Include files for shared PARI library. You need them to use PARI |
101 | routines in you own programs. | |
dd89a8b7 | 102 | |
6f6f7023 JR |
103 | %description -n pari-devel -l pl.UTF-8 |
104 | Pliki nagłówkowe biblioteki współdzielonej PARI. Będziesz ich | |
105 | potrzebował, jeżeli będziesz chciał wykorzystywać procedury PARI w | |
f3b4af7f | 106 | swoich programach. |
dd89a8b7 | 107 | |
86e1d1c3 RW |
108 | %package -n pari-static |
109 | Summary: Static PARI library | |
434b919b | 110 | Summary(pl.UTF-8): Statyczna biblioteka PARI |
86e1d1c3 | 111 | Group: Development/Libraries |
56f71478 | 112 | Requires: pari-devel = %{pari_version}-%{release} |
dd89a8b7 | 113 | |
86e1d1c3 | 114 | %description -n pari-static |
434a9a07 | 115 | Static PARI library. You need it to statically link your programs with |
116 | PARI. | |
dd89a8b7 | 117 | |
6f6f7023 | 118 | %description -n pari-static -l pl.UTF-8 |
434a9a07 | 119 | Biblioteka statyczna PARI. Potrzebujesz jej do konsolidowania |
6f6f7023 | 120 | statycznego swoich programów korzystających z biblioteki PARI. |
dd89a8b7 RW |
121 | |
122 | %package demos | |
c4d271de | 123 | Summary: Example PARI/GP scripts |
434b919b | 124 | Summary(pl.UTF-8): Przykładowe skrypty pisane w języku PARI/GP |
f3b4af7f | 125 | Group: Applications/Math |
56f71478 | 126 | Requires: %{name} = %{pari_version}-%{release} |
dd89a8b7 RW |
127 | |
128 | %description demos | |
c4d271de | 129 | Example PARI/GP scripts. You can write such programs on your own. |
dd89a8b7 | 130 | |
6f6f7023 JR |
131 | %description demos -l pl.UTF-8 |
132 | Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać. | |
dd89a8b7 RW |
133 | |
134 | %package galdata | |
c4d271de | 135 | Summary: Galois data resolvents for PARI/GP |
434b919b | 136 | Summary(pl.UTF-8): Reprezentacje danych Galois fla PARI/GP |
f3b4af7f | 137 | Group: Applications/Math |
56f71478 | 138 | Requires: %{name} = %{pari_version}-%{release} |
dd89a8b7 RW |
139 | |
140 | %description galdata | |
c4d271de | 141 | Galois data resolvents for PARI/GP. |
dd89a8b7 | 142 | |
6f6f7023 | 143 | %description galdata -l pl.UTF-8 |
c4d271de | 144 | Reprezentacje danych Galois do PARI/GP. |
dd89a8b7 | 145 | |
446a2143 | 146 | %package gp2c |
be3def7b | 147 | Summary: PARI/GP to C translator |
434b919b | 148 | Summary(pl.UTF-8): Konwerter skryptów PARI/GP do języka C |
0741c06b | 149 | Version: %{gp2c_version} |
b628e85a | 150 | Epoch: 1 |
446a2143 | 151 | Group: Development/Tools |
56f71478 JB |
152 | Requires: pari-devel = %{pari_version}-%{release} |
153 | Requires: %{name} = %{pari_version}-%{release} | |
446a2143 RW |
154 | |
155 | %description gp2c | |
434a9a07 | 156 | PARI/GP to C translator. Use it to compile your own C programs which |
36af16a6 JB |
157 | use pari library, without necessarily being a C programmer. Note: use |
158 | gp2c-run to run your programs inside the PARI/GP environment. | |
446a2143 | 159 | |
6f6f7023 JR |
160 | %description gp2c -l pl.UTF-8 |
161 | Konwerter skryptów PARI/GP do języka C. Można nim tworzyć własne | |
162 | programy w C korzystające z biblioteki pari. Znajomość języka C nie | |
163 | jest wymagana. Uwaga: do uruchamiania programów w środowisku PARI/GP | |
164 | należy używać gp2c-run. | |
446a2143 | 165 | |
1d785e6a | 166 | %package -n perl-Math-Pari |
167 | Summary: Math-Pari perl module | |
434b919b | 168 | Summary(pl.UTF-8): Moduł perla Math-Pari |
c8d4b162 | 169 | Version: %{math_pari_version} |
1d785e6a | 170 | Group: Development/Languages/Perl |
1d785e6a | 171 | |
172 | %description -n perl-Math-Pari | |
36af16a6 | 173 | The Perl interface to the PARI part of GP/PARI. |
1d785e6a | 174 | |
6f6f7023 | 175 | %description -n perl-Math-Pari -l pl.UTF-8 |
36af16a6 | 176 | Interfejs Perla do biblioteki PARI. |
1d785e6a | 177 | |
dd89a8b7 | 178 | %prep |
c8d4b162 | 179 | %setup -q -n pari-%{pari_version} -a 2 -a 3 |
24b72da1 JR |
180 | %patch0 -p1 |
181 | %patch1 -p1 | |
21e9bc09 | 182 | %patch2 -p1 |
eaf472d3 | 183 | %patch3 -p1 |
24b72da1 | 184 | %patch4 -p1 |
5b9ede90 | 185 | %patch5 -p1 |
e6713c66 | 186 | %patch6 -p1 |
71b8978e JR |
187 | %patch8 -p1 |
188 | %patch9 -p1 | |
189 | cd Math-Pari-%{math_pari_version} | |
190 | %patch7 -p0 | |
dd89a8b7 RW |
191 | |
192 | %build | |
446a2143 | 193 | # pari & parigp |
e07df94b | 194 | ./Configure \ |
24b72da1 | 195 | --target=%{_target_cpu} \ |
e07df94b | 196 | --prefix=%{_prefix} \ |
6f23328b | 197 | --libdir=%{_libdir} \ |
24b72da1 JR |
198 | --sysdatadir=%{_libdir}/parigp \ |
199 | --datadir=%{_datadir}/parigp \ | |
e6713c66 JR |
200 | --share-prefix=%{_datadir} \ |
201 | --with-readline-lib=%{_libdir} \ | |
202 | --with-ncurses-lib=%{_libdir} \ | |
203 | --with-gmp-lib=%{_libdir} | |
204 | ||
dd89a8b7 | 205 | |
24b72da1 | 206 | %{__make} -C Olinux-%{_target_cpu} all \ |
bc327ffe | 207 | CC="%{__cc}" \ |
24b72da1 | 208 | CFLAGS="%{rpmcflags} -fno-strict-aliasing -fomit-frame-pointer -fPIC" |
cfe6cbf8 | 209 | |
bc327ffe JB |
210 | %{__make} ctags |
211 | ||
df89f095 | 212 | %{?with_tex:%{__make} -j1 -C doc docpdf} |
e6713c66 JR |
213 | %ifarch x32 |
214 | ln -s Olinux-%{_target_cpu} Olinux-x86_64 | |
215 | %endif | |
eaf472d3 | 216 | %ifarch %{ix86} |
217 | ln -s Olinux-%{_target_cpu} Olinux-ix86 | |
218 | %endif | |
d73dc01e JB |
219 | %ifarch sparc sparc64 |
220 | # allow building sparc package on sparc64 | |
221 | ln -s Olinux-sparc Olinux-sparc64 | |
222 | %endif | |
dd89a8b7 | 223 | |
446a2143 RW |
224 | # gp2c |
225 | cd gp2c-%{gp2c_version} | |
24b72da1 | 226 | |
e647ea60 | 227 | ln -sf .. pari |
66b05270 | 228 | %{__autoconf} |
446a2143 RW |
229 | %configure \ |
230 | --datadir=%{_datadir}/parigp | |
24b72da1 | 231 | |
446a2143 | 232 | %{__make} |
be033589 | 233 | %{?with_tex:%{__make} -j1 -C doc docall} |
24b72da1 | 234 | |
1d785e6a | 235 | cd .. |
236 | ||
237 | # math-pari | |
c8d4b162 | 238 | cd Math-Pari-%{math_pari_version} |
bc327ffe JB |
239 | cp -f ../Olinux-%{_target_cpu}/paricfg.h libPARI/paricfg.h |
240 | echo '#define DL_DFLT_NAME NULL' >>libPARI/paricfg.h | |
24b72da1 | 241 | |
c6321049 | 242 | %{__perl} Makefile.PL \ |
243 | INSTALLDIRS=vendor | |
24b72da1 | 244 | |
56f71478 | 245 | %{__make} \ |
bc327ffe | 246 | OPTIMIZE="%{rpmcflags} -I$(pwd)/../Olinux-%{_target_cpu}" |
24b72da1 | 247 | |
471f6a05 | 248 | # %{__make} test |
28a3c1d0 | 249 | |
dd89a8b7 RW |
250 | %install |
251 | rm -rf $RPM_BUILD_ROOT | |
56f71478 JB |
252 | install -d $RPM_BUILD_ROOT{%{_datadir}/parigp/galdata,%{_examplesdir}/parigp} \ |
253 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
dd89a8b7 RW |
254 | |
255 | # parigp, pari & pari-devel | |
c6321049 | 256 | %{__make} install \ |
257 | DESTDIR=$RPM_BUILD_ROOT | |
56f71478 | 258 | |
a1fc7ab1 | 259 | install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc |
56f71478 | 260 | install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} |
8f98520d | 261 | install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir} |
dd89a8b7 | 262 | |
86e1d1c3 | 263 | # pari-static |
a1fc7ab1 | 264 | install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a |
dd89a8b7 RW |
265 | |
266 | # parigp-demos | |
a1fc7ab1 | 267 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp |
dd89a8b7 RW |
268 | |
269 | # galdata | |
56f71478 | 270 | tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_datadir}/parigp/galdata |
dd89a8b7 | 271 | |
446a2143 | 272 | # gp2c |
cfe6cbf8 | 273 | %{__make} install -C gp2c-%{gp2c_version} \ |
446a2143 | 274 | DESTDIR=$RPM_BUILD_ROOT |
446a2143 | 275 | |
1d785e6a | 276 | # math-pari |
cfe6cbf8 | 277 | %{__make} install -C Math-Pari-%{math_pari_version} \ |
1d785e6a | 278 | DESTDIR=$RPM_BUILD_ROOT |
1d785e6a | 279 | |
bc327ffe | 280 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/pari.1 |
cce86261 JB |
281 | echo ".so gp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/pari.1 |
282 | ||
bc327ffe JB |
283 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/parigp/{examples,doc} |
284 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Math/libPARI*.pod | |
24b72da1 | 285 | |
dd89a8b7 RW |
286 | %clean |
287 | rm -rf $RPM_BUILD_ROOT | |
288 | ||
7fc9b10b JB |
289 | %post -n pari -p /sbin/ldconfig |
290 | %postun -n pari -p /sbin/ldconfig | |
291 | ||
dd89a8b7 RW |
292 | %files |
293 | %defattr(644,root,root,755) | |
bc327ffe JB |
294 | %doc AUTHORS CHANGES* COMPAT MACHINES NEW README examples/Inputrc %{?with_tex:doc/*.pdf} |
295 | %attr(755,root,root) %{_bindir}/gp-2.5 | |
dd89a8b7 RW |
296 | %attr(755,root,root) %{_bindir}/gp |
297 | %attr(755,root,root) %{_bindir}/gphelp | |
298 | %attr(755,root,root) %{_bindir}/tex2mail | |
dd89a8b7 | 299 | %dir %{_datadir}/parigp |
bc327ffe | 300 | %{_datadir}/parigp/PARI |
846279c1 | 301 | %{_datadir}/parigp/misc |
24b72da1 | 302 | %{_datadir}/parigp/pari.desc |
ed10f0d4 | 303 | %{_mandir}/man1/gp.1* |
24b72da1 | 304 | %{_mandir}/man1/gp-*.1* |
ed10f0d4 | 305 | %{_mandir}/man1/gphelp.1* |
34b4d8a3 JB |
306 | %{_mandir}/man1/pari.1* |
307 | %{_mandir}/man1/tex2mail.1* | |
bc327ffe JB |
308 | %{_desktopdir}/parigp.desktop |
309 | %{_pixmapsdir}/parigp.png | |
dd89a8b7 RW |
310 | |
311 | %files -n pari | |
f3b4af7f | 312 | %defattr(644,root,root,755) |
bc327ffe JB |
313 | %attr(755,root,root) %{_libdir}/libpari-gmp.so.*.*.* |
314 | %ghost %attr(755,root,root) %{_libdir}/libpari-gmp.so.3 | |
315 | %{_libdir}/parigp | |
dd89a8b7 RW |
316 | |
317 | %files -n pari-devel | |
f3b4af7f | 318 | %defattr(644,root,root,755) |
24b72da1 | 319 | %attr(755,root,root) %{_libdir}/libpari.so |
cfe6cbf8 | 320 | %{_includedir}/pari |
dd89a8b7 | 321 | |
86e1d1c3 | 322 | %files -n pari-static |
dd89a8b7 | 323 | %defattr(644,root,root,755) |
24b72da1 | 324 | %{_libdir}/libpari.a |
dd89a8b7 RW |
325 | |
326 | %files demos | |
f3b4af7f | 327 | %defattr(644,root,root,755) |
c8d4b162 | 328 | %doc examples/EXPLAIN |
846279c1 | 329 | %{_examplesdir}/parigp |
dd89a8b7 RW |
330 | |
331 | %files galdata | |
f3b4af7f | 332 | %defattr(644,root,root,755) |
cfa61620 | 333 | %{_datadir}/parigp/galdata |
76dd33b2 | 334 | |
446a2143 RW |
335 | %files gp2c |
336 | %defattr(644,root,root,755) | |
4a006b16 | 337 | %attr(755,root,root) %{_bindir}/gp2c* |
24b72da1 JR |
338 | %doc gp2c-%{gp2c_version}/{AUTHORS,ChangeLog,NEWS,README,BUGS,doc/*.{html,png}} |
339 | %{?with_tex:%doc gp2c-%{gp2c_version}/doc/gp2c.pdf} | |
846279c1 | 340 | %{_datadir}/parigp/gp2c |
ed10f0d4 | 341 | %{_mandir}/man1/gp2c*.1* |
1d785e6a | 342 | |
343 | %files -n perl-Math-Pari | |
344 | %defattr(644,root,root,755) | |
c8d4b162 | 345 | %doc Math-Pari-%{math_pari_version}/{Changes,README,TODO} |
bc327ffe JB |
346 | %{perl_vendorarch}/Math/Pari.pm |
347 | %{perl_vendorarch}/Math/PariInit.pm | |
c6321049 | 348 | %dir %{perl_vendorarch}/auto/Math/Pari |
c6321049 | 349 | %attr(755,root,root) %{perl_vendorarch}/auto/Math/Pari/Pari.so |
bc327ffe JB |
350 | %{_mandir}/man3/Math::Pari.3pm* |
351 | %{_mandir}/man3/Math::PariInit.3pm* | |
352 | %{_mandir}/man3/Math::libPARI.3pm* | |
353 | %{_mandir}/man3/Math::libPARI.dumb.3pm* |