]> git.pld-linux.org Git - packages/parigp.git/blob - parigp.spec
- rebuild with readline 7.0
[packages/parigp.git] / parigp.spec
1 #
2 # Conditional build:
3 %bcond_without  tex     # don't build tex documentation
4 #
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
11 Name:           parigp
12 Version:        %{pari_version}
13 Release:        9
14 License:        GPL
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
25 Source5:        %{name}.png
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
35 BuildRequires:  ctags
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
40 %if %{with tex}
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
51 %endif
52 BuildRequires:  xorg-lib-libX11-devel
53 BuildRequires:  xorg-util-imake
54 Requires:       pari = %{pari_version}-%{release}
55 Requires:       xdvi
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
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.
67
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.
77
78 %package -n pari
79 Summary:        Shared PARI library (required by the parigp package)
80 Summary(pl.UTF-8):      Biblioteka współdzielona PARI (wymagana przez pakiet parigp)
81 Group:          Libraries
82
83 %description -n pari
84 Shared PARI library. You need it to run PARI/GP.
85
86 %description -n pari -l pl.UTF-8
87 Biblioteka współdzielona PARI. Potrzebujesz jej do uruchomienia
88 PARI/GP.
89
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}
95
96 %description -n pari-devel
97 Include files for shared PARI library. You need them to use PARI
98 routines in you own programs.
99
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
103 swoich programach.
104
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}
110
111 %description -n pari-static
112 Static PARI library. You need it to statically link your programs with
113 PARI.
114
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.
118
119 %package demos
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}
124
125 %description demos
126 Example PARI/GP scripts. You can write such programs on your own.
127
128 %description demos -l pl.UTF-8
129 Przykładowe skrypty pisane w języku PARI/GP. Sam możesz takie napisać.
130
131 %package galdata
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}
136
137 %description galdata
138 Galois data resolvents for PARI/GP.
139
140 %description galdata -l pl.UTF-8
141 Reprezentacje danych Galois do PARI/GP.
142
143 %package gp2c
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}
147 Epoch:          1
148 Group:          Development/Tools
149 Requires:       pari-devel = %{pari_version}-%{release}
150 Requires:       %{name} = %{pari_version}-%{release}
151
152 %description gp2c
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.
156
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.
162
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
168
169 %description -n perl-Math-Pari
170 The Perl interface to the PARI part of GP/PARI.
171
172 %description -n perl-Math-Pari -l pl.UTF-8
173 Interfejs Perla do biblioteki PARI.
174
175 %prep
176 %setup -q -n pari-%{pari_version} -a 2 -a 3
177 %patch0 -p1
178 %patch1 -p1
179 %patch2 -p1
180 %patch3 -p1
181 %patch4 -p1
182 %patch5 -p1
183 %patch6 -p1
184
185 %build
186 # pari & parigp
187 ./Configure \
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}
197
198
199 %{__make} -C Olinux-%{_target_cpu} all \
200         CC="%{__cc}" \
201         CFLAGS="%{rpmcflags} -fno-strict-aliasing -fomit-frame-pointer -fPIC"
202
203 %{__make} ctags
204
205 %{?with_tex:%{__make} -j1 -C doc docpdf}
206 %ifarch x32
207 ln -s Olinux-%{_target_cpu} Olinux-x86_64
208 %endif
209 %ifarch %{ix86}
210 ln -s Olinux-%{_target_cpu} Olinux-ix86
211 %endif
212 %ifarch sparc sparc64
213 # allow building sparc package on sparc64
214 ln -s Olinux-sparc Olinux-sparc64
215 %endif
216
217 # gp2c
218 cd gp2c-%{gp2c_version}
219
220 ln -sf .. pari
221 %{__autoconf}
222 %configure \
223         --datadir=%{_datadir}/parigp
224
225 %{__make}
226 %{?with_tex:%{__make} -j1 -C doc docall}
227
228 cd ..
229
230 # math-pari
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
234
235 %{__perl} Makefile.PL \
236         INSTALLDIRS=vendor
237
238 %{__make} \
239         OPTIMIZE="%{rpmcflags} -I$(pwd)/../Olinux-%{_target_cpu}"
240
241 # %{__make} test
242
243 %install
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT{%{_datadir}/parigp/galdata,%{_examplesdir}/parigp} \
246         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
247
248 # parigp, pari & pari-devel
249 %{__make} install \
250         DESTDIR=$RPM_BUILD_ROOT
251
252 install src/tags $RPM_BUILD_ROOT%{_datadir}/parigp/misc
253 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
254 install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
255
256 # pari-static
257 install Olinux-%{_target_cpu}/libpari.a $RPM_BUILD_ROOT%{_libdir}/libpari.a
258
259 # parigp-demos
260 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/parigp
261
262 # galdata
263 tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_datadir}/parigp/galdata
264
265 # gp2c
266 %{__make} install -C gp2c-%{gp2c_version} \
267         DESTDIR=$RPM_BUILD_ROOT
268
269 # math-pari
270 %{__make} install -C Math-Pari-%{math_pari_version} \
271         DESTDIR=$RPM_BUILD_ROOT
272
273 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
274 echo ".so gp.1" > $RPM_BUILD_ROOT%{_mandir}/man1/pari.1
275
276 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/parigp/{examples,doc}
277 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Math/libPARI*.pod
278
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %post   -n pari -p /sbin/ldconfig
283 %postun -n pari -p /sbin/ldconfig
284
285 %files
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
302
303 %files -n pari
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
307 %{_libdir}/parigp
308
309 %files -n pari-devel
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_libdir}/libpari.so
312 %{_includedir}/pari
313
314 %files -n pari-static
315 %defattr(644,root,root,755)
316 %{_libdir}/libpari.a
317
318 %files demos
319 %defattr(644,root,root,755)
320 %doc examples/EXPLAIN
321 %{_examplesdir}/parigp
322
323 %files galdata
324 %defattr(644,root,root,755)
325 %{_datadir}/parigp/galdata
326
327 %files gp2c
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*
334
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*
This page took 0.111781 seconds and 3 git commands to generate.