diff --git a/recipes/module_dev.rb b/recipes/module_dev.rb index d3e7609..95d2750 100755 --- a/recipes/module_dev.rb +++ b/recipes/module_dev.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-devel } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-devel } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-devel } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-devel } diff --git a/recipes/module_gd.rb b/recipes/module_gd.rb index 8efd2cd..82f445f 100644 --- a/recipes/module_gd.rb +++ b/recipes/module_gd.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-gd } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-gd } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-gd } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-gd } diff --git a/recipes/module_imagick.rb b/recipes/module_imagick.rb index 4a9551e..677689c 100755 --- a/recipes/module_imagick.rb +++ b/recipes/module_imagick.rb @@ -18,7 +18,12 @@ # include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" + +if node['php']['ius'] == "5.6" + packages = %w{ php56u-pecl-imagick } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-pecl-imagick } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-imagick } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-pecl-imagick } diff --git a/recipes/module_intl.rb b/recipes/module_intl.rb index 926c354..68b389b 100755 --- a/recipes/module_intl.rb +++ b/recipes/module_intl.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-intl } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-intl } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-intl } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-intl } diff --git a/recipes/module_mbstring.rb b/recipes/module_mbstring.rb index 481af58..15aa3ec 100755 --- a/recipes/module_mbstring.rb +++ b/recipes/module_mbstring.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mbstring } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-mbstring } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mbstring } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mbstring } diff --git a/recipes/module_mcrypt.rb b/recipes/module_mcrypt.rb index e6a8ac8..36e5474 100755 --- a/recipes/module_mcrypt.rb +++ b/recipes/module_mcrypt.rb @@ -17,9 +17,15 @@ # limitations under the License. # + + include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mcrypt } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-mcrypt } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mcrypt } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mcrypt } @@ -42,6 +48,8 @@ end end -template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do - mode "0644" +if not ["5.5", "5.6"].include?(node['php']['ius']) + template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do + mode "0644" + end end diff --git a/recipes/module_memcache.rb b/recipes/module_memcache.rb index 6c19cc7..1671f02 100644 --- a/recipes/module_memcache.rb +++ b/recipes/module_memcache.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-pecl-memcache } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-pecl-memcache } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-memcache } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-pecl-memcache } diff --git a/recipes/module_mysql.rb b/recipes/module_mysql.rb index 32d36af..bf49bd8 100644 --- a/recipes/module_mysql.rb +++ b/recipes/module_mysql.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mysqlnd } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-mysqlnd } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mysql } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mysql } diff --git a/recipes/module_soap.rb b/recipes/module_soap.rb index 936255e..0a33933 100755 --- a/recipes/module_soap.rb +++ b/recipes/module_soap.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-soap } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-soap } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-soap } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-soap } diff --git a/recipes/module_xml.rb b/recipes/module_xml.rb index 8fd2568..8fbe1f1 100755 --- a/recipes/module_xml.rb +++ b/recipes/module_xml.rb @@ -19,7 +19,11 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-xml } +elsif node['php']['ius'] == "5.5" + packages = %w{ php55u-xml } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-xml } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-xml } diff --git a/recipes/package.rb b/recipes/package.rb index 8e2e92e..0e8882b 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -2,7 +2,11 @@ include_recipe "yum::ius" end -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.6" + centos_packages = %w{ php56u php56u-devel php56u-cli php56u-pear } +elsif node['php']['ius'] == "5.5" + centos_packages = %w{ php55u php55u-devel php55u-cli php55u-pear } +elsif node['php']['ius'] == "5.4" centos_packages = %w{ php54 php54-devel php54-cli php54-pear } elsif node['php']['ius'] == "5.3" centos_packages = %w{ php53u php53u-devel php53u-cli php53u-pear } diff --git a/recipes/xdebug.rb b/recipes/xdebug.rb index c75270a..9b70a25 100755 --- a/recipes/xdebug.rb +++ b/recipes/xdebug.rb @@ -17,24 +17,37 @@ # limitations under the License. # -# Needed for phpize, which pecl needs -include_recipe "chef-php-extra::module_dev" +use_pear = false -# php_pear "xdebug" do -# action :install -# end +case node['php']['ius'] + when '5.6' then package 'php56u-xdebug' + when '5.5' then package 'php55u-xdebug' + when '5.4' then use_pear = true + when '5.3' then use_pear = true + else + use_pear = true +end + +if use_pear + # Needed for phpize, which pecl needs + include_recipe "chef-php-extra::module_dev" + + # php_pear "xdebug" do + # action :install + # end -if platform?(%w{debian ubuntu}) - package "php5-xdebug" -elsif platform?(%w{centos redhat fedora amazon scientific}) - php_pear "xdebug" do - action :install + if platform?(%w{debian ubuntu}) + package "php5-xdebug" + elsif platform?(%w{centos redhat fedora amazon scientific}) + php_pear "xdebug" do + action :install + end end -end -template "#{node['php']['ext_conf_dir']}/xdebug.ini" do - mode "0644" - variables( - :params => node['xdebug'] - ) + template "#{node['php']['ext_conf_dir']}/xdebug.ini" do + mode "0644" + variables( + :params => node['xdebug'] + ) + end end