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