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