my $batch = 0;
my $builddir;
my $build_number;
+my $builder = `hostname`;
+chomp $builder;
GetOptions ("h|help" => \$help,
"binary!" => \$build_binary,
"batch!" => \$batch,
"o|output=s" => \$builddir,
+ "builder=s" => \$builder,
"build-number=i" => \$build_number);
usage () if $help;
our $logfile = "$resultsdir/LOG";
open (LOG, '>', $logfile) or die "creating $logfile failed: $!\n";
-my $build_host = `hostname`;
-chomp $build_host;
-set_var ("build_host", $build_host);
+set_var ("builder", $builder);
set_var ("build_number", $build_number);
our $GIT = "git --git-dir=$topdir/.git";
return $commit;
}
+my $ssw = "spread-sheet-widget-0.1";
if (@ARGV == 2) {
my ($repo, $branch) = @ARGV;
+ my $ssw_tar = "$topdir/$ssw.tar.gz";
+ start_step ("Extract spread-sheet-widget");
+ run ("tar xzf $ssw_tar");
+
+ start_step ("Configure spread-sheet-widget");
+ run ("cd $ssw && ./configure --prefix=''");
+
+ start_step ("Build spread-sheet-widget");
+ run ("cd $ssw && make -j10");
+
+ start_step ("Install spread-sheet-widget");
+ run ("cd $ssw && make -j10 install DESTDIR=\$PWD/inst");
+
start_step ("Fetch branch from Git");
set_var ("git_repo", $repo);
set_var ("git_branch", $branch);
Changes from $repo_version to $version:
* Built from PSPP commit $revision
- in branch $branch on host $build_host.
+ in branch $branch on builder $builder.
* Built from Gnulib commit $gnulib_commit.
# Bootstrap.
start_step ("Bootstrap (make -f Smake)");
- run ("cd pspp && make -f Smake", "bootstrap");
+ run ("cd pspp && make -f Smake -j10", "bootstrap");
# Configure.
start_step ("Configure source");
- run ("cd pspp && mkdir _build && cd _build && ../configure", "configure");
+ run ("cd pspp && mkdir _build && cd _build && ../configure PKG_CONFIG_PATH=\$PWD/../../../source/$ssw/inst/lib/pkgconfig", "configure");
# Distribute.
start_step ("Make source tarball");
# Build user manual
start_step ("Build user manual");
- run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp.texinfo -I doc -o $resultsdir/user-manual --email bug-gnu-pspp\@gnu.org pspp \"GNU PSPP User Manual\"", "user-manual");
+ run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp.texi -I doc -o $resultsdir/user-manual --email bug-gnu-pspp\@gnu.org pspp \"GNU PSPP User Manual\"", "user-manual");
saved_result ("User Manual", "user-manual");
# Build developer's guide
start_step ("Build developers guide");
- run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp-dev.texinfo -I doc -o $resultsdir/dev-guide --email bug-gnu-pspp\@gnu.org pspp-dev \"GNU PSPP Developers Guide\"", "dev-guide");
+ run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp-dev.texi -I doc -o $resultsdir/dev-guide --email bug-gnu-pspp\@gnu.org pspp-dev \"GNU PSPP Developers Guide\"", "dev-guide");
saved_result ("Developers Guide", "dev-guide");
} else {
- $tarball = saved_result ("source distribution", $tarball);
+ start_step ("Starting from $tarball");
}
if ($build_binary) {
my ($version) = `cd $builddir/$tarball_dir && ./configure --version | head -1`
=~ /configure (\S+)$/;
set_var ("dist_version", $version);
- my ($binary_version) = "$version-$build_host-build$build_number";
+ my ($binary_version) = "$version-$builder-build$build_number";
set_var ("binary_version", $binary_version);
start_step ("Configuring");
run ("chmod u+w $builddir/$tarball_dir");
run ("mkdir $builddir/$tarball_dir/_build");
run ("chmod a-w $builddir/$tarball_dir");
- my $ok = try_run ("cd $builddir/$tarball_dir/_build && ../configure --enable-relocatable --prefix=''", "bin-configure");
+ my $ok = try_run ("cd $builddir/$tarball_dir/_build && ../configure --enable-relocatable --prefix='' PKG_CONFIG_PATH=\$PWD/../../../source/$ssw/inst/lib/pkgconfig CPPFLAGS=\"-I\$PWD/../../../source/$ssw/inst/include\" LDFLAGS=\"-L\$PWD/../../../source/$ssw/inst/lib\"", "bin-configure");
for my $basename ("config.h", "config.log") {
save_result_if_exists ("build configuration",
"$builddir/$tarball_dir/_build/$basename");
fail () if !$ok;
start_step ("Build");
- run ("cd $builddir/$tarball_dir/_build && make -j2", "build");
+ run ("cd $builddir/$tarball_dir/_build && make -j10", "build");
start_step ("Install");
run ("cd $builddir/$tarball_dir/_build && make install DESTDIR=\$PWD/pspp-$binary_version", "install");
+ run ("cd ../source/$ssw && make -j10 install DESTDIR=$builddir/$tarball_dir/_build/pspp-$binary_version");
start_step ("Make binary distribution");
run ("cd $builddir/$tarball_dir/_build && tar cfz pspp-$binary_version.tar.gz pspp-$binary_version");
fail () if !$ok;
start_step ("Uninstall");
+ run ("cd ../source/$ssw && make -j10 uninstall DESTDIR=$builddir/$tarball_dir/_build/pspp-$binary_version");
run ("cd $builddir/$tarball_dir/_build && make uninstall DESTDIR=\$PWD/pspp-$binary_version", "uninstall");
start_step ("Check uninstall");