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