Can I build a rpm out of a R package

I use R everyday but my com[any is now requiring us to build rpms out of our in house developed R packages so we can deploy them.
was wondering if a good soul could help me have a example working or direct me to some tutorial or similar.
Any help very much welcomed

Out of curiosity, do you know why they ask that ?
In our company, packages are provided to user through repositories and it is the same for different technologies - we have mirror and internal for yum repo (linux centos), pip repo (python), npm repo (JS), maven repo (Java), cran repo (R).

I am not sure really.
We are using artifactory as an artifact manager.
I imagine that keeping a unique format simplifies deployment but I hardly know anything about this.
However I have found out how to do what I wanted, I tested on my personal fedora 31 distro on a toy example mini.package

# install R2spec
sudo -s dnf install R2spec
# build the package
R --vanilla CMD build ./the_source_dir
# create rpm out of the package tar.gz
R2rpm --sources ${HOME}/CodeProjects/R/mini.package_0.0.0.9000.tar.gz --keep-sources --debug --force-spec
# install the rpm
sudo rpm -iv /home/statquant/rpmbuild/RPMS/noarch/R-mini.package-
# remove rpm

sudo dnf remove R-mini.package-

Heavy lifting if performed by the great utility r2spec
And specs are described

1 Like

Do you know artifactory support R packages ?

And nice to know you succeeded in your task !

1 Like