Update cookbooks for Ubuntu 16.04 TLS
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: package
|
||||
# Author:: Seth Chisamore (<schisamo@chef.io>)
|
||||
# Cookbook:: php
|
||||
# Recipe:: source
|
||||
#
|
||||
# Copyright 2011-2014, Chef Software, Inc.
|
||||
# Copyright:: 2011-2016, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -29,11 +29,7 @@ mysql_client 'default' do
|
||||
only_if { configure_options =~ /mysql/ }
|
||||
end
|
||||
|
||||
node['php']['src_deps'].each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
end
|
||||
end
|
||||
package node['php']['src_deps']
|
||||
|
||||
version = node['php']['version']
|
||||
|
||||
@@ -41,7 +37,7 @@ remote_file "#{Chef::Config[:file_cache_path]}/php-#{version}.tar.gz" do
|
||||
source "#{node['php']['url']}/php-#{version}.tar.gz/from/this/mirror"
|
||||
checksum node['php']['checksum']
|
||||
mode '0644'
|
||||
not_if "which #{node['php']['bin']}"
|
||||
not_if "$(which #{node['php']['bin']}) --version | grep #{version}"
|
||||
end
|
||||
|
||||
if node['php']['ext_dir']
|
||||
@@ -56,14 +52,21 @@ else
|
||||
ext_dir_prefix = ''
|
||||
end
|
||||
|
||||
# PHP is unable to find the GMP library in 16.04. The symlink brings the file
|
||||
# inside of the include libraries.
|
||||
link '/usr/include/gmp.h' do
|
||||
to '/usr/include/x86_64-linux-gnu/gmp.h'
|
||||
only_if { node['platform_family'] == 'debian' && node['platform_version'].to_f >= 14.04 }
|
||||
end
|
||||
|
||||
bash 'build php' do
|
||||
cwd Chef::Config[:file_cache_path]
|
||||
code <<-EOF
|
||||
tar -zxf php-#{version}.tar.gz
|
||||
(cd php-#{version} && #{ext_dir_prefix} ./configure #{configure_options})
|
||||
(cd php-#{version} && make && make install)
|
||||
(cd php-#{version} && make -j #{node['cpu']['total']} && make install)
|
||||
EOF
|
||||
not_if "which #{node['php']['bin']}"
|
||||
not_if "$(which #{node['php']['bin']}) --version | grep #{version}"
|
||||
end
|
||||
|
||||
directory node['php']['conf_dir'] do
|
||||
|
||||
Reference in New Issue
Block a user