Setup Vagrant to build Linux packages on CentOS 5.

The goal is to use old glibc so that it can reach more audience (in
particular, RHEL and CentOS users).

Also, we don't compress the executable (using UPX) so that it can be
inspected with ldd. Bonus: no more decompression overhead, faster
startup.

http://code.google.com/p/phantomjs/issues/detail?id=963
1.9
Ariya Hidayat 2013-01-05 00:04:25 -08:00
parent aa907343b9
commit 69bf72bca7
2 changed files with 36 additions and 3 deletions

14
deploy/Vagrantfile vendored
View File

@ -9,11 +9,23 @@ end
Vagrant::Config.run do |config|
config.vm.define :i686 do |c|
c.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-centos-5.8-i386.box"
c.vm.box = "centos_58_32bit"
c.vm.customize ["modifyvm", :id, "--ostype", "RedHat"]
end
config.vm.define :x86_64 do |c|
c.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-centos-5.8.box"
c.vm.box = "centos_58_64bit"
c.vm.customize ["modifyvm", :id, "--ostype", "RedHat_64"]
end
config.vm.define :lucid32 do |c|
c.vm.box_url = "http://files.vagrantup.com/lucid32.box"
c.vm.box = "lucid32"
end
config.vm.define :x86_64 do |c|
config.vm.define :lucid64 do |c|
c.vm.box_url = "http://files.vagrantup.com/lucid64.box"
c.vm.box = "lucid64"
end

View File

@ -1,7 +1,28 @@
#!/usr/bin/env bash
apt-get update
apt-get install -y build-essential git-core libssl-dev libfontconfig1-dev gdb binutils-gold upx-ucl
export PATH=$HOME/git/bin:$PATH
if type apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y build-essential git-core libssl-dev libfontconfig1-dev gdb binutils-gold
fi
if type yum >/dev/null 2>&1; then
yum -y update
yum -y install gcc gcc-c++ make openssl-devel freetype-devel fontconfig-devel
if type git >/dev/null 2>&1; then
echo "Git is already available."
else
yum -y install cpio expat-devel gettext-devel zlib-devel
echo "Downloading and building git..."
rm -rf git-*
wget -nv https://git-core.googlecode.com/files/git-1.8.0.3.tar.gz
tar -xzvf git-1.8.0.3.tar.gz
cd git-1.8.0.3
./configure --prefix=$HOME/git && make -j2 && make install
sleep 3
fi
fi
if [[ ! -d phantomjs ]]; then
git clone git://github.com/ariya/phantomjs.git