[pkg-bioc] svn commit r327 r327 - in /trunk/tools-ng: CRAN2DEB.pm list.d/extraTargets.list r_pkg_ordering.pl
psychedelys-guest at users.alioth.debian.org
psychedelys-guest at users.alioth.debian.org
Sat Sep 29 16:06:13 UTC 2007
Author: psychedelys-guest
Date: Sat Sep 29 16:06:13 2007
New Revision: 327
URL: http://svn.debian.org/wsvn/pkg-bioc/?sc=1&rev=327
Log:
* moved the call to check for source code file outside, so writeRules know if an extracleanning rules for binary, need to be called
* updated the extraTarget list as all binary, do not need the extra cleaning rules anymore
Modified:
trunk/tools-ng/CRAN2DEB.pm
trunk/tools-ng/list.d/extraTargets.list
trunk/tools-ng/r_pkg_ordering.pl
Modified: trunk/tools-ng/CRAN2DEB.pm
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/CRAN2DEB.pm?rev=327&op=diff
==============================================================================
--- trunk/tools-ng/CRAN2DEB.pm (original)
+++ trunk/tools-ng/CRAN2DEB.pm Sat Sep 29 16:06:13 2007
@@ -10,7 +10,7 @@ package CRAN2DEB;
use strict;
use warnings;
require Exporter;
-require POSIX;
+use POSIX;
use Cwd;
use IO::Handle;
@@ -19,7 +19,8 @@ use Text::Wrap;
use File::Copy;
our @ISA = qw(Exporter); # make these symbols known
-our @EXPORT = qw(lowerCase
+our @EXPORT = qw(
+ lowerCase
getDepth
areHereFilesToCompile
writeRules
@@ -32,7 +33,9 @@ our @EXPORT = qw(lowerCase
writePatches
listRequiredDebianPackages
showHelpAndExit
- fixUndef);
+ fixUndef
+ isbinary
+);
# writePostinst
# writePostrm
@@ -109,7 +112,7 @@ sub areHereFilesToCompile($) {
"This should not have happened in 'CRAN2DEB::areHereFilesToCompile.\n";
}
while (<PIPE>) {
- if (/\.([chfC]|cpp|cc)$/mi) {
+ if (/\.([chfC]|cpp|cc|[f\d+])$/mi) {
close(PIPE);
return (1);
}
@@ -131,8 +134,10 @@ sub writeRules($$$) {
# my $now = POSIX::strftime "%a %b %e %Y %H:%M:%S %Z", localtime;
my $now = POSIX::strftime "%a %b %e %Y ", localtime;
print FILE "#!/usr/bin/make -f\n";
- print FILE "# -*- makefile -*-\n";
- print FILE "# debian/rules file for the Debian/GNU Linux package \'r-$repository-$name\'\n";
+ print FILE
+ "# -*- makefile -*-\n";
+ print FILE
+"# debian/rules file for the Debian/GNU Linux package \'r-$repository-$name\'\n";
print FILE "# Copyright 2004-2007 by $maintainer\n";
print FILE "#\n";
print FILE "# automatically generated on $now by CRAN2DEB $main::VERSION\n";
@@ -142,6 +147,12 @@ sub writeRules($$$) {
print FILE "include /usr/share/cdbs/1/rules/dpatch.mk\n";
print FILE "include /usr/share/dpatch/dpatch.make\n";
+ # if the package is a binary packages, we need to clean.
+ if ( $pkg->{isBinary} ) {
+ print FILE
+ "clean::\n\trm -f `find src -name \"*.o\" -o -name \"*.so\"`\n\n";
+ }
+
# TODO : check the next block, as it's seam to be too strange,...
if ( defined($targets) ) {
print "*** Found extra targets for package " . $pkg->{Package} . "\n";
@@ -162,6 +173,20 @@ sub writeRules($$$) {
}
+sub isbinary($) {
+ my ($pkg) = @_;
+ if ( !exists( $pkg->{isBinary} ) ) {
+ if ( areHereFilesToCompile( $pkg->{BuildDir} . "/src" )
+ or areHereFilesToCompile( $pkg->{BuildDir} ) )
+ {
+ $pkg->{isBinary} = 1;
+ }
+ else {
+ $pkg->{isBinary} = 0;
+ }
+ }
+}
+
sub writeConfig($$$) {
my ( $pkg, $maintainer, $binarch ) = @_;
my $repository = $pkg->{Repository};
@@ -174,16 +199,6 @@ sub writeConfig($$$) {
#$indep="-Indep"; # I think this is not correct since we need all packages anyway for compilation
# and against Debian Policy
my $indep = "";
- if ( !exists( $pkg->{isBinary} ) ) {
- if ( areHereFilesToCompile( $pkg->{BuildDir} . "/src" )
- or areHereFilesToCompile( $pkg->{BuildDir} ) )
- {
- $pkg->{isBinary} = 1;
- }
- else {
- $pkg->{isBinary} = 0;
- }
- }
if ( $pkg->{isBinary} ) {
$pkg->{arch} = "any";
@@ -197,22 +212,25 @@ sub writeConfig($$$) {
}
my $dps = "";
- $dps = join( ", ", @{ $pkg->{debiandependencies} } ) if ( defined $pkg->{debiandependencies} );
+ $dps = join( ", ", @{ $pkg->{debiandependencies} } )
+ if ( defined $pkg->{debiandependencies} );
if ($dps !~ //) {
$dps = ", ".$dps;
}
my $bdps = "";
- $bdps = join( ", ", @{ $pkg->{debianbuilddependencies} } ) if ( defined $pkg->{debianbuilddependencies} );
+ $bdps = join( ", ", @{ $pkg->{debianbuilddependencies} } )
+ if ( defined $pkg->{debianbuilddependencies} );
if ($bdps !~ //) {
$bdps = ", ".$bdps;
}
print FILE "Source: $pkg->{DebName}\n";
print FILE "Section: "
- . ( ( "" eq $pkg->{section} or "main" eq $pkg->{section} )
+ . (
+ ( "" eq $pkg->{section} or "main" eq $pkg->{section} )
? ""
- : "$pkg->{section}/" )
- . "math\n";
+ : "$pkg->{section}/"
+ ) . "math\n";
print FILE "Priority: optional\n"
. "Maintainer: $maintainer\n"
. "Standards-Version: 3.7.0\n"
@@ -229,9 +247,11 @@ sub writeConfig($$$) {
my $p = $pkg->{Package};
# TODO false !
- print FILE "Recommends: " . join( ", ", @{ $main::globalstuff{recommends}{$p} } ) . "\n"
+ print FILE "Recommends: "
+ . join( ", ", @{ $main::globalstuff{recommends}{$p} } ) . "\n"
if exists( $main::globalstuff{recommends}{$p} );
- print FILE "Suggests: " . join( ", ", @{ $main::globalstuff{suggests}{$p} } ) . "\n"
+ print FILE "Suggests: "
+ . join( ", ", @{ $main::globalstuff{suggests}{$p} } ) . "\n"
if exists( $main::globalstuff{suggests}{$p} );
$Text::Wrap::columns = 72; # wrap the Description per Debian Policy
@@ -345,7 +365,8 @@ sub writeReadme($$) {
my $date = POSIX::strftime "%a, %e %b %Y %H:%M:%S %z", localtime;
print FILE "r-$pkg->{Repository}-$pkg->{DebName} for Debian\n\n";
print FILE "This Debian package was created from sources on the \n";
- print FILE "Comprehensive R Archive Network" if $pkg->{Repository} =~ /cran/;
+ print FILE "Comprehensive R Archive Network"
+ if $pkg->{Repository} =~ /cran/;
print FILE "BioConductor project" if $pkg->{Repository} =~ /bioc/;
print FILE "Omegahat" if $pkg->{Repository} =~ /omegahat/;
print FILE " site, accessible at ";
Modified: trunk/tools-ng/list.d/extraTargets.list
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/list.d/extraTargets.list?rev=327&op=diff
==============================================================================
--- trunk/tools-ng/list.d/extraTargets.list (original)
+++ trunk/tools-ng/list.d/extraTargets.list Sat Sep 29 16:06:13 2007
@@ -1,33 +1,14 @@
+# need some cleanup...
# CRAN
RSQLite: clean::,, 'rm -f `find src -name*.pdf`'
RSQLite: clean::,, 'rm -f rsqlite-0.4.0/inst/sqlite/bin/sqlite3'
-adehabitat: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-aster: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-pcurve: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-SpherWave: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
# BioC
adPplit: clean::,, 'rm -f `find src -name*.pdf`'
-affy: clean::,, 'rm -f `find src -name*.pdf -o -name*.o -o -name*.so`'
+affy: clean::,, 'rm -f `find src -name*.pdf`'
affydata: clean::,, 'rm -f `find src -name*.pdf`'
bim: clean::,, 'rm -f ./Sources.gz'
-Biobase: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-affxparser: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-Biostrings: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-cosmo: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-dyndoc: clean::,, 'rm -f `find src -name*.rda`'
+DynDoc: clean::,, 'rm -f `find src -name*.rda`'
exonmap: clean::,, 'rm -f `find src -name*.rda`'
-genefilter: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-graph: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-multtest: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-prada: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-prism: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-puma: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-Rgraphviz: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-Rredland: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-RMAGEML: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-simpleaffy: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
-tilingArray: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
# Omegahat
-RSPerl: clean::,, 'rm -f `find src -name*.o -o -name*.so`'
Modified: trunk/tools-ng/r_pkg_ordering.pl
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/r_pkg_ordering.pl?rev=327&op=diff
==============================================================================
--- trunk/tools-ng/r_pkg_ordering.pl (original)
+++ trunk/tools-ng/r_pkg_ordering.pl Sat Sep 29 16:06:13 2007
@@ -791,7 +791,7 @@ foreach my $package (@nodes) {
"Cannot create debian/ in " . $packagehashref->{BuildDir} );
next;
}
- #isbinary($packagehashref);
+ isbinary($packagehashref);
writePatches( $packagehashref, $globalstuff{hasPatches}{$package} )
if ( exists( $globalstuff{hasPatches}{$package} ) );
writeRules( $packagehashref, $globalstuff{extraTarget}{$package},
More information about the pkg-bioc-devel
mailing list