Skip to content

Commit

Permalink
Fix for imagick issues upon pdepend installation
Browse files Browse the repository at this point in the history
  • Loading branch information
djoos committed Aug 4, 2015
1 parent 26c9e88 commit ea6d788
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ driver_config:
require_chef_omnibus: true

platforms:
# - name: ubuntu-12.04
# driver_config:
# box: opscode-ubuntu-12.04
# box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
- name: ubuntu-13.04
driver_config:
box: opscode-ubuntu-13.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-13.04_provisionerless.box
- name: ubuntu-14.04

suites:
- name: default
run_list:
- recipe[pdepend::default]
- name: pear
run_list:
- recipe[pdepend::default]
attributes:
pdepend:
install_method: pear
- name: composer
run_list:
- recipe[pdepend::default]
attributes:
pdepend:
install_method: composer
- name: phar
run_list:
- recipe[pdepend::default]
attributes:
pdepend:
install_method: phar
28 changes: 28 additions & 0 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Cookbook Name:: pdepend
# Library:: helpers
#
# Copyright 2013-2015, Escape Studios
#

# PDEPEND module
module PDEPEND
# helpers module
module Helpers
# Returns an array of package names that will install pdepend on a node.
# Package names returned are determined by the platform running this recipe.
def pdepend_prerequisite_packages
value_for_platform(
'default' => ['libmagickwand-dev', 'libmagickcore-dev']
)
end
end
end

# Chef class
class Chef
# Recipe class
class Recipe
include PDEPEND::Helpers
end
end
6 changes: 6 additions & 0 deletions recipes/pear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

include_recipe 'php'

pdepend_prerequisite_packages.each do |pkg|
package pkg do
action :install
end
end

# PHP Extension and Application Repository PEAR channel
php_pear_channel 'pear.php.net' do
action :update
Expand Down

0 comments on commit ea6d788

Please sign in to comment.