diff options
author | Fabien Tassin <fta@sofaraway.org> | 2008-06-20 17:30:27 +0200 |
---|---|---|
committer | Fabien Tassin <fta@sofaraway.org> | 2008-06-20 17:30:27 +0200 |
commit | fc7fa208e61631d9d5c9753e91268c2dd3baf579 (patch) | |
tree | 709d5b56a9a6513ca1842f13d2323aa039ae0b64 /src/mozclient | |
parent | 344eb5b30a33eec39030f12ee5597ed8baa7f56e (diff) |
* [mozclient] Add MOZCLIENT_APPNAME in order for xulrunner applications to specify
their toplevel directory name. It is set by default to 'mozilla'
- update src/mozclient/mozclient.pl
- update src/mozclient/lib/MozClient/VCS.pm
- update src/mozclient/lib/MozClient/Subversion.pm
- update src/mozclient/lib/MozClient/Mercurial.pm
Diffstat (limited to 'src/mozclient')
-rw-r--r-- | src/mozclient/lib/MozClient/Mercurial.pm | 4 | ||||
-rw-r--r-- | src/mozclient/lib/MozClient/Subversion.pm | 4 | ||||
-rw-r--r-- | src/mozclient/lib/MozClient/VCS.pm | 16 | ||||
-rwxr-xr-x | src/mozclient/mozclient.pl | 8 |
4 files changed, 18 insertions, 14 deletions
diff --git a/src/mozclient/lib/MozClient/Mercurial.pm b/src/mozclient/lib/MozClient/Mercurial.pm index 408a6f8..95176c9 100644 --- a/src/mozclient/lib/MozClient/Mercurial.pm +++ b/src/mozclient/lib/MozClient/Mercurial.pm @@ -78,8 +78,8 @@ sub checkout { $self->{'MOZCLIENT_PROJECT'}, $module); } } - my $cmd = sprintf "hg clone %s %s mozilla", $self->{'mozclient_date'}, - join " ", @$modules; + my $cmd = sprintf "hg clone %s %s %s", $self->{'mozclient_date'}, + join(" ", @$modules), $self->{'MOZCLIENT_MOZDIRNAME'}; $self->run_system($cmd); $self->chdir(".."); } diff --git a/src/mozclient/lib/MozClient/Subversion.pm b/src/mozclient/lib/MozClient/Subversion.pm index d05e9b0..dc35564 100644 --- a/src/mozclient/lib/MozClient/Subversion.pm +++ b/src/mozclient/lib/MozClient/Subversion.pm @@ -87,13 +87,13 @@ sub checkout { join " ", @$modules; $self->run_system($cmd); # We drop the 1st directory if there's a mozilla dir inside - if (-d "$out/mozilla") { + if (-d "$out/" . $self->{'MOZCLIENT_MOZDIRNAME'}) { $self->run_shell("mv $out/* $out/.svn ."); $self->run_system("rm -rf $out"); } else { # we name it mozilla as it is what is expected later on - $self->run_system("mv $out mozilla"); + $self->run_system("mv $out " . $self->{'MOZCLIENT_MOZDIRNAME'}); } $self->chdir(".."); } diff --git a/src/mozclient/lib/MozClient/VCS.pm b/src/mozclient/lib/MozClient/VCS.pm index 52525f4..79e5ba1 100644 --- a/src/mozclient/lib/MozClient/VCS.pm +++ b/src/mozclient/lib/MozClient/VCS.pm @@ -278,7 +278,7 @@ sub nobin_cleanup { $self->LOG("MozClient::nobin_cleanup()"); - $self->chdir($self->work_dir . "/mozilla"); + $self->chdir($self->work_dir . "/" . $self->{'MOZCLIENT_MOZDIRNAME'}); my $cmd = sprintf "sh %s > REMOVED+${nobinonly}.txt 2>&1", $self->{'MOZCLIENT_EXCLUDE_SCRIPT'}; $self->run_shell($cmd); @@ -337,7 +337,8 @@ sub pack { } my $version = $tversion; $version .= "+${nobinonly}" - if -f $self->work_dir . "/mozilla/REMOVED+${nobinonly}.txt"; + if -f $self->work_dir . "/" . $self->{'MOZCLIENT_MOZDIRNAME'} . + "/REMOVED+${nobinonly}.txt"; my $cmd = sprintf "rm -rf %s/%s-%s", $self->work_dir, $self->{'MOZCLIENT_APPNAME'}, $version; $self->run_system($cmd); @@ -351,14 +352,14 @@ sub pack { $project =~ s,/.*,,; if ($self->{'MOZCLIENT_WANTMOZDIR'}) { $self->chdir($self->work_dir); - my $cmd = sprintf "tar jcf %s-%s/%s-%s-source.tar.bz2 %s mozilla", + my $cmd = sprintf "tar jcf %s-%s/%s-%s-source.tar.bz2 %s %s", $self->{'MOZCLIENT_APPNAME'}, $version, $project, $tversion, - $tar_exclude; + $tar_exclude, $self->{'MOZCLIENT_MOZDIRNAME'}; $self->run_system($cmd); $self->chdir(".."); } else { # Embedded tarball but without the toplevel mozilla dir - $self->chdir($self->work_dir . "/mozilla"); + $self->chdir($self->work_dir . "/" . $self->{'MOZCLIENT_MOZDIRNAME'}); my $cmd = sprintf "tar jcf ../%s-%s/%s-%s-source.tar.bz2 %s .", $self->{'MOZCLIENT_APPNAME'}, $version, $project, $tversion, $tar_exclude; @@ -367,8 +368,9 @@ sub pack { } } else { - my $cmd = sprintf "mv %s/mozilla %s/%s-%s/", - $self->work_dir, $self->work_dir, $self->{'MOZCLIENT_APPNAME'}, $version; + my $cmd = sprintf "mv %s/%s %s/%s-%s/", + $self->work_dir, $self->{'MOZCLIENT_MOZDIRNAME'}, $self->work_dir, + $self->{'MOZCLIENT_APPNAME'}, $version; $self->run_system("$cmd"); } $self->unlink($self->{'MOZCLIENT_APPNAME'} . "_$version.orig.tar.gz") diff --git a/src/mozclient/mozclient.pl b/src/mozclient/mozclient.pl index f700194..e909ae0 100755 --- a/src/mozclient/mozclient.pl +++ b/src/mozclient/mozclient.pl @@ -53,15 +53,17 @@ my @conf_mandatory = qw(MOZCLIENT_APPNAME MOZCLIENT_FILE MOZCLIENT_GETVERSION my @conf_optional = qw(MOZCLIENT_MODULES MOZCLIENT_PROJECT MOZCLIENT_BRANCH MOZCLIENT_POSTCOCMD MOZCLIENT_EMBEDDED MOZCLIENT_SEPARATOR MOZCLIENT_TAREXCLUDE - MOZCLIENT_WANTMOZDIR MOZCLIENT_WANTPATCH + MOZCLIENT_WANTMOZDIR MOZCLIENT_MOZDIRNAME + MOZCLIENT_WANTPATCH MOZCLIENT_DYNTAG MOZCLIENT_DYNTAG_FILES); my @conf_list = qw(MOZCLIENT_FILE MOZCLIENT_TAREXCLUDE); my $defaults = { 'MOZCLIENT_SEPARATOR' => '~', 'MOZCLIENT_EXCLUDE_SCRIPT' => "$pkg_conf_dir/remove.binonly.sh", - 'MOZILLA_CLIENT' => 'mozilla/client.mk', - 'MOZCLIENT_PATCHES' => "$patches_dir", + 'MOZILLA_CLIENT' => 'mozilla/client.mk', + 'MOZCLIENT_PATCHES' => "$patches_dir", + 'MOZCLIENT_MOZDIRNAME' => 'mozilla', }; sub help { |