Fix: Meilleur gestion du makepack sous linux

This commit is contained in:
Laurent Destailleur 2004-11-13 22:27:16 +00:00
parent 4d9fd1bab9
commit 5b3fcdacff
2 changed files with 16 additions and 8 deletions

View File

@ -81,7 +81,7 @@ if (! $TEMP || ! -d $TEMP) {
$BUILDROOT="$TEMP/buildroot";
my $copyalreadydone=0;
my $copyalreadydone=1;
# Choose package targets
#-----------------------
@ -135,7 +135,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
print "Test requirement for target $target: Search '$req'... ";
$ret=`"$req" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && ($coderetour2 == 1 || $coderetour2 == 127) && $PROGPATH) {
if ($coderetour != 0 && ($coderetour2 == 1 && $OS =~ /windows/) || ($coderetour2 == 127 && $OS !~ /windows/) && $PROGPATH) {
# If error not found, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
@ -194,11 +194,14 @@ if ($nboftargetok) {
if ($target eq 'TGZ') {
unlink $FILENAMETGZ.tgz;
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
$ret=`tar --exclude-from "$SOURCE/build/tgz/tar.exclude" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ.tgz" $FILENAMETGZ`;
print "Move $FILENAMETGZ.tgz to $SOURCE/build/$FILENAMETGZ.tgz\n";
rename("$BUILDROOT/$FILENAMETGZ.tgz","$SOURCE/build/$FILENAMETGZ.tgz");
$cmd="tar --exclude-from \"$SOURCE/build/tgz/tar.exclude\" --directory \"$BUILDROOT\" -czvf \"$FILENAMETGZ.tgz\" $FILENAMETGZ";
# $cmd="tar --exclude-from \"$SOURCE/build/tgz/tar.exclude\" --directory \"$BUILDROOT\" -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" $FILENAMETGZ";
# print $cmd;
$ret=`$cmd`;
# print "Move $FILENAMETGZ.tgz to $SOURCE/build/$FILENAMETGZ.tgz\n";
# $ret=`mv "$BUILDROOT/$FILENAMETGZ.tgz" "$SOURCE/build/$FILENAMETGZ.tgz"`;
next;
}
}
if ($target eq 'ZIP') {
unlink $FILENAMEZIP.zip;
@ -212,7 +215,7 @@ if ($nboftargetok) {
next;
}
if ($target eq 'RPM') {
if ($target eq 'RPM') { # Linux only
$BUILDFIC="$FILENAMETGZ.spec";
unlink $FILENAMETGZ.tgz;
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";

View File

@ -1,4 +1,9 @@
doc/dev/dolibarr-phpdoc
htdocs/document
CVS
*~
*~
dolibarr-*.tgz
dolibarr-*.exe
dolibarr-*.rpm
dolibarr-*.deb
dolibarr-*.zip