]>
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 |
355fb0e1 | 17 | Version: 2.15.1 |
4b82ebd0 | 18 | Release: 6 |
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/ |
8d9cfdde | 22 | Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz |
355fb0e1 | 23 | # Source0-md5: fcdf247e707fdade82b78bcf911a54f1 |
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 |
208dbe8e | 48 | %{?with_tcl:BuildRequires: tcl-devel >= 8.4} |
92428ccd | 49 | %if %{with docs} |
a9ad1987 | 50 | BuildRequires: tetex-dvips |
0d60cf00 | 51 | BuildRequires: tetex-latex |
a9ad1987 | 52 | BuildRequires: tetex-pdftex |
208dbe8e | 53 | BuildRequires: texinfo-texi2dvi >= 4.7 |
92428ccd | 54 | %endif |
208dbe8e | 55 | %{?with_tcl:BuildRequires: tk-devel >= 8.4} |
77369605 | 56 | BuildRequires: xorg-lib-libX11-devel |
c436f81d JB |
57 | BuildRequires: xorg-lib-libXmu-devel |
58 | BuildRequires: xorg-lib-libXt-devel | |
ebd750b5 | 59 | BuildRequires: xz-devel >= 4.999 |
a9ad1987 | 60 | BuildRequires: zip |
208dbe8e | 61 | BuildRequires: zlib-devel >= 1.2.3 |
8d9cfdde | 62 | #Requires: lpr |
21c0b273 | 63 | Requires(post): perl-base |
0d60cf00 | 64 | Requires(post): textutils |
ce7a2c69 | 65 | Requires: blas >= 3.2.2-2 |
7de9379c | 66 | Suggests: rkward |
20a1da1d | 67 | Obsoletes: R-base |
68b72621 | 68 | Obsoletes: R-contrib |
bf172ea0 | 69 | Obsoletes: R-recommended |
20a1da1d JR |
70 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
71 | ||
72 | %description | |
73 | A system for statistical computation and graphics. R consists of a | |
74 | language plus a run-time environment with graphics, a debugger, access | |
75 | to certain system functions, and the ability to run programs stored in | |
76 | script files. | |
77 | ||
78 | The design of R has been heavily influenced by two existing languages: | |
79 | Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the | |
80 | resulting language is very similar in appearance to S, the underlying | |
81 | implementation and semantics are derived from Scheme. | |
b5fa3c87 | 82 | |
20a1da1d JR |
83 | %description -l pl.UTF-8 |
84 | System do obliczeń statystycznych i grafiki. R składa się z języka | |
85 | oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do | |
86 | niektórych funkcji systemowych oraz możliwością uruchamiania programów | |
87 | zapisanych w skryptach. | |
b5fa3c87 | 88 | |
20a1da1d JR |
89 | Język R był zainspirowany dwoma istniejącymi językami: S (Beckera, |
90 | Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale | |
91 | implementacja i semantyka wywodzi się ze Scheme. | |
b5fa3c87 | 92 | |
1eca4d7c | 93 | %package java-tools |
94 | Summary: R Java tools | |
92428ccd | 95 | Group: Development/Tools |
21250521 | 96 | Requires: %{name} = %{version}-%{release} |
60526098 | 97 | |
1eca4d7c | 98 | %description java-tools |
60526098 | 99 | R Java classes. |
100 | ||
5c7326d9 | 101 | %prep |
92bb3b47 | 102 | %setup -q |
b5fa3c87 | 103 | |
5c7326d9 | 104 | %build |
259d0143 | 105 | %{__aclocal} -I m4 |
2028e949 | 106 | %{__autoconf} |
f7620b73 AM |
107 | install -d build |
108 | cd build | |
109 | ../%configure \ | |
6035063f JR |
110 | F77=gfortran \ |
111 | FC=gfortran \ | |
8d9cfdde | 112 | --enable-R-shlib \ |
35ad2379 | 113 | --enable-largefile \ |
ce7a2c69 | 114 | --with-ICU \ |
1c43aa59 | 115 | --with-blas \ |
78c1da32 | 116 | --with-cairo \ |
78c1da32 | 117 | --with-jpeglib \ |
ce7a2c69 JB |
118 | --with-lapack \ |
119 | --with-libpng \ | |
120 | --with-readline \ | |
121 | --with-recommended-packages \ | |
78c1da32 JR |
122 | --with-system-bzlib \ |
123 | --with-system-pcre \ | |
ce7a2c69 JB |
124 | --with-system-xz \ |
125 | --with-system-zlib \ | |
126 | --with%{!?with_tcl:out}-tcltk \ | |
127 | --with-x | |
a9ad1987 | 128 | |
df806e24 | 129 | %{__make} -j1 |
f7620b73 | 130 | |
8d4651f6 | 131 | %if %{with tests} |
f4718f36 | 132 | %{__make} check |
8d4651f6 | 133 | %endif |
f7620b73 | 134 | |
92428ccd | 135 | %if %{with docs} |
7447edd2 | 136 | %{__make} docs pdf info |
92428ccd | 137 | %endif |
5c7326d9 | 138 | |
5c7326d9 | 139 | %install |
9a8695ea | 140 | rm -rf $RPM_BUILD_ROOT |
b5b84967 | 141 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}} |
4367b4de | 142 | |
f7620b73 | 143 | %{__make} -C build -j1 install \ |
8d4651f6 | 144 | DESTDIR=$RPM_BUILD_ROOT |
b54b52ee | 145 | |
8d9cfdde | 146 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
b5b84967 | 147 | install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} |
b54b52ee | 148 | |
c9191d01 | 149 | ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir} |
150 | ||
8d9cfdde | 151 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R |
e522fa9a | 152 | ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include |
153 | ||
84b2ee69 JB |
154 | gen_lang() { |
155 | dir="$1" | |
156 | for d in $RPM_BUILD_ROOT${dir}/* ; do | |
157 | bd=$(basename $d) | |
158 | lang="${bd%@*}" | |
159 | echo "%lang($lang) ${dir}/${bd}" | |
160 | done | |
161 | } | |
162 | ||
163 | gen_lang %{_libdir}/R/share/locale > R.files | |
164 | for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do | |
165 | module=$(basename $moddir) | |
166 | echo "%dir %{_libdir}/R/library/${module}" | |
167 | for f in $moddir/* ; do | |
168 | bf=$(basename $f) | |
169 | case "$bf" in | |
170 | po) | |
171 | echo "%dir %{_libdir}/R/library/${module}/po" | |
172 | gen_lang %{_libdir}/R/library/${module}/po | |
173 | ;; | |
174 | libs) | |
175 | echo "%dir %{_libdir}/R/library/${module}/libs" | |
176 | echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so" | |
177 | ;; | |
178 | *) | |
179 | echo "%{_libdir}/R/library/${module}/${bf}" | |
180 | ;; | |
181 | esac | |
182 | done | |
183 | done >> R.files | |
184 | ||
d6b5cd1f | 185 | %clean |
b54b52ee | 186 | rm -rf $RPM_BUILD_ROOT |
d6b5cd1f | 187 | |
ce7a2c69 JB |
188 | %post -p /sbin/ldconfig |
189 | %postun -p /sbin/ldconfig | |
d6b5cd1f | 190 | |
84b2ee69 | 191 | %files -f R.files |
8325eaaa | 192 | %defattr(644,root,root,755) |
252d4347 | 193 | %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS} |
b54b52ee | 194 | %attr(755,root,root) %{_bindir}/R |
77369605 | 195 | %attr(755,root,root) %{_bindir}/Rscript |
ce7a2c69 | 196 | %dir %{_libdir}/R |
0b891f68 JR |
197 | %dir %{_libdir}/R/lib |
198 | %attr(755,root,root) %{_libdir}/R/lib/libR.so | |
3996be5c | 199 | %attr(755,root,root) %{_libdir}/libR.so |
252d4347 JR |
200 | %{_libdir}/R/COPYING |
201 | %{_libdir}/R/NEWS | |
202 | %{_libdir}/R/SVN-REVISION | |
ce7a2c69 | 203 | %attr(755,root,root) %{_libdir}/R/bin |
92428ccd | 204 | %exclude %{_libdir}/R/bin/javareconf |
5d876725 | 205 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} |
b54b52ee | 206 | %dir %{_libdir}/R/doc |
207 | %{_libdir}/R/doc/[KRm]* | |
208 | %dir %{_libdir}/R/doc/html | |
209 | %{_libdir}/R/doc/html/*.css | |
5d876725 | 210 | %{_libdir}/R/doc/html/[Ra-lr-u]*.html |
77369605 | 211 | %{_libdir}/R/doc/html/packages-head*.html |
b54b52ee | 212 | %{_libdir}/R/doc/html/*.jpg |
5d876725 | 213 | %ghost %{_libdir}/R/doc/html/packages.html |
ce7a2c69 JB |
214 | %{_libdir}/R/etc |
215 | %{_libdir}/R/include | |
216 | %dir %{_libdir}/R/library | |
84b2ee69 | 217 | # library files list is autogenerated (see R.files above) |
ce7a2c69 | 218 | %attr(755,root,root) %{_libdir}/R/modules |
72b3fb5c JB |
219 | %dir %{_libdir}/R/share |
220 | %{_libdir}/R/share/R | |
221 | %{_libdir}/R/share/encodings | |
72b3fb5c JB |
222 | %{_libdir}/R/share/licenses |
223 | %dir %{_libdir}/R/share/locale | |
84b2ee69 | 224 | # locale files list is autogenerated (see R.files above) |
72b3fb5c JB |
225 | %{_libdir}/R/share/make |
226 | %{_libdir}/R/share/sh | |
227 | %{_libdir}/R/share/texmf | |
b5b84967 | 228 | %{_desktopdir}/R.desktop |
229 | %{_pixmapsdir}/R.xpm | |
ce7a2c69 JB |
230 | %{_includedir}/R |
231 | %{_pkgconfigdir}/libR.pc | |
232 | %{_mandir}/man1/R.1* | |
233 | %{_mandir}/man1/Rscript* | |
60526098 | 234 | |
1eca4d7c | 235 | %files java-tools |
60526098 | 236 | %defattr(644,root,root,755) |
92428ccd | 237 | %attr(755,root,root) %{_libdir}/R/bin/javareconf |
60526098 | 238 | %{_libdir}/R/share/java |