]>
Commit | Line | Data |
---|---|---|
8d4651f6 | 1 | # |
77369605 | 2 | # Conditional build |
3 | %bcond_without tcl # disable tcl support | |
92428ccd | 4 | %bcond_without tests # do not run "make check" |
5 | %bcond_without docs # do not build documentation | |
8d4651f6 | 6 | # |
ab573c09 JR |
7 | # NOTE: |
8 | # - /etc/localtime must be present for tests to work | |
9 | # | |
004adff9 | 10 | # TODO: |
bd436d63 | 11 | # - script for rpm to autoprovides/autorequires R internals |
a9ad1987 | 12 | # |
f1529298 | 13 | %include /usr/lib/rpm/macros.perl |
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 |
ee368cdb | 17 | Version: 3.0.1 |
07f759ad | 18 | Release: 1 |
ebd750b5 | 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 |
ee368cdb | 23 | # Source0-md5: 36d51544b007fff26c7fbf36b02ea5ad |
8d9cfdde | 24 | Source1: %{name}.desktop |
b5b84967 | 25 | Source2: %{name}.xpm |
296ba991 | 26 | URL: http://www.r-project.org/ |
208dbe8e | 27 | BuildRequires: autoconf >= 2.62 |
63c19514 | 28 | BuildRequires: automake |
ce7a2c69 | 29 | BuildRequires: blas-devel >= 3.2.2-2 |
208dbe8e | 30 | BuildRequires: bzip2-devel >= 1.0.6 |
ebd750b5 | 31 | BuildRequires: cairo-devel >= 1.6 |
77369605 | 32 | BuildRequires: gcc-fortran |
443eef5d | 33 | BuildRequires: gettext-devel >= 0.14.5 |
ce7a2c69 | 34 | BuildRequires: lapack-devel >= 3.2.2-2 |
78c1da32 | 35 | BuildRequires: libicu-devel |
375593d6 | 36 | BuildRequires: libjpeg-devel >= 6b |
208dbe8e | 37 | BuildRequires: libpng-devel >= 1.2.7 |
375593d6 | 38 | BuildRequires: libstdc++-devel |
ce7a2c69 | 39 | BuildRequires: libtiff-devel |
208dbe8e | 40 | BuildRequires: libtool >= 2:2.0 |
009ff3c3 | 41 | BuildRequires: libxml2-devel >= 2.6.26 |
78c1da32 | 42 | BuildRequires: pango-devel |
208dbe8e | 43 | BuildRequires: pcre-devel >= 7.6 |
375593d6 | 44 | BuildRequires: perl-base >= 1:5.6 |
9ffb5072 | 45 | BuildRequires: pkgconfig |
375593d6 | 46 | BuildRequires: readline-devel |
202a926a | 47 | BuildRequires: rpm-perlprov |
561bbd91 JR |
48 | %if %{with tcl} |
49 | BuildRequires: tcl-devel >= 8.4 | |
50 | BuildRequires: tk-devel >= 8.4 | |
51 | %endif | |
92428ccd | 52 | %if %{with docs} |
a9ad1987 | 53 | BuildRequires: tetex-dvips |
0d60cf00 | 54 | BuildRequires: tetex-latex |
a9ad1987 | 55 | BuildRequires: tetex-pdftex |
208dbe8e | 56 | BuildRequires: texinfo-texi2dvi >= 4.7 |
92428ccd | 57 | %endif |
77369605 | 58 | BuildRequires: xorg-lib-libX11-devel |
c436f81d JB |
59 | BuildRequires: xorg-lib-libXmu-devel |
60 | BuildRequires: xorg-lib-libXt-devel | |
ebd750b5 | 61 | BuildRequires: xz-devel >= 4.999 |
a9ad1987 | 62 | BuildRequires: zip |
208dbe8e | 63 | BuildRequires: zlib-devel >= 1.2.3 |
8d9cfdde | 64 | #Requires: lpr |
21c0b273 | 65 | Requires(post): perl-base |
0d60cf00 | 66 | Requires(post): textutils |
ce7a2c69 | 67 | Requires: blas >= 3.2.2-2 |
7de9379c | 68 | Suggests: rkward |
20a1da1d | 69 | Obsoletes: R-base |
68b72621 | 70 | Obsoletes: R-contrib |
bf172ea0 | 71 | Obsoletes: R-recommended |
20a1da1d JR |
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. | |
b5fa3c87 | 84 | |
20a1da1d JR |
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. | |
b5fa3c87 | 90 | |
20a1da1d JR |
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. | |
b5fa3c87 | 94 | |
1eca4d7c | 95 | %package java-tools |
96 | Summary: R Java tools | |
ef6bf10c | 97 | Summary(pl.UTF-8): Narzędzia R w Javie |
92428ccd | 98 | Group: Development/Tools |
21250521 | 99 | Requires: %{name} = %{version}-%{release} |
60526098 | 100 | |
1eca4d7c | 101 | %description java-tools |
60526098 | 102 | R Java classes. |
103 | ||
ef6bf10c JB |
104 | %description java-tools -l pl.UTF-8 |
105 | Narzędzia R w Javie. | |
106 | ||
5c7326d9 | 107 | %prep |
92bb3b47 | 108 | %setup -q |
b5fa3c87 | 109 | |
5c7326d9 | 110 | %build |
259d0143 | 111 | %{__aclocal} -I m4 |
2028e949 | 112 | %{__autoconf} |
f7620b73 AM |
113 | install -d build |
114 | cd build | |
115 | ../%configure \ | |
6035063f JR |
116 | F77=gfortran \ |
117 | FC=gfortran \ | |
8d9cfdde | 118 | --enable-R-shlib \ |
35ad2379 | 119 | --enable-largefile \ |
ce7a2c69 | 120 | --with-ICU \ |
1c43aa59 | 121 | --with-blas \ |
78c1da32 | 122 | --with-cairo \ |
78c1da32 | 123 | --with-jpeglib \ |
ce7a2c69 JB |
124 | --with-lapack \ |
125 | --with-libpng \ | |
126 | --with-readline \ | |
127 | --with-recommended-packages \ | |
78c1da32 JR |
128 | --with-system-bzlib \ |
129 | --with-system-pcre \ | |
ce7a2c69 JB |
130 | --with-system-xz \ |
131 | --with-system-zlib \ | |
561bbd91 JR |
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 | |
ce7a2c69 | 139 | --with-x |
a9ad1987 | 140 | |
df806e24 | 141 | %{__make} -j1 |
f7620b73 | 142 | |
8d4651f6 | 143 | %if %{with tests} |
f4718f36 | 144 | %{__make} check |
8d4651f6 | 145 | %endif |
f7620b73 | 146 | |
92428ccd | 147 | %if %{with docs} |
7447edd2 | 148 | %{__make} docs pdf info |
92428ccd | 149 | %endif |
5c7326d9 | 150 | |
5c7326d9 | 151 | %install |
9a8695ea | 152 | rm -rf $RPM_BUILD_ROOT |
b5b84967 | 153 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}} |
4367b4de | 154 | |
f7620b73 | 155 | %{__make} -C build -j1 install \ |
8d4651f6 | 156 | DESTDIR=$RPM_BUILD_ROOT |
b54b52ee | 157 | |
8d9cfdde | 158 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
b5b84967 | 159 | install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} |
b54b52ee | 160 | |
c9191d01 | 161 | ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir} |
162 | ||
8d9cfdde | 163 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R |
e522fa9a | 164 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include |
165 | ||
84b2ee69 JB |
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 | ||
84b2ee69 JB |
175 | for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do |
176 | module=$(basename $moddir) | |
177 | echo "%dir %{_libdir}/R/library/${module}" | |
333306eb JB |
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 | |
98d66559 | 208 | done > R.files |
84b2ee69 | 209 | |
333306eb JB |
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} | |
333306eb | 214 | |
d6b5cd1f | 215 | %clean |
b54b52ee | 216 | rm -rf $RPM_BUILD_ROOT |
d6b5cd1f | 217 | |
ce7a2c69 JB |
218 | %post -p /sbin/ldconfig |
219 | %postun -p /sbin/ldconfig | |
d6b5cd1f | 220 | |
84b2ee69 | 221 | %files -f R.files |
8325eaaa | 222 | %defattr(644,root,root,755) |
252d4347 | 223 | %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS} |
b54b52ee | 224 | %attr(755,root,root) %{_bindir}/R |
77369605 | 225 | %attr(755,root,root) %{_bindir}/Rscript |
ce7a2c69 | 226 | %dir %{_libdir}/R |
0b891f68 JR |
227 | %dir %{_libdir}/R/lib |
228 | %attr(755,root,root) %{_libdir}/R/lib/libR.so | |
3996be5c | 229 | %attr(755,root,root) %{_libdir}/libR.so |
252d4347 JR |
230 | %{_libdir}/R/COPYING |
231 | %{_libdir}/R/NEWS | |
232 | %{_libdir}/R/SVN-REVISION | |
ce7a2c69 | 233 | %attr(755,root,root) %{_libdir}/R/bin |
92428ccd | 234 | %exclude %{_libdir}/R/bin/javareconf |
5d876725 | 235 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} |
b54b52ee | 236 | %dir %{_libdir}/R/doc |
237 | %{_libdir}/R/doc/[KRm]* | |
333306eb | 238 | %{_libdir}/R/doc/CRAN_mirrors.csv |
b54b52ee | 239 | %dir %{_libdir}/R/doc/html |
240 | %{_libdir}/R/doc/html/*.css | |
333306eb | 241 | %{_libdir}/R/doc/html/[NRSa-lr-u]*.html |
77369605 | 242 | %{_libdir}/R/doc/html/packages-head*.html |
333306eb | 243 | %{_libdir}/R/doc/html/favicon.ico |
b54b52ee | 244 | %{_libdir}/R/doc/html/*.jpg |
5d876725 | 245 | %ghost %{_libdir}/R/doc/html/packages.html |
ce7a2c69 JB |
246 | %{_libdir}/R/etc |
247 | %{_libdir}/R/include | |
248 | %dir %{_libdir}/R/library | |
84b2ee69 | 249 | # library files list is autogenerated (see R.files above) |
ce7a2c69 | 250 | %attr(755,root,root) %{_libdir}/R/modules |
72b3fb5c JB |
251 | %dir %{_libdir}/R/share |
252 | %{_libdir}/R/share/R | |
333306eb | 253 | %{_libdir}/R/share/dictionaries |
72b3fb5c | 254 | %{_libdir}/R/share/encodings |
72b3fb5c | 255 | %{_libdir}/R/share/licenses |
72b3fb5c JB |
256 | %{_libdir}/R/share/make |
257 | %{_libdir}/R/share/sh | |
258 | %{_libdir}/R/share/texmf | |
b5b84967 | 259 | %{_desktopdir}/R.desktop |
260 | %{_pixmapsdir}/R.xpm | |
ce7a2c69 JB |
261 | %{_includedir}/R |
262 | %{_pkgconfigdir}/libR.pc | |
263 | %{_mandir}/man1/R.1* | |
264 | %{_mandir}/man1/Rscript* | |
60526098 | 265 | |
1eca4d7c | 266 | %files java-tools |
60526098 | 267 | %defattr(644,root,root,755) |
92428ccd | 268 | %attr(755,root,root) %{_libdir}/R/bin/javareconf |
60526098 | 269 | %{_libdir}/R/share/java |