]> git.pld-linux.org Git - packages/R.git/blobdiff - R.spec
- autogenerate locale and library file lists, using %lang() flags
[packages/R.git] / R.spec
diff --git a/R.spec b/R.spec
index 4c2d8f5175ca48d14dbd5b36f898c90db659ed9d..fa30fa6f61f159997300bd6b1a7a9db52d4e154d 100644 (file)
--- a/R.spec
+++ b/R.spec
@@ -1,51 +1,71 @@
+#
+# Conditional build
+%bcond_without tcl             # disable tcl support
+%bcond_without tests           # do not run "make check"
+#
+# NOTE:
+# - /etc/localtime must be present for tests to work
+#
 # TODO:
-# - move perl R libraries to standard perl location
+# - 755 for %{_libdir}/R/library/*/libs/*.so
+# - %lang( ) for %{_libdir}/R/library/*/po/* dirs
 # - script for rpm to autoprovides/autorequires R internals
 #
-# Conditional build:
-%bcond_without gnome   # without GNOME support
-#
 %include       /usr/lib/rpm/macros.perl
 Summary:       A language for data analysis and graphics
-Summary(pl):   Jêzyk do analizy danych oraz grafiki
+Summary(pl.UTF-8):     Język do analizy danych oraz grafiki
 Name:          R
-Version:       2.1.1
+Version:       2.14.0
 Release:       1
-License:       Mixed (distributable), mostly GPL
+License:       Mixed (distributable), mostly GPL v2+
 Group:         Development/Languages
 # CRAN master site: ftp://cran.r-project.org/pub/R/src/
 Source0:       ftp://stat.ethz.ch/R-CRAN/src/base/R-2/%{name}-%{version}.tar.gz
-# Source0-md5: e755b0ba5851ec261000af6b5c510335
+# Source0-md5: 98cf8fe74e512e1061caf1ee0c2043a8
 Source1:       %{name}.desktop
+Source2:       %{name}.xpm
 URL:           http://www.r-project.org/
-BuildRequires: XFree86-devel
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.62
 BuildRequires: automake
-BuildRequires: blas-devel
-BuildRequires: bzip2-devel
-BuildRequires: gcc-c++
-BuildRequires: gcc-g77
+BuildRequires: blas-devel >= 3.2.2-2
+BuildRequires: bzip2-devel >= 1.0.6
+BuildRequires: cairo-devel >= 1.6
+BuildRequires: gcc-fortran
 BuildRequires: gettext-devel
+BuildRequires: lapack-devel >= 3.2.2-2
+BuildRequires: libicu-devel
 BuildRequires: libjpeg-devel >= 6b
-BuildRequires: libpng-devel >= 1.0.5
+BuildRequires: libpng-devel >= 1.2.7
 BuildRequires: libstdc++-devel
-BuildRequires: libtool
-BuildRequires: libxml-devel
+BuildRequires: libtiff-devel
+BuildRequires: libtool >= 2:2.0
+BuildRequires: libxml2-devel >= 2.6.26
+BuildRequires: pango-devel
+BuildRequires: pcre-devel >= 7.6
 BuildRequires: perl-base >= 1:5.6
+BuildRequires: pkgconfig
 BuildRequires: readline-devel
 BuildRequires: rpm-perlprov
-BuildRequires: tcl-devel
-BuildRequires: tetex-latex
+%{?with_tcl:BuildRequires:     tcl-devel >= 8.4}
 BuildRequires: tetex-dvips
+BuildRequires: tetex-latex
 BuildRequires: tetex-pdftex
-BuildRequires: tk-devel
+BuildRequires: texinfo-texi2dvi >= 4.7
+%{?with_tcl:BuildRequires:     tk-devel >= 8.4}
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXmu-devel
+BuildRequires: xorg-lib-libXt-devel
+BuildRequires: xz-devel >= 4.999
 BuildRequires: zip
