diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-09 21:36:00 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-09 22:47:39 +0200 |
commit | 919d772aaa9bb6f298b1d0a433b6b32d15c0410f (patch) | |
tree | af48e6b472f40dfa062ea7b0faedc941b56eeaa1 /modules/aur/manifests/aura.pp | |
parent | f860f6d2b475fa611af2b6a66ee1c774757b77f4 (diff) | |
download | Puppet-919d772aaa9bb6f298b1d0a433b6b32d15c0410f.tar.gz Puppet-919d772aaa9bb6f298b1d0a433b6b32d15c0410f.tar.zst Puppet-919d772aaa9bb6f298b1d0a433b6b32d15c0410f.zip |
Add aura helper
Diffstat (limited to 'modules/aur/manifests/aura.pp')
-rw-r--r-- | modules/aur/manifests/aura.pp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/aur/manifests/aura.pp b/modules/aur/manifests/aura.pp new file mode 100644 index 0000000..fff988b --- /dev/null +++ b/modules/aur/manifests/aura.pp | |||
@@ -0,0 +1,38 @@ | |||
1 | class aur::aura( | ||
2 | ) { | ||
3 | user { "aur-builder": | ||
4 | name => "aur-builder", | ||
5 | system => true, | ||
6 | ensure => "present" | ||
7 | } | ||
8 | |||
9 | exec { 'pacman-base-devel': | ||
10 | command => '/usr/bin/pacman -S base-devel --needed --noconfirm', | ||
11 | unless => '/usr/bin/pacman -Qo aura', | ||
12 | logoutput => 'on_failure', | ||
13 | } | ||
14 | |||
15 | ensure_packages(['gmp', 'pcre', 'abs'], { 'install_options' => '--asdeps' }) | ||
16 | |||
17 | exec { 'aur::aura': | ||
18 | cwd => "/tmp", | ||
19 | path => "/usr/bin", | ||
20 | command => 'curl -o /tmp/aur.sh aur.sh && chmod +x /tmp/aur.sh && /tmp/aur.sh aura-bin && mv /tmp/aura-bin/aura-bin-*-x86_64.pkg.tar.xz /tmp/aura-bin-x86_64.pkg.tar.xz && rm /tmp/aur.sh && rm -rf /tmp/aura-bin', | ||
21 | user => "aur-builder", | ||
22 | unless => '/usr/bin/pacman -Qo aura', | ||
23 | require => Exec['pacman-base-devel'], | ||
24 | logoutput => 'on_failure', | ||
25 | } | ||
26 | |||
27 | package { 'aura-bin': | ||
28 | ensure => "present", | ||
29 | source => "/tmp/aura-bin-x86_64.pkg.tar.xz", | ||
30 | notify => Exec['aur::aura::cleanup'] | ||
31 | } | ||
32 | |||
33 | exec { 'aur::aura::cleanup': | ||
34 | path => "/usr/bin/", | ||
35 | command => "rm -f /tmp/aura-bin-x86_64.pkg.tar.xz", | ||
36 | refreshonly => true | ||
37 | } | ||
38 | } | ||