]> git.donarmstrong.com Git - cran2deb.git/commitdiff
cran2deb: make sure the single line synopsis is separated from the main description.
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:13:19 +0000 (13:13 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:13:19 +0000 (13:13 +0000)
Fixes one previously seen build error. Also now include URL in
description from R DESCRIPTION.

git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@21 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/trunk/cran2deb

index 7f9e14a6e8bf5189364a9662f65eb19cd564a348..6104ddb04518254666af882c4086ef863f8c7cda 100755 (executable)
@@ -291,9 +291,11 @@ prepare.new.debian <- function(pkg) {
     } else {
         descr = paste(descr,pkg$name,sep='')
     }
-    control[2,'Description'] = paste(descr,'"\n'
-                                    ,pkg$description[1,'Description']
-                                    ,sep='')
+    descr = paste(descr,'"\n\n', pkg$description[1,'Description'], sep='')
+    if ('URL' %in% colnames(pkg$description)) {
+        descr = paste(descr,'\n\nURL: ',pkg$description[1,'URL'],sep='')
+    }
+    control[2,'Description'] = descr
     # Debian policy says 72 char width; indent minimally
     write.dcf(control,file=debfile('control.in'),indent=1,width=72)
     # TODO: debian/watch
@@ -304,6 +306,7 @@ prepare.new.debian <- function(pkg) {
         system(paste('iconv -o ',shQuote(debfile(file))
                     ,' -t utf8 '
                     ,shQuote(debfile(paste(file,'in',sep='.')))))
+        file.remove(debfile(paste(file,'in',sep='.')))
     }
     return(pkg)
 }