From: blundellc Date: Sat, 13 Sep 2008 13:12:40 +0000 (+0000) Subject: cran2deb: work with pbuilder. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=10a0bd4a23d55ce6d2bb9cd57e7ceda07682996a;p=cran2deb.git cran2deb: work with pbuilder. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@16 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- diff --git a/pkg/trunk/cran2deb b/pkg/trunk/cran2deb index 9e67627..108078d 100755 --- a/pkg/trunk/cran2deb +++ b/pkg/trunk/cran2deb @@ -1,5 +1,7 @@ #!/usr/bin/env r +use_pbuilder <- 1 + version.new <- function(rver,debian_revision=1, debian_epoch=0) { # generate a string representation of the Debian version of an # R version of a package @@ -279,7 +281,11 @@ build.debian <- function(pkg) { ,pkg$debname ,paste('(',pkg$debversion,')',sep='') ,'...')) - system('debuild -us -uc -b') + if (use_pbuilder) { + system('pdebuild -b') + } else { + system('debuild -us -uc -b') + } setwd(wd) } @@ -291,6 +297,16 @@ go <- function(name) { build.debian(pkg) return(pkg) })()) + if (!inherits(pkg,'try-error')) { + # TODO: copy away the results from pkg$path/../ + # _.orig.tar.gz + # _.diff.gz + # _.dsc + # __.build + # __source.changes + # __source.changes + # __.deb + } cleanup(dir) if (inherits(pkg,'try-error')) { stop(call.=F) diff --git a/pkg/trunk/pbuilder_setup b/pkg/trunk/pbuilder_setup new file mode 100755 index 0000000..c0ea459 --- /dev/null +++ b/pkg/trunk/pbuilder_setup @@ -0,0 +1,9 @@ +#!/usr/bin/rc + +mode=create +if ([ -e /var/cache/pbuilder/base.tgz ]) { + mode=update +} +#sudo cowbuilder --$mode --hookdir /usr/share/doc/pbuilder/examples/workaround/ --distribution lenny --debootstrap cdebootstrap --basepath /var/cache/pbuilder/base.cow --extrapackages 'debhelper r-base-dev cdbs r-base-core lintian' +sudo pbuilder $mode --distribution lenny --extrapackages 'debhelper r-base-dev cdbs r-base-core lintian' +