Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions manifests/module.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@

include '::php::params'

# Manage the incorrect named php-apc package under Debians
# Manage naming issue of pecl installed packages on RHEL
if ($title == 'apc') {
$package = $::php::params::php_apc_package_name
} else {
}
elsif ($title == 'memcache') {
$package = $::php::params::php_memcache_package_name
}
else {
# Hack to get pkg prefixes to work, i.e. php56-mcrypt title
$package = $title ? {
/^php/ => $title,
Expand Down
9 changes: 7 additions & 2 deletions manifests/module/ini.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@
# Strip 'pecl-*' prefix is present, since .ini files don't have it
$modname = regsubst($title , '^pecl-', '', 'G')

# Handle naming issue of php-apc package on Debian
# Handle naming issue of pecl installed packages on RHEL
if ($modname == 'apc' and $pkgname == false) {
# Package name
$ospkgname = $::php::params::php_apc_package_name
} else {
}
elsif ($modname == 'memcache' and $pkgname == false) {
# Package name
$ospkgname = $::php::params::php_memcache_package_name
}
else {
# Package name
$ospkgname = $pkgname ? {
/^php/ => "${pkgname}",
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
'Debian': {
$php_package_name = 'php5'
$php_apc_package_name = 'php-apc'
$php_memcache_package_name = 'php-memcache'
$common_package_name = 'php5-common'
$cli_package_name = 'php5-cli'
$php_conf_dir = '/etc/php5/conf.d'
Expand All @@ -19,6 +20,7 @@
default: {
$php_package_name = 'php'
$php_apc_package_name = 'php-pecl-apc'
$php_memcache_package_name = 'php-pecl-memcache'
$common_package_name = 'php-common'
$cli_package_name = 'php-cli'
$php_conf_dir = '/etc/php.d'
Expand Down