Created
May 4, 2012 19:01
-
-
Save reidmv/2597027 to your computer and use it in GitHub Desktop.
Puppet build define
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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