system-config/modules/etherpad_lite/manifests/buildsource.pp
Matthew Wagoner 7390450969 Cleanup etherpad_lite manifest lint errors.
Also, seperate out the buildsource defined resource from init.pp

Change-Id: I9fe46ad31943f667ebe8bb6b01a2007e0b3cf022
Reviewed-on: https://review.openstack.org/15061
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-11-17 01:30:36 +00:00

39 lines
864 B
Puppet

# == Define: buildsource
#
# define to build from source using ./configure && make && make install.
#
define etherpad_lite::buildsource(
$dir = $title,
$user = 'root',
$timeout = 300,
$creates = '/nonexistant/file'
) {
exec { "./configure in ${dir}":
command => './configure',
path => "/usr/bin:/bin:/usr/local/bin:${dir}",
user => $user,
cwd => $dir,
creates => $creates,
before => exec["make in ${dir}"],
}
exec { "make in ${dir}":
command => 'make',
path => '/usr/bin:/bin',
user => $user,
cwd => $dir,
timeout => $timeout,
creates => $creates,
before => exec["make install in ${dir}"],
}
exec { "make install in ${dir}":
command => 'make install',
path => '/usr/bin:/bin',
user => $user,
cwd => $dir,
creates => $creates,
}
}