Update more cookbooks
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Cookbook:: php
|
||||
# Recipe:: package
|
||||
#
|
||||
# Copyright:: 2013-2016, Chef Software, Inc.
|
||||
# Copyright:: 2013-2017, 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.
|
||||
@@ -19,45 +19,13 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform?('windows')
|
||||
|
||||
include_recipe 'iis::mod_cgi'
|
||||
|
||||
install_dir = File.expand_path(node['php']['conf_dir']).tr('/', '\\')
|
||||
windows_package node['php']['windows']['msi_name'] do
|
||||
source node['php']['windows']['msi_source']
|
||||
installer_type :msi
|
||||
|
||||
options %W(
|
||||
/quiet
|
||||
INSTALLDIR="#{install_dir}"
|
||||
ADDLOCAL=#{node['php']['packages'].join(',')}
|
||||
).join(' ')
|
||||
if platform_family?('rhel', 'debian', 'amazon', 'suse')
|
||||
package node['php']['packages'] do
|
||||
options node['php']['package_options']
|
||||
end
|
||||
|
||||
# WARNING: This is not the out-of-the-box go-pear.phar. It's been modified to patch this bug:
|
||||
# http://pear.php.net/bugs/bug.php?id=16644
|
||||
cookbook_file "#{node['php']['conf_dir']}/PEAR/go-pear.phar" do
|
||||
source 'go-pear.phar'
|
||||
end
|
||||
|
||||
template "#{node['php']['conf_dir']}/pear-options" do
|
||||
source 'pear-options.erb'
|
||||
end
|
||||
|
||||
execute 'install-pear' do
|
||||
cwd node['php']['conf_dir']
|
||||
command 'go-pear.bat < pear-options'
|
||||
creates "#{node['php']['conf_dir']}/pear.bat"
|
||||
end
|
||||
|
||||
ENV['PATH'] += ";#{install_dir}"
|
||||
windows_path install_dir
|
||||
|
||||
else
|
||||
node['php']['packages'].each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
options node['php']['package_options']
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user