]> git.pld-linux.org Git - packages/R.git/blob - R.spec
- cleaned up todo: .so perms and lang() tags already done
[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.0
17 Release:        1
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:  905f638990492618559202cc1e48a867
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
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 %prep
91 %setup -q
92
93 %build
94 %{__aclocal} -I m4
95 %{__autoconf}
96 install -d build
97 cd build
98 ../%configure \
99         --enable-R-shlib \
100         --enable-largefile \
101         --with-ICU \
102         --with-blas \
103         --with-cairo \
104         --with-jpeglib \
105         --with-lapack \
106         --with-libpng \
107         --with-readline \
108         --with-recommended-packages \
109         --with-system-bzlib \
110         --with-system-pcre \
111         --with-system-xz \
112         --with-system-zlib \
113         --with%{!?with_tcl:out}-tcltk \
114         --with-x
115
116 %{__make}
117
118 %if %{with tests}
119 %{__make} check
120 %endif
121
122 %{__make} docs pdf info
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
127
128 %{__make} -C build -j1 install \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
132 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
133
134 ln -sf %{_libdir}/R/lib/libR.so $RPM_BUILD_ROOT%{_libdir}
135
136 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
137 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
138
139 gen_lang() {
140         dir="$1"
141         for d in $RPM_BUILD_ROOT${dir}/* ; do
142                 bd=$(basename $d)
143                 lang="${bd%@*}"
144                 echo "%lang($lang) ${dir}/${bd}"
145         done
146 }
147
148 gen_lang %{_libdir}/R/share/locale > R.files
149 for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
150         module=$(basename $moddir)
151         echo "%dir %{_libdir}/R/library/${module}"
152         for f in $moddir/* ; do
153                 bf=$(basename $f)
154                 case "$bf" in
155                   po)
156                         echo "%dir %{_libdir}/R/library/${module}/po"
157                         gen_lang %{_libdir}/R/library/${module}/po
158                         ;;
159                   libs)
160                         echo "%dir %{_libdir}/R/library/${module}/libs"
161                         echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
162                         ;;
163                   *)
164                         echo "%{_libdir}/R/library/${module}/${bf}"
165                         ;;
166                 esac
167         done
168 done >> R.files
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post   -p /sbin/ldconfig
174 %postun -p /sbin/ldconfig
175
176 %files -f R.files
177 %defattr(644,root,root,755)
178 %doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
179 %attr(755,root,root) %{_bindir}/R
180 %attr(755,root,root) %{_bindir}/Rscript
181 %dir %{_libdir}/R
182 %dir %{_libdir}/R/lib
183 %attr(755,root,root) %{_libdir}/R/lib/libR.so
184 %attr(755,root,root) %{_libdir}/libR.so
185 %{_libdir}/R/COPYING
186 %{_libdir}/R/NEWS
187 %{_libdir}/R/SVN-REVISION
188 %attr(755,root,root) %{_libdir}/R/bin
189 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
190 %dir %{_libdir}/R/doc
191 %{_libdir}/R/doc/[KRm]*
192 %dir %{_libdir}/R/doc/html
193 %{_libdir}/R/doc/html/*.css
194 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
195 %{_libdir}/R/doc/html/packages-head*.html
196 %{_libdir}/R/doc/html/*.jpg
197 %ghost %{_libdir}/R/doc/html/packages.html
198 %{_libdir}/R/etc
199 %{_libdir}/R/include
200 %dir %{_libdir}/R/library
201 # library files list is autogenerated (see R.files above)
202 %attr(755,root,root) %{_libdir}/R/modules
203 %dir %{_libdir}/R/share
204 %{_libdir}/R/share/R
205 %{_libdir}/R/share/encodings
206 %{_libdir}/R/share/java
207 %{_libdir}/R/share/licenses
208 %dir %{_libdir}/R/share/locale
209 # locale files list is autogenerated (see R.files above)
210 %{_libdir}/R/share/make
211 %{_libdir}/R/share/sh
212 %{_libdir}/R/share/texmf
213 %{_desktopdir}/R.desktop
214 %{_pixmapsdir}/R.xpm
215 %{_includedir}/R
216 %{_pkgconfigdir}/libR.pc
217 %{_mandir}/man1/R.1*
218 %{_mandir}/man1/Rscript*
This page took 0.093546 seconds and 4 git commands to generate.