Google
  Web www.spinics.net

RMySQL spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi, here's a spec file in case anyone wants to package up RMySQL. I'm hereby placing it in the public domain, so please modify as necessary, and don't even bother giving me credit. I'm not volunteering to be a maintainer myself.

It passes rpmlint, it's tested only on CentOS 5, and it works for me. YMMV. I'm somewhat unsure about the BuildRequires.

By the way, R2spec was a really good starting point, but I had to deviate from its suggestions in a couple of places. You could diff an R2spec-generated file and the one below if you're curious.

-- CUT HERE --

%global packname  RMySQL
%global packrel 1

Name:             R-%{packname}
Version:          0.7
Release:          4%{?dist}
Summary:          R interface to the MySQL database

Group:            Applications/Engineering
License:          GPLv2
URL:              http://cran.r-project.org/web/packages/RMySQL/
Source0: ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}-%{release}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires(post):   R
Requires(postun): R
BuildRequires: R-devel tetex-latex R >= R-2.8.0 R-methods R-DBI >= R-0.2-2 R-utils mysql-devel

%description
Database interface and MySQL driver for R. This version complies with the database interface definition as implemented in the package DBI 0.2-2.

%prep
%setup -q -c -n %{packname}

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/R/library
%{_bindir}/R CMD INSTALL -l %{buildroot}%{_libdir}/R/library %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -rf %{buildroot}%{_libdir}/R/library/R.css

%check
%{_bindir}/R CMD check %{packname}

%clean
rm -rf %{buildroot}

%post
%{_R_make_search_index}

%postun
%{_R_make_search_index}

%files
%defattr(-, root, root, -)
%dir %{_libdir}/R/library/%{packname}

%doc %{_libdir}/R/library/%{packname}/latex
%doc %{_libdir}/R/library/%{packname}/doc
%doc %{_libdir}/R/library/%{packname}/html
%doc %{_libdir}/R/library/%{packname}/DESCRIPTION
%doc %{_libdir}/R/library/%{packname}/man
%doc %{_libdir}/R/library/%{packname}/NEWS
%doc %{_libdir}/R/library/%{packname}/GPL
%doc %{_libdir}/R/library/%{packname}/GPL
%doc %{_libdir}/R/library/%{packname}/INSTALL
%doc %{_libdir}/R/library/%{packname}/INSTALL.win
%doc %{_libdir}/R/library/%{packname}/README
%doc %{_libdir}/R/library/%{packname}/README.windows
%doc %{_libdir}/R/library/%{packname}/THANKS
%doc %{_libdir}/R/library/%{packname}/TODO
%doc %{_libdir}/R/library/%{packname}/WindowsPath.txt
%doc %{_libdir}/R/library/%{packname}/newFunctionNames.txt

%{_libdir}/R/library/%{packname}/CONTENTS
%{_libdir}/R/library/%{packname}/INDEX
%{_libdir}/R/library/%{packname}/NAMESPACE
%{_libdir}/R/library/%{packname}/Meta
%{_libdir}/R/library/%{packname}/R
%{_libdir}/R/library/%{packname}/R-ex
%{_libdir}/R/library/%{packname}/help
%{_libdir}/R/library/%{packname}/FindMySQLhome.R
%{_libdir}/R/library/%{packname}/libs/RMySQL.so

%changelog
* Sun Aug 23 2009 Name <Mail> 0.7.4-1
- initial package for Fedora

_______________________________________________
Fedora-r-devel-list mailing list
Fedora-r-devel-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-r-devel-list

[Home]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net