puppet-ethercalc/manifests/buildsource.pp
Andrey Nikitin cd6889a359 Order of the classes parameters is refactored
Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: If012896a95088ae836d5dfa35aa3cad553aee516
2016-03-21 12:07:49 +03:00

39 lines
865 B
Puppet

# == Define: buildsource
#
# define to build from source using ./configure && make && make install.
#
define etherpad_lite::buildsource(
$creates = '/nonexistant/file',
$dir = $title,
$timeout = 300,
$user = 'root',
) {
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,
}
}