]> git.pld-linux.org Git - packages/R.git/blob - R.spec
- pl for -java-tools
[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:        2.15.2
18 Release:        1
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-2/%{name}-%{version}.tar.gz
23 # Source0-md5:  346d16bab26fcae15e53755be8a69b00
24 Source1:        %{name}.desktop
25 Source2:        %{name}.xpm
26 URL:            http://www.r-project.org/
27 BuildRequires:  autoconf >= 2.62
28 BuildRequires:  automake
29 BuildRequires:  blas-devel >= 3.2.2-2
30 BuildRequires:  bzip2-devel >= 1.0.6
31 BuildRequires:  cairo-devel >= 1.6
32 BuildRequires:  gcc-fortran
33 BuildRequires:  gettext-devel >= 0.14.5
34 BuildRequires:  lapack-devel >= 3.2.2-2
35 BuildRequires:  libicu-devel
36 BuildRequires:  libjpeg-devel >= 6b
37 BuildRequires:  libpng-devel >= 1.2.7
38 BuildRequires:  libstdc++-devel
39 BuildRequires:  libtiff-devel
40 BuildRequires:  libtool >= 2:2.0
41 BuildRequires:  libxml2-devel >= 2.6.26
42 BuildRequires:  pango-devel
43 BuildRequires:  pcre-devel >= 7.6
44 BuildRequires:  perl-base >= 1:5.6
45 BuildRequires:  pkgconfig
46 BuildRequires:  readline-devel
47 BuildRequires:  rpm-perlprov
48 %if %{with tcl}
49 BuildRequires:  tcl-devel >= 8.4
50 BuildRequires:  tk-devel >= 8.4
51 %endif
52 %if %{with docs}
53 BuildRequires:  tetex-dvips
54 BuildRequires:  tetex-latex
55 BuildRequires:  tetex-pdftex
56 BuildRequires:  texinfo-texi2dvi >= 4.7
57 %endif
58 BuildRequires:  xorg-lib-libX11-devel
59 BuildRequires:  xorg-lib-libXmu-devel
60 BuildRequires:  xorg-lib-libXt-devel
61 BuildRequires:  xz-devel >= 4.999
62 BuildRequires:  zip
63 BuildRequires:  zlib-devel >= 1.2.3
64 #Requires:      lpr
65 Requires(post): perl-base
66 Requires(post): textutils
67 Requires:       blas >= 3.2.2-2
68 Suggests:       rkward
69 Obsoletes:      R-base
70 Obsoletes:      R-contrib
71 Obsoletes:      R-recommended
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 %description
75 A system for statistical computation and graphics. R consists of a
76 language plus a run-time environment with graphics, a debugger, access
77 to certain system functions, and the ability to run programs stored in
78 script files.
79
80 The design of R has been heavily influenced by two existing languages:
81 Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
82 resulting language is very similar in appearance to S, the underlying
83 implementation and semantics are derived from Scheme.
84
85 %description -l pl.UTF-8
86 System do obliczeń statystycznych i grafiki. R składa się z języka
87 oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do
88 niektórych funkcji systemowych oraz możliwością uruchamiania programów
89 zapisanych w skryptach.
90
91 Język R był zainspirowany dwoma istniejącymi językami: S (Beckera,
92 Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
93 implementacja i semantyka wywodzi się ze Scheme.
94
95 %package java-tools
96 Summary:        R Java tools
97 Summary(pl.UTF-8):      Narzędzia R w Javie
98 Group:          Development/Tools
99 Requires:       %{name} = %{version}-%{release}
100
101 %description java-tools
102 R Java classes.
103
104 %description java-tools -l pl.UTF-8
105 Narzędzia R w Javie.
106
107 %prep
108 %setup -q
109
110 %build
111 %{__aclocal} -I m4
112 %{__autoconf}
113 install -d build
114 cd build
115 ../%configure \
116         F77=gfortran \
117         FC=gfortran \
118         --enable-R-shlib \
119         --enable-largefile \
120         --with-ICU \
121         --with-blas \
122         --with-cairo \
123         --with-jpeglib \
124         --with-lapack \
125         --with-libpng \
126         --with-readline \
127         --with-recommended-packages \
128         --with-system-bzlib \
129         --with-system-pcre \
130         --with-system-xz \
131         --with-system-zlib \
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
139         --with-x
140
141 %{__make} -j1
142
143 %if %{with tests}
144 %{__make} check
145 %endif
146
147 %if %{with docs}
148 %{__make} docs pdf info
149 %endif
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
154
155 %{__make} -C build -j1 install \
156         DESTDIR=$RPM_BUILD_ROOT
157
158 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
159 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
160
161 ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
162
163 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
164 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
165
166 gen_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
175 gen_lang %{_libdir}/R/share/locale > R.files
176 for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
177         module=$(basename $moddir)
178         echo "%dir %{_libdir}/R/library/${module}"
179         for f in $moddir/* ; do
180                 bf=$(basename $f)
181                 case "$bf" in
182                   po)
183                         echo "%dir %{_libdir}/R/library/${module}/po"
184                         gen_lang %{_libdir}/R/library/${module}/po
185                         ;;
186                   libs)
187                         echo "%dir %{_libdir}/R/library/${module}/libs"
188                         echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
189                         ;;
190                   *)
191                         echo "%{_libdir}/R/library/${module}/${bf}"
192                         ;;
193                 esac
194         done
195 done >> R.files
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post   -p /sbin/ldconfig
201 %postun -p /sbin/ldconfig
202
203 %files -f R.files
204 %defattr(644,root,root,755)
205 %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
206 %attr(755,root,root) %{_bindir}/R
207 %attr(755,root,root) %{_bindir}/Rscript
208 %dir %{_libdir}/R
209 %dir %{_libdir}/R/lib
210 %attr(755,root,root) %{_libdir}/R/lib/libR.so
211 %attr(755,root,root) %{_libdir}/libR.so
212 %{_libdir}/R/COPYING
213 %{_libdir}/R/NEWS
214 %{_libdir}/R/SVN-REVISION
215 %attr(755,root,root) %{_libdir}/R/bin
216 %exclude %{_libdir}/R/bin/javareconf
217 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
218 %dir %{_libdir}/R/doc
219 %{_libdir}/R/doc/[KRm]*
220 %dir %{_libdir}/R/doc/html
221 %{_libdir}/R/doc/html/*.css
222 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
223 %{_libdir}/R/doc/html/packages-head*.html
224 %{_libdir}/R/doc/html/*.jpg
225 %ghost %{_libdir}/R/doc/html/packages.html
226 %{_libdir}/R/etc
227 %{_libdir}/R/include
228 %dir %{_libdir}/R/library
229 # library files list is autogenerated (see R.files above)
230 %attr(755,root,root) %{_libdir}/R/modules
231 %dir %{_libdir}/R/share
232 %{_libdir}/R/share/R
233 %{_libdir}/R/share/encodings
234 %{_libdir}/R/share/licenses
235 %dir %{_libdir}/R/share/locale
236 # locale files list is autogenerated (see R.files above)
237 %{_libdir}/R/share/make
238 %{_libdir}/R/share/sh
239 %{_libdir}/R/share/texmf
240 %{_desktopdir}/R.desktop
241 %{_pixmapsdir}/R.xpm
242 %{_includedir}/R
243 %{_pkgconfigdir}/libR.pc
244 %{_mandir}/man1/R.1*
245 %{_mandir}/man1/Rscript*
246
247 %files java-tools
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/R/bin/javareconf
250 %{_libdir}/R/share/java
This page took 0.060268 seconds and 3 git commands to generate.