]> git.pld-linux.org Git - packages/R.git/blob - R.spec
- ver. 2.5.2
[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 Group:          Development/Tools
98 Requires:       %{name} = %{version}-%{release}
99
100 %description java-tools
101 R Java classes.
102
103 %prep
104 %setup -q
105
106 %build
107 %{__aclocal} -I m4
108 %{__autoconf}
109 install -d build
110 cd build
111 ../%configure \
112         F77=gfortran \
113         FC=gfortran \
114         --enable-R-shlib \
115         --enable-largefile \
116         --with-ICU \
117         --with-blas \
118         --with-cairo \
119         --with-jpeglib \
120         --with-lapack \
121         --with-libpng \
122         --with-readline \
123         --with-recommended-packages \
124         --with-system-bzlib \
125         --with-system-pcre \
126         --with-system-xz \
127         --with-system-zlib \
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
135         --with-x
136
137 %{__make} -j1
138
139 %if %{with tests}
140 %{__make} check
141 %endif
142
143 %if %{with docs}
144 %{__make} docs pdf info
145 %endif
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
150
151 %{__make} -C build -j1 install \
152         DESTDIR=$RPM_BUILD_ROOT
153
154 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
155 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
156
157 ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
158
159 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
160 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
161
162 gen_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
171 gen_lang %{_libdir}/R/share/locale > R.files
172 for 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
191 done >> R.files
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %post   -p /sbin/ldconfig
197 %postun -p /sbin/ldconfig
198
199 %files -f R.files
200 %defattr(644,root,root,755)
201 %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
202 %attr(755,root,root) %{_bindir}/R
203 %attr(755,root,root) %{_bindir}/Rscript
204 %dir %{_libdir}/R
205 %dir %{_libdir}/R/lib
206 %attr(755,root,root) %{_libdir}/R/lib/libR.so
207 %attr(755,root,root) %{_libdir}/libR.so
208 %{_libdir}/R/COPYING
209 %{_libdir}/R/NEWS
210 %{_libdir}/R/SVN-REVISION
211 %attr(755,root,root) %{_libdir}/R/bin
212 %exclude %{_libdir}/R/bin/javareconf
213 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
214 %dir %{_libdir}/R/doc
215 %{_libdir}/R/doc/[KRm]*
216 %dir %{_libdir}/R/doc/html
217 %{_libdir}/R/doc/html/*.css
218 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
219 %{_libdir}/R/doc/html/packages-head*.html
220 %{_libdir}/R/doc/html/*.jpg
221 %ghost %{_libdir}/R/doc/html/packages.html
222 %{_libdir}/R/etc
223 %{_libdir}/R/include
224 %dir %{_libdir}/R/library
225 # library files list is autogenerated (see R.files above)
226 %attr(755,root,root) %{_libdir}/R/modules
227 %dir %{_libdir}/R/share
228 %{_libdir}/R/share/R
229 %{_libdir}/R/share/encodings
230 %{_libdir}/R/share/licenses
231 %dir %{_libdir}/R/share/locale
232 # locale files list is autogenerated (see R.files above)
233 %{_libdir}/R/share/make
234 %{_libdir}/R/share/sh
235 %{_libdir}/R/share/texmf
236 %{_desktopdir}/R.desktop
237 %{_pixmapsdir}/R.xpm
238 %{_includedir}/R
239 %{_pkgconfigdir}/libR.pc
240 %{_mandir}/man1/R.1*
241 %{_mandir}/man1/Rscript*
242
243 %files java-tools
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/R/bin/javareconf
246 %{_libdir}/R/share/java
This page took 0.06001 seconds and 3 git commands to generate.