Makepack is for version 3.5

This commit is contained in:
Laurent Destailleur 2014-02-15 15:23:21 +01:00
parent b499efeccf
commit 295f0fd9e7

View File

@ -2,7 +2,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file build/makepack-dolibarrmodule.pl # \file build/makepack-dolibarrmodule.pl
# \brief Package builder (tgz, zip, rpm, deb, exe) # \brief Package builder (tgz, zip, rpm, deb, exe)
# \author (c)2005-2013 Laurent Destailleur <eldy@users.sourceforge.net> # \author (c)2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
use Cwd; use Cwd;
@ -20,8 +20,8 @@ $GROUP="ldestailleur";
use vars qw/ $REVISION $VERSION /; use vars qw/ $REVISION $VERSION /;
$REVISION='1.20'; $REVISION='1.0';
$VERSION="1.0 (build $REVISION)"; $VERSION="3.5 (build $REVISION)";
@ -245,18 +245,30 @@ foreach my $PROJECT (@PROJECTLIST) {
if (! $result) { die "Error: Can't open conf file makepack-".$PROJECT.".conf for reading.\n"; } if (! $result) { die "Error: Can't open conf file makepack-".$PROJECT.".conf for reading.\n"; }
while(<IN>) while(<IN>)
{ {
if ($_ =~ /^#/) { next; } # Do not process comments $entry=$_;
if ($entry =~ /^#/) { next; } # Do not process comments
$_ =~ s/\n//; $entry =~ s/\n//;
$_ =~ /^(.*)\/[^\/]+/;
if ($entry =~ /^!(.*)$/) # Exclude so remove file/dir
{
print "Remove $BUILDROOT/$PROJECTLC/$1\n";
$ret=`rm -fr "$BUILDROOT/$PROJECTLC/"$1`;
if ($? != 0) { die "Failed to delete a file to exclude declared into makepack-".$PROJECT.".conf file (Fails on line ".$entry.")\n"; }
next;
}
$entry =~ /^(.*)\/[^\/]+/;
print "Create directory $BUILDROOT/$PROJECTLC/$1\n"; print "Create directory $BUILDROOT/$PROJECTLC/$1\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECTLC/$1"`; $ret=`mkdir -p "$BUILDROOT/$PROJECTLC/$1"`;
if ($_ !~ /version\-/) if ($entry !~ /version\-/)
{ {
print "Copy $SOURCE/$_ into $BUILDROOT/$PROJECTLC/$_\n"; print "Copy $SOURCE/$entry into $BUILDROOT/$PROJECTLC/$entry\n";
$ret=`cp -pr "$SOURCE/$_" "$BUILDROOT/$PROJECTLC/$_"`; $ret=`cp -pr "$SOURCE/$entry" "$BUILDROOT/$PROJECTLC/$entry"`;
if ($? != 0) { die "Failed to make copy of a file declared into makepack-".$PROJECT.".conf file (Fails on line ".$_.")\n"; } if ($? != 0) { die "Failed to make copy of a file declared into makepack-".$PROJECT.".conf file (Fails on line ".$entry.")\n"; }
} }
} }
close IN; close IN;