]> git.pld-linux.org Git - packages/R.git/blob - R.spec
- build shared library
[packages/R.git] / R.spec
1 # TODO:
2 # - add more contrib packages
3 # - separate contrib packages to other specs
4 # - (?) separate recomended packages to other specs (i'm not sure...)
5 #
6 # Conditional build:
7 # _without_gnome        - without GNOME support
8 #
9 Summary:        A language for data analysis and graphics
10 Summary(pl):    Jêzyk do analizy danych oraz grafiki
11 Name:           R
12 Version:        1.9.1
13 Release:        2
14 License:        Mixed (distributable), mostly GPL
15 Group:          Development/Languages
16 # CRAN master site: ftp://cran.r-project.org/pub/R/src/
17 Source0:        ftp://stat.ethz.ch/R-CRAN/src/base/%{name}-%{version}.tgz
18 # Source0-md5:  c8201425506e5c077ef1936e19ea2f51
19 Source1:        ftp://stat.ethz.ch/R-CRAN/src/contrib/KernSmooth_2.22-13.tar.gz
20 # Source1-md5:  15f5ab6094ea848f02b5109f40055128
21 Source2:        ftp://stat.ethz.ch/R-CRAN/src/contrib/VR_7.2-4.tar.gz
22 # Source2-md5:  15882d679f7704597194ab4be40e1a62
23 Source3:        ftp://stat.ethz.ch/R-CRAN/src/contrib/acepack_1.3-2.1.tar.gz
24 # Source3-md5:  eb75cab587664b58df4a14c65f450b62
25 Source4:        ftp://stat.ethz.ch/R-CRAN/src/contrib/boot_1.2-17.tar.gz
26 # Source4-md5:  88a0bc20efe532f30b0606b99394a3f4
27 Source5:        ftp://stat.ethz.ch/R-CRAN/src/contrib/bootstrap_1.0-12.tar.gz
28 # Source5-md5:  6860c7d62ab95756267be774bcf60578
29 Source6:        ftp://stat.ethz.ch/R-CRAN/src/contrib/cluster_1.9.6.tar.gz
30 # Source6-md5:  6baba1d66491f6c4fab70d9128df2ccd
31 Source7:        ftp://stat.ethz.ch/R-CRAN/src/contrib/date_1.2-18.tar.gz
32 # Source7-md5:  8bb9d6bc5cb0b06e250be6f478cf4c2a
33 Source8:        ftp://stat.ethz.ch/R-CRAN/src/contrib/e1071_1.4-1.tar.gz
34 # Source8-md5:  806fc46915d14640e6d01cfa590422e5
35 Source9:        ftp://stat.ethz.ch/R-CRAN/src/contrib/foreign_0.6-11.tar.gz
36 # Source9-md5:  6ebc52bc959d27eff06e50b83818bf77
37 Source10:       ftp://stat.ethz.ch/R-CRAN/src/contrib/fracdiff_1.1-1.tar.gz
38 # Source10-md5: e1f624b063789f21c74d85ebaeda60fa
39 Source11:       ftp://stat.ethz.ch/R-CRAN/src/contrib/gee_4.13-10.tar.gz
40 # Source11-md5: 7f32a7f7b022dd366d27482a3561d2a6
41 Source12:       ftp://stat.ethz.ch/R-CRAN/src/contrib/lattice_0.9-16.tar.gz
42 # Source12-md5: c98c91ccea8880c79d30aab4e2cca63b
43 Source13:       ftp://stat.ethz.ch/R-CRAN/src/contrib/leaps_2.7.tar.gz
44 # Source13-md5: 551d8cd9a53d2eee7c13108577910a44
45 Source14:       ftp://stat.ethz.ch/R-CRAN/src/contrib/mgcv_1.0-9.tar.gz
46 # Source14-md5: ba1585b777c886444d0470c8f831f983
47 Source15:       ftp://stat.ethz.ch/R-CRAN/src/contrib/mlbench_1.0-0.tar.gz
48 # Source15-md5: 101108689bd005ef96641a8c33f17698
49 Source16:       ftp://stat.ethz.ch/R-CRAN/src/contrib/nlme_3.1-50.tar.gz
50 # Source16-md5: 6d210f59cb96fda0e3b9644e6085da5a
51 Source17:       ftp://stat.ethz.ch/R-CRAN/src/contrib/oz_1.0-9.tar.gz
52 # Source17-md5: 0eae69fafcabbe14dff81ff00ef3e4fa
53 Source18:       ftp://stat.ethz.ch/R-CRAN/src/contrib/polynom_1.1-15.tar.gz
54 # Source18-md5: bc17210955f5a49834531ba1bdc1b0e9
55 Source19:       ftp://stat.ethz.ch/R-CRAN/src/contrib/princurve_1.1-6.tar.gz
56 # Source19-md5: 8c36f2fef3265890f8393dac6d89fdc5
57 Source20:       ftp://stat.ethz.ch/R-CRAN/src/contrib/quadprog_1.4-7.tar.gz
58 # Source20-md5: d93eb133e72e89de717c9db9d5f28d66
59 Source21:       ftp://stat.ethz.ch/R-CRAN/src/contrib/rpart_3.1-17.tar.gz
60 # Source21-md5: 378fb531cac466b6abb774da00846e43
61 Source22:       ftp://stat.ethz.ch/R-CRAN/src/contrib/survival_2.13-1.tar.gz
62 # Source22-md5: cae71a003c742e42675dbdd9b9da371f
63 Source23:       ftp://stat.ethz.ch/R-CRAN/src/contrib/xgobi_1.2-12.tar.gz
64 # Source23-md5: 3edae689c69c12ef71df1ee269c1b1b8
65 Source26:       %{name}.desktop
66 URL:            http://www.r-project.org/
67 BuildRequires:  XFree86-devel
68 BuildRequires:  autoconf
69 BuildRequires:  automake
70 BuildRequires:  blas-devel
71 BuildRequires:  gcc-c++
72 BuildRequires:  gcc-g77
73 BuildRequires:  libjpeg-devel >= 6b
74 BuildRequires:  libpng-devel >= 1.0.5
75 BuildRequires:  libstdc++-devel
76 BuildRequires:  libtool
77 BuildRequires:  libxml-devel
78 BuildRequires:  perl-base >= 1:5.6
79 BuildRequires:  readline-devel
80 BuildRequires:  tetex-latex
81 BuildRequires:  tetex-dvips
82 BuildRequires:  tetex-pdftex
83 BuildRequires:  zip
84 BuildRequires:  zlib >= 1.1.3
85 #BuildRequires: lpr
86 %{!?_without_gnome:BuildRequires:       gnome-libs-devel}
87 %{!?_without_gnome:BuildRequires:       ORBit-devel}
88 %{!?_without_gnome:BuildRequires:       libglade-gnome-devel}
89 Provides:       R-base
90 Provides:       R-contrib
91 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92
93 %description
94 A system for statistical computation and graphics. R consists of a
95 language plus a run-time environment with graphics, a debugger, access
96 to certain system functions, and the ability to run programs stored in
97 script files.
98
99 The design of R has been heavily influenced by two existing languages:
100 Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
101 resulting language is very similar in appearance to S, the underlying
102 implementation and semantics are derived from Scheme.
103
104 %description -l pl
105 System do obliczeñ statystycznych i grafiki. R sk³ada siê z jêzyka
106 oraz ¶rodowiska uruchomieniowego z grafik±, debuggerem, dostêpem do
107 niektórych funkcji systemowych oraz mo¿liwo¶ci± uruchamiania programów
108 zapisanych w skryptach.
109
110 Jêzyk R by³ zainspirowany dwoma istniej±cymi jêzykami: S (Beckera,
111 Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
112 implementacja i semantyka wywodzi siê ze Scheme.
113
114 %package base
115 Summary:        The R base distribution
116 Summary(pl):    Podstawowa dystrybucja R
117 License:        GPL v2 / LGPL
118 Group:          Development/Languages
119 Requires(post): textutils
120 Requires(post): perl
121 Provides:       R-ctest R-eda R-lqs R-methods R-modreg R-mva R-nls R-splines
122 Provides:       R-stepfun R-tcltk R-tools R-ts R-grid
123
124 %description base
125 R is a language and run-time environment for carrying out interactive
126 statistical data analysis. It is not entirely dissimilar to the S
127 language developed at AT&T Bell Laboratories (and now Lucent
128 Technologies). Indeed, S users will find the environment quite
129 familiar and a good deal of S software will run without change under
130 R.
131
132 %description base -l pl
133 R jest jêzykiem i ¶rodowiskiem uruchomieniowym do interaktywnej
134 analizy danych statystycznych. R nie jest ca³kowicie zgodny z jêzykiem
135 S opracowanym w AT&T Bell Laboratiories (a teraz Lucent Technologies),
136 mimo to u¿ytkownicy S zauwa¿± zbli¿one ¶rodowisko, a du¿a czê¶æ
137 oprogramowania w S bêdzie dzia³a³a bez zmian w R.
138
139 %package recommended
140 Summary:        Recommended contributed packages for the R language
141 Summary(pl):    Zalecane dodatkowe pakiety do jêzyka R
142 Group:          Development/Languages
143 Provides:       R-KernSmooth R-VR R-boot R-cluster R-foreign
144 Provides:       R-lattice R-mgcv R-nlme R-rpart R-survival
145 License:        GPL, free or free for non-commercial use
146 URL:            http://www.ci.tuwien.ac.at/R/
147 Requires(post,postun):  R-base
148 Requires(post,postun):  textutils
149 Requires(post,postun):  perl
150 Requires:       R-base >= %{version}
151 Obsoletes:      R-survival4 R-MASS R-clus R-class R-nnet R-spatial
152
153 %description recommended
154 Packages which extend the capabilities of the R base distribution and
155 are distributed on the Comprehensive R Archive Network (CRAN).
156
157 %description recommended -l pl
158 Pakiety rozszerzaj±ce mo¿liwo¶ci podstawowej dystrybucji jêzyka R,
159 dystrubuowane w archiwum CRAN (Comprehensive R Archive Network).
160
161 %package contrib
162 Summary:        Contributed packages for the R language
163 Summary(pl):    Dodatkowe pakiety do jêzyka R
164 License:        Mixed
165 Group:          Development/Languages
166 URL:            http://www.ci.tuwien.ac.at/R/
167 Requires(post,postun):  R-base
168 Requires(post,postun):  textutils
169 Requires(post,postun):  perl
170 Requires:       R-base >= %{version}
171 Requires:       R-VR
172 Provides:       R-acepack R-bootstrap R-date R-e1071 R-fracdiff R-gee
173 Provides:       R-leaps R-oz R-polynom R-princurve R-quadprog
174 Provides:       R-xgobi
175 Obsoletes:      R-principal.curve
176
177 %description contrib
178 Packages which extend the capabilities of the R base distribution and
179 are distributed on the Comprehensive R Archive Network (CRAN).
180
181 %description contrib -l pl
182 Pakiety rozszerzaj±ce mo¿liwo¶ci podstawowej dystrybucji jêzyka R,
183 dystrubuowane w archiwum CRAN (Comprehensive R Archive Network).
184
185 %package mlbench
186 Summary:        Machine learning benchmarks
187 Summary(pl):    Testy wydajno¶ci uczenia maszyny
188 Group:          Development/Languages
189 License:        GPL
190 URL:            http://www.ics.uci.edu/~mlearn/MLRepository.html
191 Requires(post,postun):  R-base
192 Requires(post,postun):  textutils
193 Requires(post,postun):  perl
194 Requires:       R-base >= %{version}
195
196 %description mlbench
197 R package which contains a collection of real-world datasets and
198 functions for creating artificial datasets that work as benchmarks for
199 machine learning methods.
200
201 %description mlbench -l pl
202 Ten podpakiet R zawiera zestaw rzeczywistych danych i funkcji do
203 tworzenia sztucznych danych s³u¿±cych jako test wydajno¶ci metod
204 uczenia maszyny.
205
206 %prep
207 %setup -q -c -n R-cran -T -b 1
208 %setup -q -c -n R-cran -T -D -b 2
209 %setup -q -c -n R-cran -T -D -b 3
210 %setup -q -c -n R-cran -T -D -b 4
211 %setup -q -c -n R-cran -T -D -b 5
212 %setup -q -c -n R-cran -T -D -b 6
213 %setup -q -c -n R-cran -T -D -b 7
214 %setup -q -c -n R-cran -T -D -b 8
215 %setup -q -c -n R-cran -T -D -b 9
216 %setup -q -c -n R-cran -T -D -b 10
217 %setup -q -c -n R-cran -T -D -b 11
218 %setup -q -c -n R-cran -T -D -b 12
219 %setup -q -c -n R-cran -T -D -b 13
220 %setup -q -c -n R-cran -T -D -b 14
221 %setup -q -c -n R-cran -T -D -b 15
222 %setup -q -c -n R-cran -T -D -b 16
223 %setup -q -c -n R-cran -T -D -b 17
224 %setup -q -c -n R-cran -T -D -b 18
225 %setup -q -c -n R-cran -T -D -b 19
226 %setup -q -c -n R-cran -T -D -b 20
227 %setup -q -c -n R-cran -T -D -b 21
228 %setup -q -c -n R-cran -T -D -b 22
229 %setup -q -c -n R-cran -T -D -b 23
230 %setup -q
231 #%setup -q -T -D -a 14
232
233 # These files have the path for PERL hard-coded as /usr/local/bin/perl
234 # We need to remove them to avoid dependency problems
235 rm -f ./doc/keyword-test.orig ./etc/undoc/R-funs.orig ./etc/undoc/extrExamp.orig
236
237 %build
238 %{__aclocal}
239 %{__autoconf}
240 cp -f /usr/share/automake/config.* .
241 %configure \
242         %{!?_without_gnome:--with-gnome} \
243         %{?_without_gnome:--without-gnome} \
244         --without-tcltk \
245         --enable-R-shlib
246
247 %{__make}
248 %{__make} help
249 %{__make} html
250 %{__make} clean
251
252 # Install contrib packages
253 #
254 R_HOME=`pwd`;export R_HOME
255 PERL5LIB=`pwd`/share/perl;export PERL5LIB
256 cd ../R-cran
257 for pkg in `ls`
258 do
259 ${R_HOME}/bin/INSTALL ${pkg}
260 done
261 cd ${R_HOME}
262
263 #Remove old template files.
264 #
265 for oldinfile in `find . -name '*.in' -print`
266 do
267         mv ${oldinfile} ${oldinfile}.old
268 #       rm ${oldinfile}
269 done
270
271 # Gather documentation from contrib packages in one directory
272 # Assume that anything not in one of the standard directories is
273 # documentation, and copy it.
274 #
275 mkdir ${R_HOME}/contrib
276 cd ${RPM_BUILD_DIR}/R-cran
277 for pkg in `ls`; do
278         if [ -d ${pkg} ]; then
279                 mkdir ${R_HOME}/${pkg}
280                 for docfile in `ls ${pkg}`; do
281                         case $docfile in
282                                 INDEX) ;;
283                                 TITLE) ;;
284                                 R) ;;
285                                 man) ;;
286                                 src) ;;
287                                 src-c) ;;
288                                 data) ;;
289                                 *) cp -R -P ${pkg}/${docfile} ${R_HOME};;
290                         esac
291                 done
292         fi
293 done
294 cd ${R_HOME}
295
296 %install
297 rm -rf $RPM_BUILD_ROOT
298 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir}}
299
300 install %{SOURCE26} $RPM_BUILD_ROOT%{_desktopdir}
301
302 cp doc/R.1 $RPM_BUILD_ROOT%{_mandir}/man1/
303 sed "s,`pwd`,%{_libdir}/R,g" < bin/R > $RPM_BUILD_ROOT%{_bindir}/R
304
305
306 cp -R AUTHORS afm bin doc etc library modules share \
307         $RPM_BUILD_ROOT%{_libdir}/R
308
309 find $RPM_BUILD_ROOT%{_libdir}/R -name 'Makefile*' -exec rm -f {} \;
310 rm -rf $RPM_BUILD_ROOT%{_libdir}/R/etc/*.old
311
312 mv $RPM_BUILD_ROOT%{_libdir}/R/bin/libR*.so $RPM_BUILD_ROOT%{_libdir}
313
314 cp -R include $RPM_BUILD_ROOT%{_includedir}/R
315 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
316
317 %clean
318 rm -rf $RPM_BUILD_ROOT
319
320 %post base
321 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
322  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
323 /sbin/ldconfig
324
325 %postun base    -p /sbin/ldconfig
326
327 #%preun base
328 ## These files are not owned by any package, so we have to remove them
329 ## but only if this is the last version of R-base on the system.
330 ##
331 #if [ "$1" = 0 ];
332 #then
333 #       rm -f %{_libdir}/R/doc/html/search/index.txt
334 #       rm -f %{_libdir}/R/doc/html/packages.html
335 #fi
336
337 %post contrib
338 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
339  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
340
341 %postun contrib
342 if [ -f ../bin/Rcmd ];then
343 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
344  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
345 fi
346
347 %post recommended
348 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
349  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
350
351 %postun recommended
352 if [ -f ../bin/Rcmd ];then
353 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
354  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
355 fi
356
357 %post mlbench
358 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
359  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
360
361 %postun mlbench
362 if [ -f ../bin/Rcmd ];then
363 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
364  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
365 fi
366
367 %files base
368 %defattr(644,root,root,755)
369 %{_mandir}/man1/R.1*
370 %attr(755,root,root) %{_bindir}/R
371 %dir %{_libdir}/R
372 %{_libdir}/R/afm
373 %attr(755,root,root) %{_libdir}/R/bin
374 %attr(755,root,root) %{_libdir}/libR*.so
375 %{_libdir}/R/etc
376 %{_libdir}/R/include
377 %{_includedir}/R
378 %{_libdir}/R/share
379 %{_libdir}/R/AUTHORS
380 %dir %{_libdir}/R/library
381 %{_libdir}/R/library/*.css
382 %{_libdir}/R/library/base
383 %{_libdir}/R/library/ctest
384 %{_libdir}/R/library/eda
385 %{_libdir}/R/library/grid
386 %{_libdir}/R/library/graphics
387 %{_libdir}/R/library/lqs
388 %{_libdir}/R/library/methods
389 %{_libdir}/R/library/mle
390 %{_libdir}/R/library/modreg
391 %{_libdir}/R/library/mva
392 %{_libdir}/R/library/nls
393 %{_libdir}/R/library/splines
394 %{_libdir}/R/library/stats
395 %{_libdir}/R/library/stats4
396 %{_libdir}/R/library/stepfun
397 %{_libdir}/R/library/tcltk
398 %{_libdir}/R/library/tools
399 %{_libdir}/R/library/ts
400 %{_libdir}/R/library/utils
401 %{_libdir}/R/modules
402 %doc BUGS COPYRIGHTS FAQ NEWS README RESOURCES THANKS Y2K
403 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
404 %dir %{_libdir}/R/doc
405 %{_libdir}/R/doc/[KRm]*
406 %dir %{_libdir}/R/doc/html
407 %{_libdir}/R/doc/html/*.css
408 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
409 %{_libdir}/R/doc/html/packages-head.html
410 %{_libdir}/R/doc/html/*.jpg
411 %dir %{_libdir}/R/doc/html/search
412 %{_libdir}/R/doc/html/search/[A-Z]*
413 %ghost %{_libdir}/R/doc/html/search/index.txt
414 %ghost %{_libdir}/R/doc/html/packages.html
415 %{_desktopdir}/*
416
417 %files recommended
418 %defattr(644,root,root,755)
419 %{_libdir}/R/library/MASS
420 %{_libdir}/R/library/class
421 %{_libdir}/R/library/nnet
422 %{_libdir}/R/library/spatial
423 %doc VR
424 %{_libdir}/R/library/KernSmooth
425 %doc KernSmooth
426 %{_libdir}/R/library/boot
427 %doc boot
428 %{_libdir}/R/library/cluster
429 %doc cluster
430 %{_libdir}/R/library/foreign
431 %doc foreign
432 %{_libdir}/R/library/lattice
433 %doc lattice
434 %{_libdir}/R/library/mgcv
435 %doc mgcv
436 %{_libdir}/R/library/nlme
437 %doc nlme
438 %{_libdir}/R/library/rpart
439 %doc rpart
440 %{_libdir}/R/library/survival
441 %doc survival
442
443 %files contrib
444 %defattr(644,root,root,755)
445 %{_libdir}/R/library/acepack
446 %doc acepack
447 %{_libdir}/R/library/bootstrap
448 %doc bootstrap
449 %{_libdir}/R/library/date
450 %doc date
451 %{_libdir}/R/library/e1071
452 %doc e1071
453 %{_libdir}/R/library/fracdiff
454 %doc fracdiff
455 %{_libdir}/R/library/gee
456 %doc gee
457 %{_libdir}/R/library/leaps
458 %doc leaps
459 %{_libdir}/R/library/oz
460 %doc oz
461 %{_libdir}/R/library/polynom
462 %doc polynom
463 %{_libdir}/R/library/princurve
464 %doc princurve
465 %{_libdir}/R/library/quadprog
466 %doc quadprog
467 %{_libdir}/R/library/xgobi
468 %doc xgobi
469
470 %files mlbench
471 %defattr(644,root,root,755)
472 %{_libdir}/R/library/mlbench
473 %doc mlbench
This page took 0.066565 seconds and 4 git commands to generate.