Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
@@ -30,4 +30,4 @@ php_pear_channel 'pecl.php.net' do
|
||||
action :update
|
||||
end
|
||||
|
||||
include_recipe "php::ini"
|
||||
include_recipe 'php::ini'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: ini
|
||||
#
|
||||
# Copyright 2011, Opscode, Inc.
|
||||
# Copyright 2011-2014, 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,12 +19,12 @@
|
||||
#
|
||||
|
||||
template "#{node['php']['conf_dir']}/php.ini" do
|
||||
source node['php']['ini']['template']
|
||||
cookbook node['php']['ini']['cookbook']
|
||||
unless platform?('windows')
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '0644'
|
||||
end
|
||||
variables(:directives => node['php']['directives'])
|
||||
source node['php']['ini']['template']
|
||||
cookbook node['php']['ini']['cookbook']
|
||||
unless platform?('windows')
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
variables(:directives => node['php']['directives'])
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_apc
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora'
|
||||
%w{ httpd-devel pcre pcre-devel }.each do |pkg|
|
||||
%w(httpd-devel pcre pcre-devel).each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_curl
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_fpdf
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_gd
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
@@ -24,6 +24,9 @@ pkg = value_for_platform(
|
||||
el5_range => 'php53-gd',
|
||||
'default' => 'php-gd'
|
||||
},
|
||||
'freebsd' => {
|
||||
'default' => 'php56-gd'
|
||||
},
|
||||
'default' => 'php5-gd'
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_ldap
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_memcache
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora'
|
||||
%w{ zlib-devel }.each do |pkg|
|
||||
%w(zlib-devel).each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_mysql
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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,14 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
pkg = value_for_platform(
|
||||
%w(centos redhat scientific fedora amazon oracle) => {
|
||||
el5_range => 'php53-mysql',
|
||||
'default' => 'php-mysql'
|
||||
},
|
||||
'default' => 'php5-mysql'
|
||||
)
|
||||
|
||||
package pkg do
|
||||
package node['php']['mysql']['package'] do
|
||||
action :install
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_pgsql
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Joshua Timberman (<joshua@getchef.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: module_sqlite3
|
||||
#
|
||||
# Copyright 2009-2011, Opscode, Inc.
|
||||
# Copyright 2009-2014, 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.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Lucas Hansen (<lucash@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Author:: Lucas Hansen (<lucash@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: package
|
||||
#
|
||||
# Copyright 2013, Opscode, Inc.
|
||||
# Copyright 2013-2014, 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.
|
||||
@@ -28,11 +28,11 @@ if platform?('windows')
|
||||
source node['php']['windows']['msi_source']
|
||||
installer_type :msi
|
||||
|
||||
options %W[
|
||||
/quiet
|
||||
INSTALLDIR="#{install_dir}"
|
||||
ADDLOCAL=#{node['php']['packages'].join(',')}
|
||||
].join(' ')
|
||||
options %W(
|
||||
/quiet
|
||||
INSTALLDIR="#{install_dir}"
|
||||
ADDLOCAL=#{node['php']['packages'].join(',')}
|
||||
).join(' ')
|
||||
end
|
||||
|
||||
# WARNING: This is not the out-of-the-box go-pear.phar. It's been modified to patch this bug:
|
||||
@@ -63,4 +63,4 @@ else
|
||||
end
|
||||
end
|
||||
|
||||
include_recipe "php::ini"
|
||||
include_recipe 'php::ini'
|
||||
|
||||
51
cookbooks/php/recipes/recompile.rb
Normal file
51
cookbooks/php/recipes/recompile.rb
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# Author:: David Kinzer (<dtkinzer@gmail.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: recompile
|
||||
#
|
||||
# Copyright 2014, David Kinzer
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
version = node['php']['version']
|
||||
configure_options = node['php']['configure_options'].join(' ')
|
||||
ext_dir_prefix = node['php']['ext_dir'] ? "EXTENSION_DIR=#{node['php']['ext_dir']}" : ''
|
||||
|
||||
node['php']['src_deps'].each do |pkg|
|
||||
package pkg do
|
||||
action 'install'
|
||||
end
|
||||
end
|
||||
|
||||
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'
|
||||
action 'create_if_missing'
|
||||
end
|
||||
|
||||
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
|
||||
(make clean)
|
||||
(#{ext_dir_prefix} ./configure #{configure_options})
|
||||
(make && make install)
|
||||
EOF
|
||||
end
|
||||
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Author:: Seth Chisamore (<schisamo@getchef.com>)
|
||||
# Cookbook Name:: php
|
||||
# Recipe:: package
|
||||
#
|
||||
# Copyright 2011, Opscode, Inc.
|
||||
# Copyright 2011-2014, 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.
|
||||
@@ -22,16 +22,14 @@ configure_options = node['php']['configure_options'].join(' ')
|
||||
|
||||
include_recipe 'build-essential'
|
||||
include_recipe 'xml'
|
||||
include_recipe 'mysql::client' if configure_options =~ /mysql/
|
||||
include_recipe 'yum-epel' if node['platform_family'] == 'rhel'
|
||||
|
||||
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 }
|
||||
)
|
||||
mysql_client 'default' do
|
||||
action :create
|
||||
only_if { configure_options =~ /mysql/ }
|
||||
end
|
||||
|
||||
pkgs.each do |pkg|
|
||||
node['php']['src_deps'].each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
end
|
||||
@@ -82,4 +80,4 @@ directory node['php']['ext_conf_dir'] do
|
||||
recursive true
|
||||
end
|
||||
|
||||
include_recipe "php::ini"
|
||||
include_recipe 'php::ini'
|
||||
|
||||
Reference in New Issue
Block a user