-
Notifications
You must be signed in to change notification settings - Fork 361
Building Release Binaries
The psol/
directory includes just the parts of mod_pagespeed we need in order to build. By preparing it for people we can let others build with a much simpler flow.
First, start a new branch to work in.
To build new binaries, get two virtual machines (32bit and 64bit) running old versions of linux. I'm using ubuntu v8. Because binaries are forward compatible but not backward compatible, we need to be building on a system with a toolchain at least as old as the one someone might use to try and build against.
On each VM, follow the build process, complex version, though the step of building pagespeed_automatic.a
. If you've already done this, and are just updating for a new release of binaries, you can follow a simpler process:
$ cd mod_pagespeed/src/
$ svn up -rXXXX
$ export PATH=$PATH:~/bin/depot_tools
$ gclient runhooks
$ make AR.host="$PWD/build/wrappers/ar.sh" \
AR.target="$PWD/build/wrappers/ar.sh" \
BUILDTYPE=Release \
mod_pagespeed_test pagespeed_automatic_test && \
cd ~/mod_pagespeed/src/net/instaweb/automatic && \
make AR.host="$PWD/../../../build/wrappers/ar.sh" \
AR.target="$PWD/../../../build/wrappers/ar.sh" \
all
Then run a bunch of scps:
for library in
net/instaweb/automatic/pagespeed_automatic.a
out/Release/obj.target/third_party/serf/libserf.a
out/Release/obj.target/third_party/apr/libapr.a
out/Release/obj.target/third_party/aprutil/libaprutil.a
do scp hostname-32-bit:mod_pagespeed/src/$library lib/Release/linux/ia32/
done
Then repeat to copy from hostname-64-bit
to linux/x64
.
Then on each VM, start over to make Debug builds. This is:
$ cd ~/mod_pagespeed/src/net/instaweb/automatic
$ make clean
$ cd ~/mod_pagespeed/src
Then run make
again, as in the build doc, but with BUILDTYPE=Debug
. Continue with the doc from there, and when you build in net/instaweb/automatic
you still don't need a BUILDTYPE
argument to make all
.
Run the same scps again, this time to lib/Debug/...
.
Update lib/Release/linux/ia32/README
and the other three readmes (Debug, 64 bit). The contents should be self evident.
Commit this to your branch with a message like "updating binaries against svn release rXXXX".
Now we need to update the headers. There's a script for this, scripts/copy_includes.sh
:
$ cd ~/ngx_pagespeed
$ scripts/copy_includes.sh /path/to/mod_pagespeed/src
It should tell you what to do.
When you're happy, submit a pull request to merge your branch in.