Skip to content

Commit

Permalink
Manually implement #98
Browse files Browse the repository at this point in the history
  • Loading branch information
Rockstar04 committed Jul 31, 2015
1 parent 7d0c0ad commit a017496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
default['php']['fpm_user'] = 'nobody'
default['php']['fpm_group'] = 'nobody'
default['php']['ext_dir'] = "/usr/#{lib_dir}/php/modules"
default['php']['src_deps'] = %w(bzip2-devel libc-client-devel curl-devel freetype-devel gmp-devel libjpeg-devel krb5-devel libmcrypt-devel libpng-devel openssl-devel t1lib-devel mhash-devel)
if node['platform_version'].to_f < 6
default['php']['packages'] = %w(php53 php53-devel php53-cli php-pear)
default['php']['mysql']['package'] = 'php53-mysql'
Expand Down Expand Up @@ -61,6 +62,7 @@
else
default['php']['ext_conf_dir'] = '/etc/php5/conf.d'
end
default['php']['src_deps'] = %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev)
default['php']['packages'] = %w(php5-cgi php5 php5-dev php5-cli php-pear)
default['php']['mysql']['package'] = 'php5-mysql'
default['php']['fpm_package'] = 'php5-fpm'
Expand All @@ -72,6 +74,7 @@
when 'suse'
default['php']['conf_dir'] = '/etc/php5/cli'
default['php']['ext_conf_dir'] = '/etc/php5/conf.d'
default['php']['src_deps'] = %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev)
default['php']['fpm_user'] = 'wwwrun'
default['php']['fpm_group'] = 'www'
default['php']['packages'] = %w(apache2-mod_php5 php5-pear)
Expand Down Expand Up @@ -99,13 +102,15 @@
when 'freebsd'
default['php']['conf_dir'] = '/usr/local/etc'
default['php']['ext_conf_dir'] = '/usr/local/etc/php'
default['php']['src_deps'] = %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev)
default['php']['fpm_user'] = 'www'
default['php']['fpm_group'] = 'www'
default['php']['packages'] = %w( php56 pear )
default['php']['mysql']['package'] = 'php56-mysqli'
else
default['php']['conf_dir'] = '/etc/php5/cli'
default['php']['ext_conf_dir'] = '/etc/php5/conf.d'
default['php']['src_deps'] = %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev)
default['php']['fpm_user'] = 'www-data'
default['php']['fpm_group'] = 'www-data'
default['php']['packages'] = %w(php5-cgi php5 php5-dev php5-cli php-pear)
Expand Down
8 changes: 1 addition & 7 deletions recipes/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@
only_if { configure_options =~ /mysql/ }
end

pkgs = value_for_platform_family(
%w(rhel fedora) => %w(bzip2-devel libc-client-devel curl-devel freetype-devel gmp-devel libjpeg-devel krb5-devel libmcrypt-devel libpng-devel openssl-devel t1lib-devel mhash-devel),
%w(debian ubuntu) => %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev),
'default' => %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev)
)

pkgs.each do |pkg|
node['php']['src_deps'].each do |pkg|
package pkg do
action :install
end
Expand Down

0 comments on commit a017496

Please sign in to comment.