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