From 070fe43d5225b97b9c4e5e0354d97efb88ad0e82 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 25 Jul 2013 23:13:05 -0700 Subject: [PATCH] - added vagrant based build along with documentation --- .gitignore | 4 +++- README.md | 16 ++++++++++++++++ Vagrantfile | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index 506b1b1..85c3707 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ debian/files debian/apt-transport-s3 debian/apt-transport-s3.substvars debian/apt-transport-s3.debhelper.log -*~ \ No newline at end of file +*~ +*.deb +.vagrant diff --git a/README.md b/README.md index 42e5e88..b012ccc 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,22 @@ Before building this project on Ubuntu (tested on 11.10) you will need to instal To build this project you simply run `make`. It will produce a binary named `s3` under the `src/` dir. +## Building via Vagrant (Ubuntu 12.04 precise) + +If you'd like to build the linux binaries and you're on say a Mac, you can build the binaries via Vagrant. Once you have vagrant installed, http://vagrantup.com/, you can execute the following: + +``` +vagrant up +``` + +This will stand up a new vm, install the necessary dependencies, compile the binary, create the debian package, and place the debian package in the debian package, same as the Makefile would. + +To stop the vagrant image after you're done, you can call + +``` +vagrant destroy +``` + ## Installing Once compiled, the resulting s3 binary must be placed in /usr/lib/apt/methods/ along with the other protocol binaries. diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..0bdf1a1 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,15 @@ +Vagrant.configure("2") do |config| + config.vm.box = "precise64" + config.vm.box_url = "http://files.vagrantup.com/precise64.box" + + config.vm.network :public_network + + config.vm.provision :shell, :inline => "apt-get update" + config.vm.provision :shell, :inline => "apt-get install -y libapt-pkg-dev libcurl4-openssl-dev debhelper cdbs" + config.vm.provision :shell, :inline => "apt-get install -y build-essential" + config.vm.provision :shell, :inline => "cp -r /vagrant apt-s3 ; (cd apt-s3 ; make ; make deb)" + config.vm.provision :shell, :inline => "cp *.deb /vagrant/debian" + + config.vm.provider :virtualbox do |vb| + end +end