Skip to content

Instantly share code, notes, and snippets.

@justincaldwell
Created June 25, 2013 18:59
Show Gist options
  • Save justincaldwell/5861315 to your computer and use it in GitHub Desktop.
Save justincaldwell/5861315 to your computer and use it in GitHub Desktop.
libharu chef recipe cookbook: libharu
package 'build-essential'
package 'libpng-dev'
package 'libtool'
package 'automake'
tar_file = "libharu.tar.gz"
remote_file "/opt/#{tar_file}" do
source "https://github.com/libharu/libharu/tarball/master/#{tar_file}"
end
execute "Extract #{tar_file}" do
cwd '/opt'
command <<-COMMAND
rm -rf libharu && \
mkdir libharu && \
tar zxf #{tar_file} -C libharu --strip-components 1
COMMAND
creates "/opt/libharu/buildconf.sh"
end
execute "compile libharu" do
cwd '/opt/libharu'
command <<-COMMAND
./buildconf.sh --force && \
./configure && \
make && make install
COMMAND
creates "/usr/local/lib/libhpdf.a"
end
execute "create ruby libharu so" do
cwd '/opt/libharu/if/ruby'
command "ruby extconf.rb && make install && ldconfig"
creates "/usr/local/lib/site_ruby/1.9.1/x86_64-linux/hpdf.so"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment