]> git.pld-linux.org Git - packages/R.git/blame - R.spec
- pl for -java-tools
[packages/R.git] / R.spec
CommitLineData
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 14Summary: A language for data analysis and graphics
1645531f 15Summary(pl.UTF-8): Język do analizy danych oraz grafiki
8325eaaa 16Name: R
ea85d5cb 17Version: 2.15.2
18Release: 1
ebd750b5 19License: Mixed (distributable), mostly GPL v2+
92bb3b47 20Group: Development/Languages
296ba991 21# CRAN master site: ftp://cran.r-project.org/pub/R/src/
8d9cfdde 22Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz
ea85d5cb 23# Source0-md5: 346d16bab26fcae15e53755be8a69b00
8d9cfdde 24Source1: %{name}.desktop
b5b84967 25Source2: %{name}.xpm
296ba991 26URL: http://www.r-project.org/
208dbe8e 27BuildRequires: autoconf >= 2.62
63c19514 28BuildRequires: automake
ce7a2c69 29BuildRequires: blas-devel >= 3.2.2-2
208dbe8e 30BuildRequires: bzip2-devel >= 1.0.6
ebd750b5 31BuildRequires: cairo-devel >= 1.6
77369605 32BuildRequires: gcc-fortran
443eef5d 33BuildRequires: gettext-devel >= 0.14.5
ce7a2c69 34BuildRequires: lapack-devel >= 3.2.2-2
78c1da32 35BuildRequires: libicu-devel
375593d6 36BuildRequires: libjpeg-devel >= 6b
208dbe8e 37BuildRequires: libpng-devel >= 1.2.7
375593d6 38BuildRequires: libstdc++-devel
ce7a2c69 39BuildRequires: libtiff-devel
208dbe8e 40BuildRequires: libtool >= 2:2.0
009ff3c3 41BuildRequires: libxml2-devel >= 2.6.26
78c1da32 42BuildRequires: pango-devel
208dbe8e 43BuildRequires: pcre-devel >= 7.6
375593d6 44BuildRequires: perl-base >= 1:5.6
9ffb5072 45BuildRequires: pkgconfig
375593d6 46BuildRequires: readline-devel
202a926a 47BuildRequires: rpm-perlprov
561bbd91
JR
48%if %{with tcl}
49BuildRequires: tcl-devel >= 8.4
50BuildRequires: tk-devel >= 8.4
51%endif
92428ccd 52%if %{with docs}
a9ad1987 53BuildRequires: tetex-dvips
0d60cf00 54BuildRequires: tetex-latex
a9ad1987 55BuildRequires: tetex-pdftex
208dbe8e 56BuildRequires: texinfo-texi2dvi >= 4.7
92428ccd 57%endif
77369605 58BuildRequires: xorg-lib-libX11-devel
c436f81d
JB
59BuildRequires: xorg-lib-libXmu-devel
60BuildRequires: xorg-lib-libXt-devel
ebd750b5 61BuildRequires: xz-devel >= 4.999
a9ad1987 62BuildRequires: zip
208dbe8e 63BuildRequires: zlib-devel >= 1.2.3
8d9cfdde 64#Requires: lpr
21c0b273 65Requires(post): perl-base
0d60cf00 66Requires(post): textutils
ce7a2c69 67Requires: blas >= 3.2.2-2
7de9379c 68Suggests: rkward
20a1da1d 69Obsoletes: R-base
68b72621 70Obsoletes: R-contrib
bf172ea0 71Obsoletes: R-recommended
20a1da1d
JR
72BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74%description
75A system for statistical computation and graphics. R consists of a
76language plus a run-time environment with graphics, a debugger, access
77to certain system functions, and the ability to run programs stored in
78script files.
79
80The design of R has been heavily influenced by two existing languages:
81Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
82resulting language is very similar in appearance to S, the underlying
83implementation and semantics are derived from Scheme.
b5fa3c87 84
20a1da1d
JR
85%description -l pl.UTF-8
86System do obliczeń statystycznych i grafiki. R składa się z języka
87oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do
88niektórych funkcji systemowych oraz możliwością uruchamiania programów
89zapisanych w skryptach.
b5fa3c87 90
20a1da1d
JR
91Język R był zainspirowany dwoma istniejącymi językami: S (Beckera,
92Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
93implementacja i semantyka wywodzi się ze Scheme.
b5fa3c87 94
1eca4d7c 95%package java-tools
96Summary: R Java tools
ef6bf10c 97Summary(pl.UTF-8): Narzędzia R w Javie
92428ccd 98Group: Development/Tools
21250521 99Requires: %{name} = %{version}-%{release}
60526098 100
1eca4d7c 101%description java-tools
60526098 102R Java classes.
103
ef6bf10c
JB
104%description java-tools -l pl.UTF-8
105Narzę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
113install -d build
114cd 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 152rm -rf $RPM_BUILD_ROOT
b5b84967 153install -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 158install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
b5b84967 159install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
b54b52ee 160
c9191d01 161ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
162
8d9cfdde 163mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
e522fa9a 164ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
165
84b2ee69
JB
166gen_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
175gen_lang %{_libdir}/R/share/locale > R.files
176for 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
195done >> R.files
196
d6b5cd1f 197%clean
b54b52ee 198rm -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
This page took 0.246746 seconds and 4 git commands to generate.