-BuildRequires: zlib >= 1.1.3
-#BuildRequires:        lpr
+BuildRequires: zlib-devel >= 1.2.3
 #Requires:     lpr
-%{?with_gnome:BuildRequires:   gnome-libs-devel}
-%{?with_gnome:BuildRequires:   ORBit-devel}
-%{?with_gnome:BuildRequires:   libglade-gnome-devel}
+Requires(post):        perl-base
+Requires(post):        textutils
+Requires:      blas >= 3.2.2-2
+Suggests:      rkward
+Obsoletes:     R-base
+Obsoletes:     R-contrib
+Obsoletes:     R-recommended
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -59,180 +79,139 @@ Becker, Chambers & Wilks' S and Sussman's Scheme. Whereas the
 resulting language is very similar in appearance to S, the underlying
 implementation and semantics are derived from Scheme.
 
-%description -l pl
-System do obliczeñ statystycznych i grafiki. R sk³ada siê z jêzyka
-oraz ¶rodowiska uruchomieniowego z grafik±, debuggerem, dostêpem do
-niektórych funkcji systemowych oraz mo¿liwo¶ci± uruchamiania programów
+%description -l pl.UTF-8
+System do obliczeń statystycznych i grafiki. R składa się z języka
+oraz środowiska uruchomieniowego z grafiką, debuggerem, dostępem do
+niektórych funkcji systemowych oraz możliwością uruchamiania programów
 zapisanych w skryptach.
 
-Jêzyk R by³ zainspirowany dwoma istniej±cymi jêzykami: S (Beckera,
+Język R był zainspirowany dwoma istniejącymi językami: S (Beckera,
 Chambersa i Wilksa) oraz Scheme (Sussmana). R jest podobny do S, ale
-implementacja i semantyka wywodzi siê ze Scheme.
-
-%package base
-Summary:       The R base distribution
-Summary(pl):   Podstawowa dystrybucja R
-License:       GPL v2 / LGPL
-Group:         Development/Languages
-Requires(post):        textutils
-Requires(post):        perl-base
-Provides:      R-cran-base
-Provides:      R-cran-datasets
-Provides:      R-cran-grid
-Provides:      R-cran-graphics
-Provides:      R-cran-grDevices
-Provides:      R-cran-methods
-Provides:      R-cran-utils
-Provides:      R-cran-tcltk
-Provides:      R-cran-splines
-Provides:      R-cran-stats
-Provides:      R-cran-stats4
-Provides:      R-cran-tools
-
-%description base
-R is a language and run-time environment for carrying out interactive
-statistical data analysis. It is not entirely dissimilar to the S
-language developed at AT&T Bell Laboratories (and now Lucent
-Technologies). Indeed, S users will find the environment quite
-familiar and a good deal of S software will run without change under
-R.
-
-%description base -l pl
-R jest jêzykiem i ¶rodowiskiem uruchomieniowym do interaktywnej
-analizy danych statystycznych. R nie jest ca³kowicie zgodny z jêzykiem
-S opracowanym w AT&T Bell Laboratiories (a teraz Lucent Technologies),
-mimo to u¿ytkownicy S zauwa¿± zbli¿one ¶rodowisko, a du¿a czê¶æ
-oprogramowania w S bêdzie dzia³a³a bez zmian w R.
-
-%package recommended
-Summary:       Recommended contributed packages for the R language
-Summary(pl):   Zalecane dodatkowe pakiety do jêzyka R
-Group:         Development/Languages
-Requires:      R-cran-KernSmooth
-Requires:      R-cran-VR
-Requires:      R-cran-boot
-Requires:      R-cran-cluster
-Requires:      R-cran-foreign
-Requires:      R-cran-lattice
-Requires:      R-cran-mgcv
-Requires:      R-cran-nlme
-Requires:      R-cran-rpart
-Requires:      R-cran-survival
-License:       GPL, free or free for non-commercial use
-URL:           http://www.ci.tuwien.ac.at/R/
-Requires(post,postun): R-base
-Requires(post,postun): perl-base
-Requires(post,postun): textutils
-Obsoletes:     R-contrib
-Requires:      R-base = %{version}-%{release}
-
-%description recommended
-Packages which extend the capabilities of the R base distribution and
-are distributed on the Comprehensive R Archive Network (CRAN).
-
-%description recommended -l pl
-Pakiety rozszerzaj±ce mo¿liwo¶ci podstawowej dystrybucji jêzyka R,
-dystrubuowane w archiwum CRAN (Comprehensive R Archive Network).
+implementacja i semantyka wywodzi się ze Scheme.
 
 %prep
 %setup -q
 
-# These files have the path for Perl hard-coded as /usr/local/bin/perl
-# We need to remove them to avoid dependency problems
-rm -f ./doc/keyword-test.orig ./etc/undoc/R-funs.orig ./etc/undoc/extrExamp.orig
-
 %build
 %{__aclocal} -I m4
 %{__autoconf}
-cp -f /usr/share/automake/config.* .
-%configure \
-       --with%{!?with_gnome:out}-gnome \
+install -d build
+cd build
+../%configure \
        --enable-R-shlib \
-       --enable-linux-lfs \
-       --with-zlib \
-       --with-bzlib \
-       --with-pcre \
-       --without-recommended-packages
+       --enable-largefile \
+       --with-ICU \
+       --with-blas \
+       --with-cairo \
+       --with-jpeglib \
+       --with-lapack \
+       --with-libpng \
+       --with-readline \
+       --with-recommended-packages \
+       --with-system-bzlib \
+       --with-system-pcre \
+       --with-system-xz \
+       --with-system-zlib \
+       --with%{!?with_tcl:out}-tcltk \
+       --with-x
 
 %{__make}
+
+%if %{with tests}
 %{__make} check
-%{__make} docs
-%{__make} help
-%{__make} html
-%{__make} info
+%endif
+
+%{__make} docs pdf info
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/R,%{_includedir},%{_desktopdir},%{_pixmapsdir}}
 
-%{__make} install \
-       rhome=$RPM_BUILD_ROOT%{_libdir}/R \
-       mandir=$RPM_BUILD_ROOT%{_mandir} \
-       bindir=$RPM_BUILD_ROOT%{_bindir} \
-       
+%{__make} -C build -j1 install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
 
-find $RPM_BUILD_ROOT%{_libdir}/R -name 'Makefile*' -exec rm -f {} \;
 mv $RPM_BUILD_ROOT%{_libdir}/R/lib/libR*.so $RPM_BUILD_ROOT%{_libdir}
 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/include $RPM_BUILD_ROOT%{_includedir}/R
 ln -sf %{_includedir}/R $RPM_BUILD_ROOT%{_libdir}/R/include
-rm $RPM_BUILD_ROOT%{_bindir}/%{name}
-sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/%{name}
-ln -sf %{_libdir}/%{name}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
+
+gen_lang() {
+       dir="$1"
+       for d in $RPM_BUILD_ROOT${dir}/* ; do
+               bd=$(basename $d)
+               lang="${bd%@*}"
+               echo "%lang($lang) ${dir}/${bd}"
+       done
+}
+
+gen_lang %{_libdir}/R/share/locale > R.files
+for moddir in $RPM_BUILD_ROOT%{_libdir}/R/library/* ; do
+       module=$(basename $moddir)
+       echo "%dir %{_libdir}/R/library/${module}"
+       for f in $moddir/* ; do
+               bf=$(basename $f)
+               case "$bf" in
+                 po)
+                       echo "%dir %{_libdir}/R/library/${module}/po"
+                       gen_lang %{_libdir}/R/library/${module}/po
+                       ;;
+                 libs)
+                       echo "%dir %{_libdir}/R/library/${module}/libs"
+                       echo "%attr(755,root,root) %{_libdir}/R/library/${module}/libs/*.so"
+                       ;;
+                 *)
+                       echo "%{_libdir}/R/library/${module}/${bf}"
+                       ;;
+               esac
+       done
+done >> R.files
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-(cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
- R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --htmllist)
-/sbin/ldconfig
-
+%post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%files base
+%files -f R.files
 %defattr(644,root,root,755)
-%doc COPYRIGHTS FAQ NEWS README RESOURCES THANKS Y2K
-
-%{_mandir}/man1/R.1*
+%doc NEWS README doc/{AUTHORS,COPYRIGHTS,FAQ,RESOURCES,THANKS}
 %attr(755,root,root) %{_bindir}/R
+%attr(755,root,root) %{_bindir}/Rscript
+%attr(755,root,root) %{_libdir}/libR.so
 %dir %{_libdir}/R
+%{_libdir}/R/COPYING
+%{_libdir}/R/NEWS
+%{_libdir}/R/SVN-REVISION
 %attr(755,root,root) %{_libdir}/R/bin
-%attr(755,root,root) %{_libdir}/libR*.so
-%{_libdir}/R/etc
-%{_libdir}/R/include
-%{_includedir}/R
-%{_libdir}/R/share
-%{_libdir}/R/AUTHORS
-%dir %{_libdir}/R/library
 # %{_libdir}/R/doc %except %{_libdir}/R/doc/html/{packages.html,search/index.txt}
 %dir %{_libdir}/R/doc
 %{_libdir}/R/doc/[KRm]*
 %dir %{_libdir}/R/doc/html
 %{_libdir}/R/doc/html/*.css
 %{_libdir}/R/doc/html/[Ra-lr-u]*.html
-%{_libdir}/R/doc/html/packages-head.html
+%{_libdir}/R/doc/html/packages-head*.html
 %{_libdir}/R/doc/html/*.jpg
-%dir %{_libdir}/R/doc/html/search
-%{_libdir}/R/doc/html/search/[A-Z]*
-%ghost %{_libdir}/R/doc/html/search/index.txt
 %ghost %{_libdir}/R/doc/html/packages.html
-%{_desktopdir}/*
-
-%attr(755,root,root) %{_libdir}/%{name}/modules
-
-%{_libdir}/%{name}/library/base
-%{_libdir}/%{name}/library/datasets
-%{_libdir}/%{name}/library/grid
-%{_libdir}/%{name}/library/graphics
-%{_libdir}/%{name}/library/grDevices
-%{_libdir}/%{name}/library/methods
-%{_libdir}/%{name}/library/utils
-%{_libdir}/%{name}/library/tcltk
-%{_libdir}/%{name}/library/splines
-%{_libdir}/%{name}/library/stats
-%{_libdir}/%{name}/library/stats4
-%{_libdir}/%{name}/library/tools
-
-%files recommended
+%{_libdir}/R/etc
+%{_libdir}/R/include
+%dir %{_libdir}/R/library
+# library files list is autogenerated (see R.files above)
+%attr(755,root,root) %{_libdir}/R/modules
+%dir %{_libdir}/R/share
+%{_libdir}/R/share/R
+%{_libdir}/R/share/encodings
+%{_libdir}/R/share/java
+%{_libdir}/R/share/licenses
+%dir %{_libdir}/R/share/locale
+# locale files list is autogenerated (see R.files above)
+%{_libdir}/R/share/make
+%{_libdir}/R/share/sh
+%{_libdir}/R/share/texmf
+%{_desktopdir}/R.desktop
+%{_pixmapsdir}/R.xpm
+%{_includedir}/R
+%{_pkgconfigdir}/libR.pc
+%{_mandir}/man1/R.1*
+%{_mandir}/man1/Rscript*
This page took 0.138149 seconds and 4 git commands to generate.