]> git.pld-linux.org Git - packages/R.git/blame - R.spec
- updated to 3.1.0
[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
73db9bb9
JB
17Version: 3.1.0
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/
98d66559 22Source0: ftp://stat.ethz.ch/R-CRAN/src/base/R-3/%{name}-%{version}.tar.gz
73db9bb9 23# Source0-md5: a1ee52446bee81820409661e6d114ab1
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
84b2ee69
JB
175for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
176 module=$(basename $moddir)
177 echo "%dir %{_libdir}/R/library/${module}"
333306eb
JB
178 if [ "$module" = "translations" ]; then
179 for f in $moddir/* ; do
180 bf=$(basename $f)
181 case "$bf" in
182 DESCRIPTION|en|en@quot)
183 echo "%{_libdir}/R/library/${module}/${bf}"
184 ;;
185 *)
186 echo "%lang(${bf}) %{_libdir}/R/library/${module}/${bf}"
187 ;;
188 esac
189 done
190 else
191 for f in $moddir/* ; do
192 bf=$(basename $f)
193 case "$bf" in
194 po)
195 echo "%dir %{_libdir}/R/library/${module}/po"
196 gen_lang %{_libdir}/R/library/${module}/po
197 ;;
198 libs)
199 echo "%dir %{_libdir}/R/library/${module}/libs"
200 echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
201 ;;
202 *)
203 echo "%{_libdir}/R/library/${module}/${bf}"
204 ;;
205 esac
206 done
207 fi
98d66559 208done > R.files
84b2ee69 209
333306eb
JB
210# just GPL
211%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/COPYING
212# packaged as %doc
213%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS.rds,THANKS}
a7b0ffa6
JB
214%if %{with docs}
215# pdf version of NEWS
73db9bb9 216%{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/NEWS.pdf
a7b0ffa6 217%endif
333306eb 218
d6b5cd1f 219%clean
b54b52ee 220rm -rf $RPM_BUILD_ROOT
d6b5cd1f 221
ce7a2c69
JB
222%post -p /sbin/ldconfig
223%postun -p /sbin/ldconfig
d6b5cd1f 224
84b2ee69 225%files -f R.files
8325eaaa 226%defattr(644,root,root,755)
73db9bb9 227%doc README doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS,NEWS.[012],RESOURCES,THANKS}
b54b52ee 228%attr(755,root,root) %{_bindir}/R
77369605 229%attr(755,root,root) %{_bindir}/Rscript
ce7a2c69 230%dir %{_libdir}/R
0b891f68
JR
231%dir %{_libdir}/R/lib
232%attr(755,root,root) %{_libdir}/R/lib/libR.so
3996be5c 233%attr(755,root,root) %{_libdir}/libR.so
252d4347 234%{_libdir}/R/COPYING
252d4347 235%{_libdir}/R/SVN-REVISION
ce7a2c69 236%attr(755,root,root) %{_libdir}/R/bin
92428ccd 237%exclude %{_libdir}/R/bin/javareconf
5d876725 238# %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
b54b52ee 239%dir %{_libdir}/R/doc
240%{_libdir}/R/doc/[KRm]*
333306eb 241%{_libdir}/R/doc/CRAN_mirrors.csv
73db9bb9 242%{_libdir}/R/doc/NEWS*
b54b52ee 243%dir %{_libdir}/R/doc/html
244%{_libdir}/R/doc/html/*.css
333306eb 245%{_libdir}/R/doc/html/[NRSa-lr-u]*.html
77369605 246%{_libdir}/R/doc/html/packages-head*.html
333306eb 247%{_libdir}/R/doc/html/favicon.ico
b54b52ee 248%{_libdir}/R/doc/html/*.jpg
5d876725 249%ghost %{_libdir}/R/doc/html/packages.html
ce7a2c69
JB
250%{_libdir}/R/etc
251%{_libdir}/R/include
252%dir %{_libdir}/R/library
84b2ee69 253# library files list is autogenerated (see R.files above)
ce7a2c69 254%attr(755,root,root) %{_libdir}/R/modules
72b3fb5c
JB
255%dir %{_libdir}/R/share
256%{_libdir}/R/share/R
333306eb 257%{_libdir}/R/share/dictionaries
72b3fb5c 258%{_libdir}/R/share/encodings
72b3fb5c 259%{_libdir}/R/share/licenses
72b3fb5c
JB
260%{_libdir}/R/share/make
261%{_libdir}/R/share/sh
262%{_libdir}/R/share/texmf
b5b84967 263%{_desktopdir}/R.desktop
264%{_pixmapsdir}/R.xpm
ce7a2c69
JB
265%{_includedir}/R
266%{_pkgconfigdir}/libR.pc
267%{_mandir}/man1/R.1*
268%{_mandir}/man1/Rscript*
60526098 269
1eca4d7c 270%files java-tools
60526098 271%defattr(644,root,root,755)
92428ccd 272%attr(755,root,root) %{_libdir}/R/bin/javareconf
60526098 273%{_libdir}/R/share/java
This page took 0.095521 seconds and 4 git commands to generate.