Skip to content

Commit 80e9279

Browse files
authored
Merge pull request #552 from oxc/freebsd_prefix
Improve package prefix selection on FreeBSD
2 parents 691df11 + 3e011b9 commit 80e9279

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

manifests/globals.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@
144144
}
145145
}
146146
'FreeBSD': {
147+
case $globals_php_version {
148+
/^(\d)\.(\d)$/: {
149+
$package_prefix = "php${1}${2}-"
150+
}
151+
default: {
152+
$package_prefix = 'php56-'
153+
}
154+
}
147155
$default_config_root = '/usr/local/etc'
148156
$default_fpm_pid_file = '/var/run/php-fpm.pid'
149157
$fpm_service_name = undef

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
$fpm_group = 'www'
180180
$embedded_package_suffix = 'embed'
181181
$embedded_inifile = "${config_root}/php-embed.ini"
182-
$package_prefix = 'php56-'
182+
$package_prefix = $php::globals::package_prefix
183183
$compiler_packages = ['gcc']
184184
$manage_repos = false
185185
$root_group = 'wheel'

manifests/pear.pp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
# even though others are called 'php5-fpm' or 'php5-dev'
3434
$package_name = "php-${php::params::pear_package_suffix}"
3535
}
36-
'FreeBSD': {
37-
# On FreeBSD the package name is just 'pear'.
38-
$package_name = $php::params::pear_package_suffix
39-
}
4036
default: {
4137
# This is the default for all other architectures
4238
$package_name = "${php::package_prefix}${php::params::pear_package_suffix}"

0 commit comments

Comments
 (0)