]>
Commit | Line | Data |
---|---|---|
1 | class aur::aura( | |
2 | ) { | |
3 | user { "aur-builder": | |
4 | name => "aur-builder", | |
5 | system => true, | |
6 | ensure => "present" | |
7 | } | |
8 | ||
9 | sudo::conf { 'aur-builder': | |
10 | content => "aur-builder ALL=(root) NOPASSWD: /usr/bin/aura *" | |
11 | } | |
12 | ||
13 | ensure_packages(['base-devel'], { 'install_options' => '--needed' }) | |
14 | ensure_packages(['gmp', 'pcre'], { 'install_options' => '--asdeps' }) | |
15 | ||
16 | exec { 'aur::aura': | |
17 | cwd => "/tmp", | |
18 | path => "/usr/bin", | |
19 | 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', | |
20 | user => "aur-builder", | |
21 | unless => '/usr/bin/pacman -Qo aura', | |
22 | require => Package['base-devel'], | |
23 | logoutput => 'on_failure', | |
24 | } | |
25 | ||
26 | package { 'aura-bin': | |
27 | ensure => "present", | |
28 | source => "/tmp/aura-bin-x86_64.pkg.tar.xz", | |
29 | require => Exec['aur::aura'], | |
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 | } |