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