Skip to content

Instantly share code, notes, and snippets.

@marcgibbons
Forked from reidmv/buildsource.pp
Created October 17, 2013 01:59
Show Gist options
  • Save marcgibbons/7018128 to your computer and use it in GitHub Desktop.
Save marcgibbons/7018128 to your computer and use it in GitHub Desktop.
#
# Depends on: puppetlabs/stdlib
#
define buildsource(
$dir = $title,
$user = 'root',
$path = '/usr/bin:/bin',
$timeout = '0',
$options = ''
) {
$options_real = join([$options], ' ')
Exec {
user => $user,
cwd => $dir,
timeout => $timeout,
path => $path,
}
exec { "./configure in ${dir}":
command => "./configure ${options_real}",
} ->
exec { "make in ${dir}":
command => 'make',
} ->
exec { "make install in ${dir}":
command => 'make install',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment