1 %define fversion %(echo %{version} |tr r -)
2 %define modulename RPostgreSQL
3 Summary: R PostgreSQL Database Interface
4 Name: R-cran-%{modulename}
8 Group: Applications/Databases
9 Source0: ftp://stat.ethz.ch/R-CRAN/src/contrib/%{modulename}_%{fversion}.tar.gz
10 # Source0-md5: a847886c463df39ad17baa1a5d64d8b0
11 BuildRequires: R >= 2.8.1
12 Requires(post,postun): R >= 2.8.1
13 Requires(post,postun): perl-base
14 Requires(post,postun): textutils
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 Database interface and PostgreSQL driver for R This version complies with
19 the database interface definition as implemented in the package DBI.
25 R CMD build %{modulename}
28 rm -rf $RPM_BUILD_ROOT
29 install -d $RPM_BUILD_ROOT%{_libdir}/R/library/
30 R CMD INSTALL %{modulename} --library=$RPM_BUILD_ROOT%{_libdir}/R/library/
33 rm -rf $RPM_BUILD_ROOT
36 #(cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
37 # R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --index)
40 #if [ -f %{_libdir}/R/bin/Rcmd ];then
41 # (cd %{_libdir}/R/library; umask 022; cat */CONTENTS > ../doc/html/search/index.txt
42 # R_HOME=%{_libdir}/R ../bin/Rcmd perl ../share/perl/build-help.pl --index)
46 %defattr(644,root,root,755)
47 %doc %{modulename}/DESCRIPTION
48 %{_libdir}/R/library/%{modulename}