]>
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 |
ea85d5cb | 17 | Version: 2.15.2 |
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/ |
8d9cfdde | 22 | Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz |
ea85d5cb | 23 | # Source0-md5: 346d16bab26fcae15e53755be8a69b00 |
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 | ||
175 | gen_lang %{_libdir}/R/share/locale > R.files | |
176 | for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do | |
177 | module=$(basename $moddir) | |
178 | echo "%dir %{_libdir}/R/library/${module}" | |
179 | for f in $moddir/* ; do | |
180 | bf=$(basename $f) | |
181 | case "$bf" in | |
182 | po) | |
183 | echo "%dir %{_libdir}/R/library/${module}/po" | |
184 | gen_lang %{_libdir}/R/library/${module}/po | |
185 | ;; | |
186 | libs) | |
187 | echo "%dir %{_libdir}/R/library/${module}/libs" | |
188 | echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so" | |
189 | ;; | |
190 | *) | |
191 | echo "%{_libdir}/R/library/${module}/${bf}" | |
192 | ;; | |
193 | esac | |
194 | done | |
195 | done >> R.files | |
196 | ||
d6b5cd1f | 197 | %clean |
b54b52ee | 198 | rm -rf $RPM_BUILD_ROOT |
d6b5cd1f | 199 | |
ce7a2c69 JB |
200 | %post -p /sbin/ldconfig |
201 | %postun -p /sbin/ldconfig | |
d6b5cd1f | 202 | |
84b2ee69 | 203 | %files -f R.files |
8325eaaa | 204 | %defattr(644,root,root,755) |
252d4347 | 205 | %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS} |
b54b52ee | 206 | %attr(755,root,root) %{_bindir}/R |
77369605 | 207 | %attr(755,root,root) %{_bindir}/Rscript |
ce7a2c69 | 208 | %dir %{_libdir}/R |
0b891f68 JR |
209 | %dir %{_libdir}/R/lib |
210 | %attr(755,root,root) %{_libdir}/R/lib/libR.so | |
3996be5c | 211 | %attr(755,root,root) %{_libdir}/libR.so |
252d4347 JR |
212 | %{_libdir}/R/COPYING |
213 | %{_libdir}/R/NEWS | |
214 | %{_libdir}/R/SVN-REVISION | |
ce7a2c69 | 215 | %attr(755,root,root) %{_libdir}/R/bin |
92428ccd | 216 | %exclude %{_libdir}/R/bin/javareconf |
5d876725 | 217 | # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt} |
b54b52ee | 218 | %dir %{_libdir}/R/doc |
219 | %{_libdir}/R/doc/[KRm]* | |
220 | %dir %{_libdir}/R/doc/html | |
221 | %{_libdir}/R/doc/html/*.css | |
5d876725 | 222 | %{_libdir}/R/doc/html/[Ra-lr-u]*.html |
77369605 | 223 | %{_libdir}/R/doc/html/packages-head*.html |
b54b52ee | 224 | %{_libdir}/R/doc/html/*.jpg |
5d876725 | 225 | %ghost %{_libdir}/R/doc/html/packages.html |
ce7a2c69 JB |
226 | %{_libdir}/R/etc |
227 | %{_libdir}/R/include | |
228 | %dir %{_libdir}/R/library | |
84b2ee69 | 229 | # library files list is autogenerated (see R.files above) |
ce7a2c69 | 230 | %attr(755,root,root) %{_libdir}/R/modules |
72b3fb5c JB |
231 | %dir %{_libdir}/R/share |
232 | %{_libdir}/R/share/R | |
233 | %{_libdir}/R/share/encodings | |
72b3fb5c JB |
234 | %{_libdir}/R/share/licenses |
235 | %dir %{_libdir}/R/share/locale | |
84b2ee69 | 236 | # locale files list is autogenerated (see R.files above) |
72b3fb5c JB |
237 | %{_libdir}/R/share/make |
238 | %{_libdir}/R/share/sh | |
239 | %{_libdir}/R/share/texmf | |
b5b84967 | 240 | %{_desktopdir}/R.desktop |
241 | %{_pixmapsdir}/R.xpm | |
ce7a2c69 JB |
242 | %{_includedir}/R |
243 | %{_pkgconfigdir}/libR.pc | |
244 | %{_mandir}/man1/R.1* | |
245 | %{_mandir}/man1/Rscript* | |
60526098 | 246 | |
1eca4d7c | 247 | %files java-tools |
60526098 | 248 | %defattr(644,root,root,755) |
92428ccd | 249 | %attr(755,root,root) %{_libdir}/R/bin/javareconf |
60526098 | 250 | %{_libdir}/R/share/java |