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