Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Adding "Mailparse" extension #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
17 changes: 17 additions & 0 deletions docs/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ Class name: ``php::extension::ldap``.

* ``$inifile`` defaults to ``${php::params::config_root_ini}/ldap.ini``

mailparse
--------

.. note::

The package requires the ``build-essential`` and ``php5-dev`` system packages.

Class name: ``php::extension::mailparse``.

* ``$package`` defaults to ``mailparse``

* ``$provider`` defaults to ``pecl``

* ``$inifile`` defaults to ``${php::params::config_root_ini}/mailparse.ini``

* ``$settings`` defaults to ``['set ".anon/extension" "mailparse.so"']``

mcrypt
------

Expand Down
60 changes: 60 additions & 0 deletions manifests/extension/mailparse.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# == Class: php::extension::mailparse
#
# Install and configure the mailparse PHP extension
#
# === Parameters
#
# [*ensure*]
# The version of the package to install
# Could be "latest", "installed" or a pinned version
# This matches "ensure" from Package
#
# [*package*]
# The package name in your provider
#
# [*provider*]
# The provider used to install the package
#
# [*inifile*]
# The path to the extension ini file
#
# [*settings*]
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# === Variables
#
# No variables
#
# === Examples
#
# include php::extension::mailparse
#
# === Authors
#
# Christian "Jippi" Winther <[email protected]>
#
# === Copyright
#
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
#
class php::extension::mailparse(
$ensure = $php::extension::mailparse::params::ensure,
$package = $php::extension::mailparse::params::package,
$provider = $php::extension::mailparse::params::provider,
$inifile = $php::extension::mailparse::params::inifile,
$settings = $php::extension::mailparse::params::settings
) inherits php::extension::mailparse::params {

php::extension { 'mailparse':
ensure => $ensure,
package => $package,
provider => $provider
}

php::config { 'php-extension-mailparse':
file => $inifile,
config => $settings
}

}
51 changes: 51 additions & 0 deletions manifests/extension/mailparse/params.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# == Class: php::extension::mailparse::params
#
# Defaults file for the mailparse PHP extension
#
# === Parameters
#
# No parameters
#
# === Variables
#
# [*ensure*]
# The version of the package to install
# Could be "latest", "installed" or a pinned version
# This matches "ensure" from Package
#
# [*package*]
# The package name in your provider
#
# [*provider*]
# The provider used to install the package
#
# [*inifile*]
# The path to the extension ini file
#
# [*settings*]
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# === Examples
#
# No examples
#
# === Authors
#
# Christian "Jippi" Winther <[email protected]>
#
# === Copyright
#
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
#
class php::extension::mailparse::params {

$ensure = $php::params::ensure
$package = 'mailparse'
$provider = 'pecl'
$inifile = "${php::params::config_root_ini}/mailparse.ini"
$settings = [
'set ".anon/extension" "mailparse.so"'
]

}