]> git.pld-linux.org Git - packages/R.git/blob - R.spec
- updated to 3.6.1
[packages/R.git] / R.spec
1 #
2 # Conditional build
3 %bcond_without  openmp  # OpenMP support
4 %bcond_without  tcl     # Tcl/Tk support
5 %bcond_without  tests   # do not run "make check"
6 %bcond_without  docs    # do not build documentation
7 #
8 # NOTE:
9 # - /etc/localtime must be present for tests to work
10 #
11 # TODO:
12 # - script for rpm to autoprovides/autorequires R internals
13 #
14 %include        /usr/lib/rpm/macros.perl
15 Summary:        A language for data analysis and graphics
16 Summary(pl.UTF-8):      Język do analizy danych oraz grafiki
17 Name:           R
18 Version:        3.6.1
19 Release:        1
20 License:        mixed (distributable), mostly GPL v2+
21 Group:          Development/Languages
22 # CRAN master site: ftp://cran.r-project.org/pub/R/src/
23 Source0:        ftp://stat.ethz.ch/R-CRAN/src/base/R-3/%{name}-%{version}.tar.gz
24 # Source0-md5:  f5003472d58a3d3765a1c537fdae71d5
25 Source1:        %{name}.desktop
26 Source2:        %{name}.xpm
27 URL:            http://www.r-project.org/
28 # yes, it is, or tests will fail
29 BuildRequires:  /etc/localtime
30 BuildRequires:  autoconf >= 2.69
31 BuildRequires:  automake
32 BuildRequires:  blas-devel >= 3.2.2-2
33 BuildRequires:  bzip2-devel >= 1.0.6
34 BuildRequires:  cairo-devel >= 1.6
35 BuildRequires:  curl-devel >= 7.28.0
36 BuildRequires:  gcc-fortran
37 BuildRequires:  gettext-tools >= 0.16.1
38 BuildRequires:  lapack-devel >= 3.2.2-2
39 %{?with_openmp:BuildRequires:   libgomp-devel}
40 BuildRequires:  libicu-devel
41 BuildRequires:  libjpeg-devel >= 6b
42 BuildRequires:  libpng-devel >= 1.2.7
43 BuildRequires:  libstdc++-devel
44 BuildRequires:  libtiff-devel
45 BuildRequires:  libtool >= 2:2.0
46 BuildRequires:  libxml2-devel >= 2.6.26
47 BuildRequires:  pango-devel
48 BuildRequires:  pcre-devel >= 8.32
49 # actually not used
50 #BuildRequires: pcre2-8-devel
51 BuildRequires:  perl-base >= 1:5.6
52 BuildRequires:  pkgconfig
53 BuildRequires:  readline-devel
54 BuildRequires:  rpm-perlprov
55 %if %{with tcl}
56 BuildRequires:  tcl-devel >= 8.4
57 BuildRequires:  tk-devel >= 8.4
58 %endif
59 BuildRequires:  tre-devel
60 %if %{with docs}
61 BuildRequires:  tetex-dvips
62 BuildRequires:  tetex-latex
63 BuildRequires:  tetex-pdftex
64 BuildRequires:  texinfo-texi2dvi >= 4.7
65 %endif
66 BuildRequires:  xorg-lib-libX11-devel
67 BuildRequires:  xorg-lib-libXmu-devel
68 BuildRequires:  xorg-lib-libXt-devel
69 BuildRequires:  xz-devel >= 5.0.3
70 BuildRequires:  zip
71 BuildRequires:  zlib-devel >= 1.2.3
72 #Requires:      lpr
73 Requires(post): perl-base
74 Requires(post): textutils
75 Requires:       blas >= 3.2.2-2
76 Requires:       bzip2 >= 1.0.6
77 Requires:       curl-libs >= 7.28.0
78 Requires:       pcre >= 8.32
79 Requires:       xz-libs >= 5.0.3
80 Requires:       zlib >= 1.2.3
81 Suggests:       rkward
82 Obsoletes:      R-base
83 Obsoletes:      R-contrib
84 Obsoletes:      R-recommended
85 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86
87 %description
88 A system for statistical computation and graphics. R consists of a
89 language plus a run-time environment with graphics, a debugger, access
90 to certain system functions, and the ability to run programs stored in
91 script files.
92
93 The design of R has been heavily influenced by two existing languages:
94 Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
95 resulting language is very similar in appearance to S, the underlying
96 implementation and semantics are derived from Scheme.
97
98 %description -l pl.UTF-8
99 System do obliczeń statystycznych i grafiki. R składa się z języka
100 oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do
101 niektórych funkcji systemowych oraz możliwością uruchamiania programów
102 zapisanych w skryptach.
103
104 Język R był zainspirowany dwoma istniejącymi językami: S (Beckera,
105 Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
106 implementacja i semantyka wywodzi się ze Scheme.
107
108 %package java-tools
109 Summary:        R Java tools
110 Summary(pl.UTF-8):      Narzędzia R w Javie
111 Group:          Development/Tools
112 Requires:       %{name} = %{version}-%{release}
113
114 %description java-tools
115 R Java classes.
116
117 %description java-tools -l pl.UTF-8
118 Narzędzia R w Javie.
119
120 %prep
121 %setup -q
122
123 %build
124 %{__aclocal} -I m4
125 %{__autoconf}
126 install -d build
127 cd build
128 ../%configure \
129         F77=gfortran \
130         FC=gfortran \
131         --enable-R-shlib \
132         --enable-largefile \
133         %{!?with_openmp:--disable-openmp} \
134         --with-internal-tzcode \
135         --with-ICU \
136         --with-blas \
137         --with-cairo \
138         --with-jpeglib \
139         --with-lapack \
140         --with-libpng \
141         --with-readline \
142         --with-recommended-packages \
143         --with-system-tre \
144 %if %{with tcl}
145         --with-tcltk \
146         --with-tcl-config=/usr/lib/tclConfig.sh \
147         --with-tk-config=/usr/lib/tkConfig.sh \
148 %else
149         --without-tcltk \
150 %endif
151         --with-x
152
153 %{__make} -j1
154
155 %if %{with tests}
156 %{__make} check
157 %endif
158
159 %if %{with docs}
160 %{__make} docs pdf info
161 %endif
162
163 %install
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
166
167 %{__make} -C build -j1 install \
168         DESTDIR=$RPM_BUILD_ROOT
169
170 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
171 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
172
173 ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
174
175 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
176 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
177
178 gen_lang() {
179         dir="$1"
180         for d in $RPM_BUILD_ROOT${dir}/* ; do
181                 bd=$(basename $d)
182                 lang="${bd%@*}"
183                 echo "%lang($lang) ${dir}/${bd}"
184         done
185 }
186
187 for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
188         module=$(basename $moddir)
189         echo "%dir %{_libdir}/R/library/${module}"
190         if [ "$module" = "translations" ]; then
191                 for f in $moddir/* ; do
192                         bf=$(basename $f)
193                         case "$bf" in
194                           DESCRIPTION|en|en@quot)
195                                 echo "%{_libdir}/R/library/${module}/${bf}"
196                                 ;;
197                           *)
198                                 echo "%lang(${bf}) %{_libdir}/R/library/${module}/${bf}"
199                                 ;;
200                         esac
201                 done
202         else
203                 for f in $moddir/* ; do
204                         bf=$(basename $f)
205                         case "$bf" in
206                           po)
207                                 echo "%dir %{_libdir}/R/library/${module}/po"
208                                 gen_lang %{_libdir}/R/library/${module}/po
209                                 ;;
210                           libs)
211                                 echo "%dir %{_libdir}/R/library/${module}/libs"
212                                 echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
213                                 ;;
214                           *)
215                                 echo "%{_libdir}/R/library/${module}/${bf}"
216                                 ;;
217                         esac
218                 done
219         fi
220 done > R.files
221
222 # just GPL
223 %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/COPYING
224 # packaged as %doc
225 %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS.rds,THANKS}
226 %if %{with docs}
227 # pdf version of NEWS
228 %{__rm} $RPM_BUILD_ROOT%{_libdir}/R/doc/NEWS.pdf
229 %endif
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %post   -p /sbin/ldconfig
235 %postun -p /sbin/ldconfig
236
237 %files -f R.files
238 %defattr(644,root,root,755)
239 %doc README doc/{AUTHORS,COPYRIGHTS,FAQ,NEWS,NEWS.[012],RESOURCES,THANKS}
240 %attr(755,root,root) %{_bindir}/R
241 %attr(755,root,root) %{_bindir}/Rscript
242 %dir %{_libdir}/R
243 %dir %{_libdir}/R/lib
244 %attr(755,root,root) %{_libdir}/R/lib/libR.so
245 %attr(755,root,root) %{_libdir}/libR.so
246 %{_libdir}/R/COPYING
247 %{_libdir}/R/SVN-REVISION
248 %attr(755,root,root) %{_libdir}/R/bin
249 %exclude %{_libdir}/R/bin/javareconf
250 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
251 %dir %{_libdir}/R/doc
252 %{_libdir}/R/doc/[KRm]*
253 %{_libdir}/R/doc/BioC_mirrors.csv
254 %{_libdir}/R/doc/CRAN_mirrors.csv
255 %{_libdir}/R/doc/NEWS*
256 %dir %{_libdir}/R/doc/html
257 %{_libdir}/R/doc/html/Rlogo.svg
258 %{_libdir}/R/doc/html/*.css
259 %{_libdir}/R/doc/html/[NRSa-lr-u]*.html
260 %{_libdir}/R/doc/html/packages-head*.html
261 %{_libdir}/R/doc/html/favicon.ico
262 %{_libdir}/R/doc/html/*.jpg
263 %ghost %{_libdir}/R/doc/html/packages.html
264 %{_libdir}/R/etc
265 %{_libdir}/R/include
266 %dir %{_libdir}/R/library
267 # library files list is autogenerated (see R.files above)
268 %attr(755,root,root) %{_libdir}/R/modules
269 %dir %{_libdir}/R/share
270 %{_libdir}/R/share/R
271 %{_libdir}/R/share/Rd
272 %{_libdir}/R/share/dictionaries
273 %{_libdir}/R/share/encodings
274 %{_libdir}/R/share/licenses
275 %{_libdir}/R/share/make
276 %{_libdir}/R/share/sh
277 %{_libdir}/R/share/texmf
278 %{_libdir}/R/share/zoneinfo
279 %{_desktopdir}/R.desktop
280 %{_pixmapsdir}/R.xpm
281 %{_includedir}/R
282 %{_pkgconfigdir}/libR.pc
283 %{_mandir}/man1/R.1*
284 %{_mandir}/man1/Rscript*
285
286 %files java-tools
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_libdir}/R/bin/javareconf
289 %{_libdir}/R/share/java
This page took 0.049342 seconds and 3 git commands to generate.