]>
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 | # |
f1529298 | 14 | %include /usr/lib/rpm/macros.perl |
8325eaaa | 15 | Summary: A language for data analysis and graphics |
1645531f | 16 | Summary(pl.UTF-8): Język do analizy danych oraz grafiki |
8325eaaa | 17 | Name: R |
871a4faf JB |
18 | Version: 3.6.1 |
19 | Release: 1 | |
b61bd147 | 20 | License: mixed (distributable), mostly GPL v2+ |
92bb3b47 | 21 | Group: Development/Languages |
296ba991 | 22 | # CRAN master site: ftp://cran.r-project.org/pub/R/src/ |
98d66559 | 23 | Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-3/%{name}-%{version}.tar.gz |
871a4faf | 24 | # Source0-md5: f5003472d58a3d3765a1c537fdae71d5 |
8d9cfdde | 25 | Source1: %{name}.desktop |
b5b84967 | 26 | Source2: %{name}.xpm |
296ba991 | 27 | URL: http://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 |
208dbe8e | 42 | BuildRequires: libpng-devel >= 1.2.7 |
375593d6 | 43 | BuildRequires: libstdc++-devel |
ce7a2c69 | 44 | BuildRequires: libtiff-devel |
208dbe8e | 45 | BuildRequires: libtool >= 2:2.0 |
009ff3c3 | 46 | BuildRequires: libxml2-devel >= 2.6.26 |
78c1da32 | 47 | BuildRequires: pango-devel |
34254ceb JB |
48 | BuildRequires: pcre-devel >= 8.32 |
49 | # actually not used | |
50 | #BuildRequires: pcre2-8-devel | |
375593d6 | 51 | BuildRequires: perl-base >= 1:5.6 |
9ffb5072 | 52 | BuildRequires: pkgconfig |
375593d6 | 53 | BuildRequires: readline-devel |
202a926a | 54 | BuildRequires: rpm-perlprov |
561bbd91 JR |
55 | %if %{with tcl} |
56 | BuildRequires: tcl-devel >= 8.4 | |
57 | BuildRequires: tk-devel >= 8.4 | |
58 | %endif | |
b61bd147 | 59 | BuildRequires: tre-devel |
92428ccd | 60 | %if %{with docs} |
a9ad1987 | 61 | BuildRequires: tetex-dvips |
0d60cf00 | 62 | BuildRequires: tetex-latex |
a9ad1987 | 63 | BuildRequires: tetex-pdftex |
208dbe8e | 64 | BuildRequires: texinfo-texi2dvi >= 4.7 |
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 |
b5fa3c87 | 122 | |
5c7326d9 | 123 | %build |
259d0143 | 124 | %{__aclocal} -I m4 |
2028e949 | 125 | %{__autoconf} |
f7620b73 AM |
126 | install -d build |
127 | cd build | |
128 | ../%configure \ | |
6035063f JR |
129 | F77=gfortran \ |
130 | FC=gfortran \ | |
8d9cfdde | 131 | --enable-R-shlib \ |
35ad2379 | 132 | --enable-largefile \ |
b61bd147 | 133 | %{!?with_openmp:--disable-openmp} \ |
b8727bec | 134 | --with-internal-tzcode \ |
ce7a2c69 | 135 | --with-ICU \ |
1c43aa59 | 136 | --with-blas \ |
78c1da32 | 137 | --with-cairo \ |
78c1da32 | 138 | --with-jpeglib \ |
ce7a2c69 JB |
139 | --with-lapack \ |
140 | --with-libpng \ | |
141 | --with-readline \ | |
142 | --with-recommended-packages \ | |
b61bd147 | 143 | --with-system-tre \ |
561bbd91 JR |
144 | %if %{with tcl} |
145 | --with-tcltk \ | |
146 | --with-tcl-config=/usr/lib/tclConfig.sh \ | |
147 | --with-tk-config=/usr/lib/tkConfig.sh \ | |
148 | %else | |
149 | --without-tcltk \ | |
150 | %endif | |
ce7a2c69 | 151 | --with-x |
a9ad1987 | 152 | |
df806e24 | 153 | %{__make} -j1 |
f7620b73 | 154 | |
8d4651f6 | 155 | %if %{with tests} |
f4718f36 | 156 | %{__make} check |
8d4651f6 | 157 | %endif |
f7620b73 | 158 | |
92428ccd | 159 | %if %{with docs} |
7447edd2 | 160 | %{__make} docs pdf info |
92428ccd | 161 | %endif |
5c7326d9 | 162 | |
5c7326d9 | 163 | %install |
9a8695ea | 164 | rm -rf $RPM_BUILD_ROOT |
b5b84967 | 165 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}} |
4367b4de | 166 | |
f7620b73 | 167 | %{__make} -C build -j1 install \ |
8d4651f6 | 168 | DESTDIR=$RPM_BUILD_ROOT |
b54b52ee | 169 | |
8d9cfdde | 170 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
b5b84967 | 171 | install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} |
b54b52ee | 172 | |
c9191d01 | 173 | ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir} |
174 | ||
34254ceb | 175 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R |
e522fa9a | 176 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include |
177 | ||
84b2ee69 JB |
178 | gen_lang() { |
179 | dir="$1" | |
180 | for d in $RPM_BUILD_ROOT${dir}/* ; do | |
181 | bd=$(basename $d) | |
182 | lang="${bd%@*}" | |
183 | echo "%lang($lang) ${dir}/${bd}" | |
184 | done | |
185 | } | |
186 | ||
84b2ee69 JB |
187 | for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do |
188 | module=$(basename $moddir) | |
189 | echo "%dir %{_libdir}/R/library/${module}" | |
333306eb JB |
190 | if [ "$module" = "translations" ]; then |
191 | for f in $moddir/* ; do | |
192 | bf=$(basename $f) | |
193 | case "$bf" in | |
194 | DESCRIPTION|en|en@quot) | |
195 | echo "%{_libdir}/R/library/${module}/${bf}" | |
196 | ;; | |
197 | *) | |
198 | echo "%lang(${bf}) %{_libdir}/R/library/${module}/${bf}" | |
199 | ;; | |
200 | esac | |
201 | done | |
202 | else | |
203 | for f in $moddir/* ; do | |
204 | bf=$(basename $f) | |
205 | case "$bf" in | |
206 | po) | |
207 | echo "%dir %{_libdir}/R/library/${module}/po" | |
208 | gen_lang %{_libdir}/R/library/${module}/po | |
209 | ;; | |
210 | libs) | |
211 | echo "%dir %{_libdir}/R/library/${module}/libs" | |
212 | echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so" | |
213 | ;; | |
214 | *) | |
215 | echo "%{_libdir}/R/library/${module}/${bf}" | |
216 | ;; | |
217 | esac | |
218 | done | |
219 | fi | |
98d66559 | 220 | done > R.files |
84b2ee69 | 221 | |
333306eb JB |
222 | # just GPL |
223 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/COPYING | |
224 | # packaged as %doc | |
225 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS.rds,THANKS} | |
a7b0ffa6 JB |
226 | %if %{with docs} |
227 | # pdf version of NEWS | |
73db9bb9 | 228 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/NEWS.pdf |
a7b0ffa6 | 229 | %endif |
333306eb | 230 | |
d6b5cd1f | 231 | %clean |
b54b52ee | 232 | rm -rf $RPM_BUILD_ROOT |
d6b5cd1f | 233 | |
ce7a2c69 JB |
234 | %post -p /sbin/ldconfig |
235 | %postun -p /sbin/ldconfig | |
d6b5cd1f | 236 | |
84b2ee69 | 237 | %files -f R.files |
8325eaaa | 238 | %defattr(644,root,root,755) |
73db9bb9 | 239 | %doc README doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS,NEWS.[012],RESOURCES,THANKS} |
b54b52ee | 240 | %attr(755,root,root) %{_bindir}/R |
77369605 | 241 | %attr(755,root,root) %{_bindir}/Rscript |
ce7a2c69 | 242 | %dir %{_libdir}/R |
0b891f68 JR |
243 | %dir %{_libdir}/R/lib |
244 | %attr(755,root,root) %{_libdir}/R/lib/libR.so | |
3996be5c | 245 | %attr(755,root,root) %{_libdir}/libR.so |
252d4347 | 246 | %{_libdir}/R/COPYING |
252d4347 | 247 | %{_libdir}/R/SVN-REVISION |
ce7a2c69 | 248 | %attr(755,root,root) %{_libdir}/R/bin |
92428ccd | 249 | %exclude %{_libdir}/R/bin/javareconf |
5d876725 | 250 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} |
b54b52ee | 251 | %dir %{_libdir}/R/doc |
252 | %{_libdir}/R/doc/[KRm]* | |
b61bd147 | 253 | %{_libdir}/R/doc/BioC_mirrors.csv |
333306eb | 254 | %{_libdir}/R/doc/CRAN_mirrors.csv |
73db9bb9 | 255 | %{_libdir}/R/doc/NEWS* |
b54b52ee | 256 | %dir %{_libdir}/R/doc/html |
34254ceb | 257 | %{_libdir}/R/doc/html/Rlogo.svg |
b54b52ee | 258 | %{_libdir}/R/doc/html/*.css |
333306eb | 259 | %{_libdir}/R/doc/html/[NRSa-lr-u]*.html |
77369605 | 260 | %{_libdir}/R/doc/html/packages-head*.html |
333306eb | 261 | %{_libdir}/R/doc/html/favicon.ico |
b54b52ee | 262 | %{_libdir}/R/doc/html/*.jpg |
5d876725 | 263 | %ghost %{_libdir}/R/doc/html/packages.html |
ce7a2c69 JB |
264 | %{_libdir}/R/etc |
265 | %{_libdir}/R/include | |
266 | %dir %{_libdir}/R/library | |
84b2ee69 | 267 | # library files list is autogenerated (see R.files above) |
ce7a2c69 | 268 | %attr(755,root,root) %{_libdir}/R/modules |
72b3fb5c JB |
269 | %dir %{_libdir}/R/share |
270 | %{_libdir}/R/share/R | |
b61bd147 | 271 | %{_libdir}/R/share/Rd |
333306eb | 272 | %{_libdir}/R/share/dictionaries |
72b3fb5c | 273 | %{_libdir}/R/share/encodings |
72b3fb5c | 274 | %{_libdir}/R/share/licenses |
72b3fb5c JB |
275 | %{_libdir}/R/share/make |
276 | %{_libdir}/R/share/sh | |
277 | %{_libdir}/R/share/texmf | |
22cdc933 | 278 | %{_libdir}/R/share/zoneinfo |
b5b84967 | 279 | %{_desktopdir}/R.desktop |
280 | %{_pixmapsdir}/R.xpm | |
ce7a2c69 JB |
281 | %{_includedir}/R |
282 | %{_pkgconfigdir}/libR.pc | |
283 | %{_mandir}/man1/R.1* | |
284 | %{_mandir}/man1/Rscript* | |
60526098 | 285 | |
1eca4d7c | 286 | %files java-tools |
60526098 | 287 | %defattr(644,root,root,755) |
92428ccd | 288 | %attr(755,root,root) %{_libdir}/R/bin/javareconf |
60526098 | 289 | %{_libdir}/R/share/java |