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