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