Skip to content

Commit

Permalink
Separate unpacking and building.
Browse files Browse the repository at this point in the history
In case PHP source has already been unpacked in a previous instance
there is no need to unpack it again.
  • Loading branch information
dkinzer committed Nov 14, 2014
1 parent d7500bc commit 0b63953
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions recipes/recompile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@
action 'create_if_missing'
end

bash 're-build php' do
bash 'un-pack php' do
cwd Chef::Config[:file_cache_path]
code "tar -zxf php-#{version}.tar.gz"
creates "#{node['php']['url']}/php-#{version}"
end

bash 're-build php' do
cwd "#{Chef::Config[:file_cache_path]}/php-#{version}"
code <<-EOF
tar -zxf php-#{version}.tar.gz
(cd php-#{version} && make clean)
(cd php-#{version} && #{ext_dir_prefix} ./configure #{configure_options})
(cd php-#{version} && make && make install)
(make clean)
(#{ext_dir_prefix} ./configure #{configure_options})
(make && make install)
EOF
end

0 comments on commit 0b63953

Please sign in to comment.