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