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