]> git.pld-linux.org Git - packages/R.git/blob - R.spec
359a2f33a80625d800a2362f23e1702e4f961b5c
[packages/R.git] / R.spec
1 #
2 # Conditional build
3 %bcond_without  tcl             # disable tcl support
4 %bcond_without  tests           # do not run "make check"
5 #
6 # TODO:
7 # - WTF is empty -recommended package with P/O which belong to -base ???
8 # - script for rpm to autoprovides/autorequires R internals
9 #
10 %define KernSmooth_version      2.22r22
11 %define VR_version              7.2r45
12 %define boot_version            1.2r34
13 %define cluster_version         1.11.11
14 %define foreign_version         0.8r29
15 %define lattice_version         0.17r17
16 %define mgcv_version            1.4r1.1
17 %define nlme_version            3.1r89
18 %define rpart_version           3.1r42
19 %define survival_version        2.34r1
20
21 %include        /usr/lib/rpm/macros.perl
22 Summary:        A language for data analysis and graphics
23 Summary(pl.UTF-8):      Język do analizy danych oraz grafiki
24 Name:           R
25 Version:        2.8.1
26 Release:        0.1
27 License:        Mixed (distributable), mostly GPL
28 Group:          Development/Languages
29 # CRAN master site: ftp://cran.r-project.org/pub/R/src/
30 Source0:        ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz
31 # Source0-md5:  acd40621b8942a2464daa2f9cef3273d
32 Source1:        %{name}.desktop
33 Patch0:         %{name}-libicuuc.patch
34 URL:            http://www.r-project.org/
35 BuildRequires:  autoconf
36 BuildRequires:  automake
37 BuildRequires:  blas-devel
38 BuildRequires:  bzip2-devel
39 BuildRequires:  cairo-devel
40 BuildRequires:  gcc-c++
41 BuildRequires:  gcc-fortran
42 BuildRequires:  gettext-devel
43 BuildRequires:  lapack-devel >= 3.1.1-4
44 BuildRequires:  libicu-devel
45 BuildRequires:  libjpeg-devel >= 6b
46 BuildRequires:  libpng-devel >= 1.0.5
47 BuildRequires:  libstdc++-devel
48 BuildRequires:  libtool
49 BuildRequires:  libxml2-devel >= 2.6.26
50 BuildRequires:  pango-devel
51 BuildRequires:  pcre-devel
52 BuildRequires:  perl-base >= 1:5.6
53 BuildRequires:  readline-devel
54 BuildRequires:  rpm-perlprov
55 %{?with_tcl:BuildRequires:      tcl-devel}
56 BuildRequires:  tetex-dvips
57 BuildRequires:  tetex-latex
58 BuildRequires:  tetex-pdftex
59 %{?with_tcl:BuildRequires:      tk-devel}
60 BuildRequires:  xorg-lib-libX11-devel
61 BuildRequires:  xorg-lib-libXmu-devel
62 BuildRequires:  xorg-lib-libXt-devel
63 BuildRequires:  zip
64 BuildRequires:  zlib-devel >= 1.1.3
65 #Requires:      lpr
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 A system for statistical computation and graphics. R consists of a
70 language plus a run-time environment with graphics, a debugger, access
71 to certain system functions, and the ability to run programs stored in
72 script files.
73
74 The design of R has been heavily influenced by two existing languages:
75 Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
76 resulting language is very similar in appearance to S, the underlying
77 implementation and semantics are derived from Scheme.
78
79 %description -l pl.UTF-8
80 System do obliczeń statystycznych i grafiki. R składa się z języka
81 oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do
82 niektórych funkcji systemowych oraz możliwością uruchamiania programów
83 zapisanych w skryptach.
84
85 Język R był zainspirowany dwoma istniejącymi językami: S (Beckera,
86 Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
87 implementacja i semantyka wywodzi się ze Scheme.
88
89 %package base
90 Summary:        The R base distribution
91 Summary(pl.UTF-8):      Podstawowa dystrybucja R
92 License:        GPL v2 / LGPL
93 Group:          Development/Languages
94 Requires(post): perl-base
95 Requires(post): textutils
96 Provides:       R-cran-base
97 Provides:       R-cran-datasets
98 Provides:       R-cran-grDevices
99 Provides:       R-cran-graphics
100 Provides:       R-cran-grid
101 Provides:       R-cran-methods
102 Provides:       R-cran-splines
103 Provides:       R-cran-stats
104 Provides:       R-cran-stats4
105 Provides:       R-cran-tcltk
106 Provides:       R-cran-tools
107 Provides:       R-cran-utils
108
109 %description base
110 R is a language and run-time environment for carrying out interactive
111 statistical data analysis. It is not entirely dissimilar to the S
112 language developed at AT&T Bell Laboratories (and now Lucent
113 Technologies). Indeed, S users will find the environment quite
114 familiar and a good deal of S software will run without change under
115 R.
116
117 %description base -l pl.UTF-8
118 R jest językiem i środowiskiem uruchomieniowym do interaktywnej
119 analizy danych statystycznych. R nie jest całkowicie zgodny z językiem
120 S opracowanym w AT&T Bell Laboratiories (a teraz Lucent Technologies),
121 mimo to użytkownicy S zauważą zbliżone środowisko, a duża część
122 oprogramowania w S będzie działała bez zmian w R.
123
124 %package recommended
125 Summary:        Recommended contributed packages for the R language
126 Summary(pl.UTF-8):      Zalecane dodatkowe pakiety do języka R
127 License:        GPL, free or free for non-commercial use
128 Group:          Development/Languages
129 URL:            http://www.ci.tuwien.ac.at/R/
130 Requires(post,postun):  R-base = %{version}-%{release}
131 Requires(post,postun):  perl-base
132 Requires(post,postun):  textutils
133 Requires:       R-base = %{version}-%{release}
134 Provides:       R-cran-KernSmooth = %{KernSmooth_version}
135 Provides:       R-cran-MASS = %{VR_version}
136 Provides:       R-cran-VR = %{VR_version}
137 Provides:       R-cran-boot = %{boot_version}
138 Provides:       R-cran-class = %{VR_version}
139 Provides:       R-cran-cluster = %{cluster_version}
140 Provides:       R-cran-foreign = %{foreign_version}
141 Provides:       R-cran-lattice = %{lattice_version}
142 Provides:       R-cran-mgcv = %{mgcv_version}
143 Provides:       R-cran-nlme = %{nlme_version}
144 Provides:       R-cran-nnet = %{VR_version}
145 Provides:       R-cran-rpart = %{rpart_version}
146 Provides:       R-cran-spatial = %{VR_version}
147 Provides:       R-cran-survival = %{survival_version}
148 Obsoletes:      R-contrib
149 Obsoletes:      R-cran-KernSmooth
150 Obsoletes:      R-cran-MASS
151 Obsoletes:      R-cran-VR
152 Obsoletes:      R-cran-boot
153 Obsoletes:      R-cran-class
154 Obsoletes:      R-cran-cluster
155 Obsoletes:      R-cran-foreign
156 Obsoletes:      R-cran-lattice
157 Obsoletes:      R-cran-mgcv
158 Obsoletes:      R-cran-nlme
159 Obsoletes:      R-cran-nnet
160 Obsoletes:      R-cran-rpart
161 Obsoletes:      R-cran-spatial
162 Obsoletes:      R-cran-survival
163
164 %description recommended
165 Packages which extend the capabilities of the R base distribution and
166 are distributed on the Comprehensive R Archive Network (CRAN).
167
168 %description recommended -l pl.UTF-8
169 Pakiety rozszerzające możliwości podstawowej dystrybucji języka R,
170 dystrubuowane w archiwum CRAN (Comprehensive R Archive Network).
171
172 %prep
173 %setup -q
174 %patch0 -p1
175
176 %build
177 %{__aclocal} -I m4
178 %{__autoconf}
179 %configure \
180         --enable-R-shlib \
181         --enable-linux-lfs \
182         --with-system-zlib \
183         --with-system-bzlib \
184         --with-system-pcre \
185         --with-libpng \
186         --with-jpeglib \
187         --with-blas \
188         --with-lapack \
189         --with-readline \
190         --with%{!?with_tcl:out}-tcltk \
191         --with-cairo \
192         --with-libpng \
193         --with-jpeglib \
194         --with-system-zlib \
195         --with-system-bzlib \
196         --with-system-pcre \
197         --with-iconv \
198         --with-ICU \
199         --with-x \
200         --with-recommended-packages
201
202 %{__make}
203 %if %{with tests}
204 %{__make} check
205 %endif
206 %{__make} docs help html info
207
208 %install
209 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir}}
211 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/{R,Text}
212
213 %{__make} -j1 install \
214         DESTDIR=$RPM_BUILD_ROOT
215
216 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
217
218 find $RPM_BUILD_ROOT%{_libdir}/R -name 'Makefile*' -exec rm -f {} \;
219 mv $RPM_BUILD_ROOT%{_libdir}/R/lib/libR*.so $RPM_BUILD_ROOT%{_libdir}
220 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
221 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
222 rm $RPM_BUILD_ROOT%{_bindir}/%{name}
223 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/%{name}
224 ln -sf %{_libdir}/%{name}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
225
226 (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/R/
227 for f in * ; do
228   ln -s %{_libdir}/%{name}/share/perl/R/$f $RPM_BUILD_ROOT%{perl_vendorlib}/R/
229 done)
230 (cd $RPM_BUILD_ROOT%{_libdir}/%{name}/share/perl/Text
231 for f in * ; do
232   ln -s %{_libdir}/%{name}/share/perl/Text/$f $RPM_BUILD_ROOT%{perl_vendorlib}/Text/
233 done)
234
235 rm -r $RPM_BUILD_ROOT%{perl_vendorlib}/{Text,R}
236 rm -r $RPM_BUILD_ROOT%{_libdir}/R/share/perl/{File,Text}
237 mv    $RPM_BUILD_ROOT%{_libdir}/R/share/perl/R $RPM_BUILD_ROOT%{perl_vendorlib}
238
239 %clean
240 rm -rf $RPM_BUILD_ROOT
241
242 %post
243 (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
244  R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --index)
245 /sbin/ldconfig
246
247 %postun -p /sbin/ldconfig
248
249 %files base
250 %defattr(644,root,root,755)
251 %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
252
253 %{_mandir}/man1/R.1*
254 %{_mandir}/man1/Rscript*
255 %attr(755,root,root) %{_bindir}/R
256 %attr(755,root,root) %{_bindir}/Rscript
257 %dir %{_libdir}/R
258 %attr(755,root,root) %{_libdir}/R/bin
259 %attr(755,root,root) %{_libdir}/libR*.so
260 %{_libdir}/R/etc
261 %{_libdir}/R/include
262 %{_includedir}/R
263 %{_libdir}/R/share
264 %{_libdir}/R/COPYING
265 %{_libdir}/R/NEWS
266 %{_libdir}/R/SVN-REVISION
267 %dir %{_libdir}/R/library
268 %{_libdir}/%{name}/library/R.css
269 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
270 %dir %{_libdir}/R/doc
271 %{_libdir}/R/doc/[KRm]*
272 %dir %{_libdir}/R/doc/html
273 %{_libdir}/R/doc/html/*.css
274 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
275 %{_libdir}/R/doc/html/packages-head*.html
276 %{_libdir}/R/doc/html/*.jpg
277 %dir %{_libdir}/R/doc/html/search
278 %{_libdir}/R/doc/html/search/[A-Z]*
279 %ghost %{_libdir}/R/doc/html/search/index.txt
280 %ghost %{_libdir}/R/doc/html/packages.html
281 %{_desktopdir}/*.desktop
282
283 %{perl_vendorlib}/R
284
285 %attr(755,root,root) %{_libdir}/%{name}/modules
286
287 %{_libdir}/%{name}/library/KernSmooth
288 %{_libdir}/%{name}/library/MASS
289 %{_libdir}/%{name}/library/base
290 %{_libdir}/%{name}/library/boot
291 %{_libdir}/%{name}/library/class
292 %{_libdir}/%{name}/library/cluster
293 %{_libdir}/%{name}/library/codetools
294 %{_libdir}/%{name}/library/datasets
295 %{_libdir}/%{name}/library/foreign
296 %{_libdir}/%{name}/library/grDevices
297 %{_libdir}/%{name}/library/graphics
298 %{_libdir}/%{name}/library/grid
299 %{_libdir}/%{name}/library/lattice
300 %{_libdir}/%{name}/library/methods
301 %{_libdir}/%{name}/library/mgcv
302 %{_libdir}/%{name}/library/nlme
303 %{_libdir}/%{name}/library/nnet
304 %{_libdir}/%{name}/library/rpart
305 %{_libdir}/%{name}/library/spatial
306 %{_libdir}/%{name}/library/splines
307 %{_libdir}/%{name}/library/stats
308 %{_libdir}/%{name}/library/stats4
309 %{_libdir}/%{name}/library/survival
310 %{_libdir}/%{name}/library/tcltk
311 %{_libdir}/%{name}/library/tools
312 %{_libdir}/%{name}/library/utils
313
314 %{_pkgconfigdir}/*.pc
315
316 %files recommended
317 %defattr(644,root,root,755)
This page took 0.095967 seconds and 2 git commands to generate.