]> git.pld-linux.org Git - packages/R.git/blame - R.spec
- ver. 2.5.2
[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
92428ccd 97Group: Development/Tools
21250521 98Requires: %{name} = %{version}-%{release}
60526098 99
1eca4d7c 100%description java-tools
60526098 101R Java classes.
102
5c7326d9 103%prep
92bb3b47 104%setup -q
b5fa3c87 105
5c7326d9 106%build
259d0143 107%{__aclocal} -I m4
2028e949 108%{__autoconf}
f7620b73
AM
109install -d build
110cd build
111../%configure \
6035063f
JR
112 F77=gfortran \
113 FC=gfortran \
8d9cfdde 114 --enable-R-shlib \
35ad2379 115 --enable-largefile \
ce7a2c69 116 --with-ICU \
1c43aa59 117 --with-blas \
78c1da32 118 --with-cairo \
78c1da32 119 --with-jpeglib \
ce7a2c69
JB
120 --with-lapack \
121 --with-libpng \
122 --with-readline \
123 --with-recommended-packages \
78c1da32
JR
124 --with-system-bzlib \
125 --with-system-pcre \
ce7a2c69
JB
126 --with-system-xz \
127 --with-system-zlib \
561bbd91
JR
128%if %{with tcl}
129 --with-tcltk \
130 --with-tcl-config=/usr/lib/tclConfig.sh \
131 --with-tk-config=/usr/lib/tkConfig.sh \
132%else
133 --without-tcltk \
134%endif
ce7a2c69 135 --with-x
a9ad1987 136
df806e24 137%{__make} -j1
f7620b73 138
8d4651f6 139%if %{with tests}
f4718f36 140%{__make} check
8d4651f6 141%endif
f7620b73 142
92428ccd 143%if %{with docs}
7447edd2 144%{__make} docs pdf info
92428ccd 145%endif
5c7326d9 146
5c7326d9 147%install
9a8695ea 148rm -rf $RPM_BUILD_ROOT
b5b84967 149install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
4367b4de 150
f7620b73 151%{__make} -C build -j1 install \
8d4651f6 152 DESTDIR=$RPM_BUILD_ROOT
b54b52ee 153
8d9cfdde 154install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
b5b84967 155install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
b54b52ee 156
c9191d01 157ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
158
8d9cfdde 159mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
e522fa9a 160ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
161
84b2ee69
JB
162gen_lang() {
163 dir="$1"
164 for d in $RPM_BUILD_ROOT${dir}/* ; do
165 bd=$(basename $d)
166 lang="${bd%@*}"
167 echo "%lang($lang) ${dir}/${bd}"
168 done
169}
170
171gen_lang %{_libdir}/R/share/locale > R.files
172for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
173 module=$(basename $moddir)
174 echo "%dir %{_libdir}/R/library/${module}"
175 for f in $moddir/* ; do
176 bf=$(basename $f)
177 case "$bf" in
178 po)
179 echo "%dir %{_libdir}/R/library/${module}/po"
180 gen_lang %{_libdir}/R/library/${module}/po
181 ;;
182 libs)
183 echo "%dir %{_libdir}/R/library/${module}/libs"
184 echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
185 ;;
186 *)
187 echo "%{_libdir}/R/library/${module}/${bf}"
188 ;;
189 esac
190 done
191done >> R.files
192
d6b5cd1f 193%clean
b54b52ee 194rm -rf $RPM_BUILD_ROOT
d6b5cd1f 195
ce7a2c69
JB
196%post -p /sbin/ldconfig
197%postun -p /sbin/ldconfig
d6b5cd1f 198
84b2ee69 199%files -f R.files
8325eaaa 200%defattr(644,root,root,755)
252d4347 201%doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
b54b52ee 202%attr(755,root,root) %{_bindir}/R
77369605 203%attr(755,root,root) %{_bindir}/Rscript
ce7a2c69 204%dir %{_libdir}/R
0b891f68
JR
205%dir %{_libdir}/R/lib
206%attr(755,root,root) %{_libdir}/R/lib/libR.so
3996be5c 207%attr(755,root,root) %{_libdir}/libR.so
252d4347
JR
208%{_libdir}/R/COPYING
209%{_libdir}/R/NEWS
210%{_libdir}/R/SVN-REVISION
ce7a2c69 211%attr(755,root,root) %{_libdir}/R/bin
92428ccd 212%exclude %{_libdir}/R/bin/javareconf
5d876725 213# %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
b54b52ee 214%dir %{_libdir}/R/doc
215%{_libdir}/R/doc/[KRm]*
216%dir %{_libdir}/R/doc/html
217%{_libdir}/R/doc/html/*.css
5d876725 218%{_libdir}/R/doc/html/[Ra-lr-u]*.html
77369605 219%{_libdir}/R/doc/html/packages-head*.html
b54b52ee 220%{_libdir}/R/doc/html/*.jpg
5d876725 221%ghost %{_libdir}/R/doc/html/packages.html
ce7a2c69
JB
222%{_libdir}/R/etc
223%{_libdir}/R/include
224%dir %{_libdir}/R/library
84b2ee69 225# library files list is autogenerated (see R.files above)
ce7a2c69 226%attr(755,root,root) %{_libdir}/R/modules
72b3fb5c
JB
227%dir %{_libdir}/R/share
228%{_libdir}/R/share/R
229%{_libdir}/R/share/encodings
72b3fb5c
JB
230%{_libdir}/R/share/licenses
231%dir %{_libdir}/R/share/locale
84b2ee69 232# locale files list is autogenerated (see R.files above)
72b3fb5c
JB
233%{_libdir}/R/share/make
234%{_libdir}/R/share/sh
235%{_libdir}/R/share/texmf
b5b84967 236%{_desktopdir}/R.desktop
237%{_pixmapsdir}/R.xpm
ce7a2c69
JB
238%{_includedir}/R
239%{_pkgconfigdir}/libR.pc
240%{_mandir}/man1/R.1*
241%{_mandir}/man1/Rscript*
60526098 242
1eca4d7c 243%files java-tools
60526098 244%defattr(644,root,root,755)
92428ccd 245%attr(755,root,root) %{_libdir}/R/bin/javareconf
60526098 246%{_libdir}/R/share/java
This page took 0.106224 seconds and 4 git commands to generate.