Hello,
I was thinking tonight to make a template of a R spec file to be able to build R rpm faster. I have indeed observed that most of the spec file look the same (until they arrive to the rpmlint verification :-D )
I wanted to ask for your comment on that template.
If it is fine feel free to use it of course Put it in /etc/rpmdevtools/ The command to create the spec is then rpmdev-newspec -t R foo.spec
You can also remove the French summary and description ;-)
Regards,
Pingou
%define packname
Name: R-%{packname} Version: Release: 1%{?dist} Summary: Summary(fr):
Group: License: URL: Source0: BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: R
%description
%description -l fr
%prep %setup -q -n %{packname}
%build
%install %{__rm} -rf %{buildroot}
cd ..; mkdir -p %{buildroot}%{_libdir}/R/library ; R CMD INSTALL %{packname} -l %{buildroot}%{_libdir}/R/library %{__rm} -rf %{buildroot}%{_libdir}/R/library/R.css
%clean %{__rm} -rf %{buildroot}
%post %{__cat} %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt
%postun %{__cat} %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt
%files %defattr(-, root, root, -) %{_libdir}/R/library/%{packname} %doc inst/doc/*
%changelog
pingou wrote:
Hello,
I was thinking tonight to make a template of a R spec file to be able to build R rpm faster.
As I forgot to put the %check part in the spec, there is a corrected version. I have also include the group as default value as I usually put the group.
Any mind ?
Regards,
pingou
%define packname
Name: R-%{packname} Version: Release: 1%{?dist} Summary: Summary(fr):
Group: Applications/Productivity License: URL: Source0: BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: R
%description
%description -l fr
%prep %setup -q -n %{packname}
%build
%install %{__rm} -rf %{buildroot}
cd ..; mkdir -p %{buildroot}%{_libdir}/R/library ; R CMD INSTALL %{packname} -l %{buildroot}%{_libdir}/R/library %{__rm} -rf %{buildroot}%{_libdir}/R/library/R.css
%check cd ..;%{_bindir}/R CMD check %{packname}
%clean %{__rm} -rf %{buildroot}
%post %{__cat} %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt
%postun %{__cat} %{_libdir}/R/library/*/CONTENTS > %{_libdir}/R/doc/html/search/index.txt
%files %defattr(-, root, root, -) %{_libdir}/R/library/%{packname} %doc
%changelog
r-devel@lists.fedoraproject.org