cran2deb: satisfy immediate R dependencies iff the requisite package has already been build.
Works by running apt-get update before each build, pulling in the
declared R dependencies from a local repository.
Still to do is actually read off a topological order and deal with
transitivity. Otherwise, this appears to work fine where the only
dependencies are those in Depends or Imports of the R DESCRIPTION.
Also included is to use Imports as well as Depends for generating R
dependencies... this was necessary for, for example, stashR --- not
quite sure if this is technically correct, but it allows this package to
work.
Constructs an archive that pbuilder can apt-get dependencies from when
necessary. This requires an http server to serve var/archive (can be a
symlink).
cran2deb: rebuild the source tarball each time removing file exec bit.
The subdirectory of an R package is 'pkgname'. Debian typically has
'pkgname-upstreamversion'. Hence the tarball is rebuilt after renaming
the 'pkgname' directory appropriately.
Whilst this is all going on, every file in the R package has its
executable bit removed. There would appear to be little correct need
for it at the moment (this will change when #! is handled better) and
this gets rid of some inappropriately executable files.
cran2deb: catch a few more licenses found 'in the wild'.
If the license does not look like a properly formatted one, strip away
anything harmless (space, punctuation, numbers, etc) and see if it
can be made to match a known-good license exactly.
cran2deb: use iconv(1) to convert debian/{control,changelog,copyright} to utf8
lintian(1) likes these files to be utf8. R does not specify a character
set, so this code just hopes that iconv(1) will do the right thing. In
the only case where it matters so far (lspls) this allows the package to
build and pass lintian(1).
cranpkgs & build_some: build a random subset of all available packages.
current result:
100 packages tried
23 failed -- all due to license problems: not considered
(MIT,BSD) or malformed field (e.g., GPL 2.0 or later)
'some' (uncounted) have significant lintian warnings (mostly
seems to be incorrectly +x files)
77 .deb files produced
License handling code now deals with version numbers and also the more
common malformed license fields found in the wild. License version
information is discarded completely at the moment (though retained in
debian/copyright).
debian/copyright also includes a copyright notice formed from the Author
field of DESCRIPTION.
Debian package names must be lower case; the Debian source package
of an R package is the lowercase form of the R package name, whilst the
binary package is r-<lower case repo>-<lower case R name>.