1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'manifests/extra/phpmd/install.pp', line 1
class php::extra::phpmd::install inherits php::extra::pear
{
$packages = 'php::extra::phpmd::dependencies'
if !defined(Package[$packages]) {
package {$packages:
ensure => present,
name => 'php5-imagick',
}
}
exec {'php::extra::phpmd::step-1':
command => "pear channel-discover pear.phpmd.org",
path => "/usr/bin",
returns => ['0','1'],
require => [
Class['php::extra::pear'],
Package[$packages],
],
before => Exec['php::extra::phpmd::step-2'],
}
exec {'php::extra::phpmd::step-2':
command => "pear channel-discover pear.pdepend.org",
path => "/usr/bin",
returns => ['0','1'],
require => [
Class['php::extra::pear'],
Package[$packages],
],
before => Exec['php::extra::phpmd::step-3'],
}
exec {'php::extra::phpmd::step-3':
command => 'pear install --alldeps phpmd/PHP_PMD',
path => '/usr/bin',
onlyif => 'test ! -f /usr/bin/phpmd',
require => [
Package[$packages],
Class['php::extra::pear'],
],
}
}
|