]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build | |
3 | %bcond_without tcl # disable tcl support | |
4 | %bcond_without tests # do not run "make check" | |
5 | %bcond_without docs # do not build documentation | |
6 | # | |
7 | # NOTE: | |
8 | # - /etc/localtime must be present for tests to work | |
9 | # | |
10 | # TODO: | |
11 | # - script for rpm to autoprovides/autorequires R internals | |
12 | # | |
13 | %include /usr/lib/rpm/macros.perl | |
14 | Summary: A language for data analysis and graphics | |
15 | Summary(pl.UTF-8): Język do analizy danych oraz grafiki | |
16 | Name: R | |
17 | Version: 3.1.2 | |
18 | Release: 1 | |
19 | License: Mixed (distributable), mostly GPL v2+ | |
20 | Group: Development/Languages | |
21 | # CRAN master site: ftp://cran.r-project.org/pub/R/src/ | |
22 | Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-3/%{name}-%{version}.tar.gz | |
23 | # Source0-md5: 3af29ec06704cbd08d4ba8d69250ae74 | |
24 | Source1: %{name}.desktop | |
25 | Source2: %{name}.xpm | |
26 | URL: http://www.r-project.org/ | |
27 | BuildRequires: autoconf >= 2.62 | |
28 | BuildRequires: automake | |
29 | BuildRequires: blas-devel >= 3.2.2-2 | |
30 | BuildRequires: bzip2-devel >= 1.0.6 | |
31 | BuildRequires: cairo-devel >= 1.6 | |
32 | BuildRequires: gcc-fortran | |
33 | BuildRequires: gettext-tools >= 0.14.5 | |
34 | BuildRequires: lapack-devel >= 3.2.2-2 | |
35 | BuildRequires: libicu-devel | |
36 | BuildRequires: libjpeg-devel >= 6b | |
37 | BuildRequires: libpng-devel >= 1.2.7 | |
38 | BuildRequires: libstdc++-devel | |
39 | BuildRequires: libtiff-devel | |
40 | BuildRequires: libtool >= 2:2.0 | |
41 | BuildRequires: libxml2-devel >= 2.6.26 | |
42 | BuildRequires: pango-devel | |
43 | BuildRequires: pcre-devel >= 7.6 | |
44 | BuildRequires: perl-base >= 1:5.6 | |
45 | BuildRequires: pkgconfig | |
46 | BuildRequires: readline-devel | |
47 | BuildRequires: rpm-perlprov | |
48 | %if %{with tcl} | |
49 | BuildRequires: tcl-devel >= 8.4 | |
50 | BuildRequires: tk-devel >= 8.4 | |
51 | %endif | |
52 | %if %{with docs} | |
53 | BuildRequires: tetex-dvips | |
54 | BuildRequires: tetex-latex | |
55 | BuildRequires: tetex-pdftex | |
56 | BuildRequires: texinfo-texi2dvi >= 4.7 | |
57 | %endif | |
58 | BuildRequires: xorg-lib-libX11-devel | |
59 | BuildRequires: xorg-lib-libXmu-devel | |
60 | BuildRequires: xorg-lib-libXt-devel | |
61 | BuildRequires: xz-devel >= 4.999 | |
62 | BuildRequires: zip | |
63 | BuildRequires: zlib-devel >= 1.2.3 | |
64 | #Requires: lpr | |
65 | Requires(post): perl-base | |
66 | Requires(post): textutils | |
67 | Requires: blas >= 3.2.2-2 | |
68 | Suggests: rkward | |
69 | Obsoletes: R-base | |
70 | Obsoletes: R-contrib | |
71 | Obsoletes: R-recommended | |
72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
73 | ||
74 | %description | |
75 | A system for statistical computation and graphics. R consists of a | |
76 | language plus a run-time environment with graphics, a debugger, access | |
77 | to certain system functions, and the ability to run programs stored in | |
78 | script files. | |
79 | ||
80 | The design of R has been heavily influenced by two existing languages: | |
81 | Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the | |
82 | resulting language is very similar in appearance to S, the underlying | |
83 | implementation and semantics are derived from Scheme. | |
84 | ||
85 | %description -l pl.UTF-8 | |
86 | System do obliczeń statystycznych i grafiki. R składa się z języka | |
87 | oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do | |
88 | niektórych funkcji systemowych oraz możliwością uruchamiania programów | |
89 | zapisanych w skryptach. | |
90 | ||
91 | Język R był zainspirowany dwoma istniejącymi językami: S (Beckera, | |
92 | Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale | |
93 | implementacja i semantyka wywodzi się ze Scheme. | |
94 | ||
95 | %package java-tools | |
96 | Summary: R Java tools | |
97 | Summary(pl.UTF-8): Narzędzia R w Javie | |
98 | Group: Development/Tools | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | ||
101 | %description java-tools | |
102 | R Java classes. | |
103 | ||
104 | %description java-tools -l pl.UTF-8 | |
105 | Narzędzia R w Javie. | |
106 | ||
107 | %prep | |
108 | %setup -q | |
109 | ||
110 | %build | |
111 | %{__aclocal} -I m4 | |
112 | %{__autoconf} | |
113 | install -d build | |
114 | cd build | |
115 | ../%configure \ | |
116 | F77=gfortran \ | |
117 | FC=gfortran \ | |
118 | --enable-R-shlib \ | |
119 | --enable-largefile \ | |
120 | --with-ICU \ | |
121 | --with-blas \ | |
122 | --with-cairo \ | |
123 | --with-jpeglib \ | |
124 | --with-lapack \ | |
125 | --with-libpng \ | |
126 | --with-readline \ | |
127 | --with-recommended-packages \ | |
128 | --with-system-bzlib \ | |
129 | --with-system-pcre \ | |
130 | --with-system-xz \ | |
131 | --with-system-zlib \ | |
132 | %if %{with tcl} | |
133 | --with-tcltk \ | |
134 | --with-tcl-config=/usr/lib/tclConfig.sh \ | |
135 | --with-tk-config=/usr/lib/tkConfig.sh \ | |
136 | %else | |
137 | --without-tcltk \ | |
138 | %endif | |
139 | --with-x | |
140 | ||
141 | %{__make} -j1 | |
142 | ||
143 | %if %{with tests} | |
144 | %{__make} check | |
145 | %endif | |
146 | ||
147 | %if %{with docs} | |
148 | %{__make} docs pdf info | |
149 | %endif | |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}} | |
154 | ||
155 | %{__make} -C build -j1 install \ | |
156 | DESTDIR=$RPM_BUILD_ROOT | |
157 | ||
158 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
159 | install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} | |
160 | ||
161 | ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir} | |
162 | ||
163 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R | |
164 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include | |
165 | ||
166 | gen_lang() { | |
167 | dir="$1" | |
168 | for d in $RPM_BUILD_ROOT${dir}/* ; do | |
169 | bd=$(basename $d) | |
170 | lang="${bd%@*}" | |
171 | echo "%lang($lang) ${dir}/${bd}" | |
172 | done | |
173 | } | |
174 | ||
175 | for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do | |
176 | module=$(basename $moddir) | |
177 | echo "%dir %{_libdir}/R/library/${module}" | |
178 | if [ "$module" = "translations" ]; then | |
179 | for f in $moddir/* ; do | |
180 | bf=$(basename $f) | |
181 | case "$bf" in | |
182 | DESCRIPTION|en|en@quot) | |
183 | echo "%{_libdir}/R/library/${module}/${bf}" | |
184 | ;; | |
185 | *) | |
186 | echo "%lang(${bf}) %{_libdir}/R/library/${module}/${bf}" | |
187 | ;; | |
188 | esac | |
189 | done | |
190 | else | |
191 | for f in $moddir/* ; do | |
192 | bf=$(basename $f) | |
193 | case "$bf" in | |
194 | po) | |
195 | echo "%dir %{_libdir}/R/library/${module}/po" | |
196 | gen_lang %{_libdir}/R/library/${module}/po | |
197 | ;; | |
198 | libs) | |
199 | echo "%dir %{_libdir}/R/library/${module}/libs" | |
200 | echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so" | |
201 | ;; | |
202 | *) | |
203 | echo "%{_libdir}/R/library/${module}/${bf}" | |
204 | ;; | |
205 | esac | |
206 | done | |
207 | fi | |
208 | done > R.files | |
209 | ||
210 | # just GPL | |
211 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/COPYING | |
212 | # packaged as %doc | |
213 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS.rds,THANKS} | |
214 | %if %{with docs} | |
215 | # pdf version of NEWS | |
216 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/NEWS.pdf | |
217 | %endif | |
218 | ||
219 | %clean | |
220 | rm -rf $RPM_BUILD_ROOT | |
221 | ||
222 | %post -p /sbin/ldconfig | |
223 | %postun -p /sbin/ldconfig | |
224 | ||
225 | %files -f R.files | |
226 | %defattr(644,root,root,755) | |
227 | %doc README doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS,NEWS.[012],RESOURCES,THANKS} | |
228 | %attr(755,root,root) %{_bindir}/R | |
229 | %attr(755,root,root) %{_bindir}/Rscript | |
230 | %dir %{_libdir}/R | |
231 | %dir %{_libdir}/R/lib | |
232 | %attr(755,root,root) %{_libdir}/R/lib/libR.so | |
233 | %attr(755,root,root) %{_libdir}/libR.so | |
234 | %{_libdir}/R/COPYING | |
235 | %{_libdir}/R/SVN-REVISION | |
236 | %attr(755,root,root) %{_libdir}/R/bin | |
237 | %exclude %{_libdir}/R/bin/javareconf | |
238 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} | |
239 | %dir %{_libdir}/R/doc | |
240 | %{_libdir}/R/doc/[KRm]* | |
241 | %{_libdir}/R/doc/CRAN_mirrors.csv | |
242 | %{_libdir}/R/doc/NEWS* | |
243 | %dir %{_libdir}/R/doc/html | |
244 | %{_libdir}/R/doc/html/*.css | |
245 | %{_libdir}/R/doc/html/[NRSa-lr-u]*.html | |
246 | %{_libdir}/R/doc/html/packages-head*.html | |
247 | %{_libdir}/R/doc/html/favicon.ico | |
248 | %{_libdir}/R/doc/html/*.jpg | |
249 | %ghost %{_libdir}/R/doc/html/packages.html | |
250 | %{_libdir}/R/etc | |
251 | %{_libdir}/R/include | |
252 | %dir %{_libdir}/R/library | |
253 | # library files list is autogenerated (see R.files above) | |
254 | %attr(755,root,root) %{_libdir}/R/modules | |
255 | %dir %{_libdir}/R/share | |
256 | %{_libdir}/R/share/R | |
257 | %{_libdir}/R/share/dictionaries | |
258 | %{_libdir}/R/share/encodings | |
259 | %{_libdir}/R/share/licenses | |
260 | %{_libdir}/R/share/make | |
261 | %{_libdir}/R/share/sh | |
262 | %{_libdir}/R/share/texmf | |
263 | %{_desktopdir}/R.desktop | |
264 | %{_pixmapsdir}/R.xpm | |
265 | %{_includedir}/R | |
266 | %{_pkgconfigdir}/libR.pc | |
267 | %{_mandir}/man1/R.1* | |
268 | %{_mandir}/man1/Rscript* | |
269 | ||
270 | %files java-tools | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/R/bin/javareconf | |
273 | %{_libdir}/R/share/java |