]>
Commit | Line | Data |
---|---|---|
919d772a IB |
1 | class aur::aura( |
2 | ) { | |
3 | user { "aur-builder": | |
4 | name => "aur-builder", | |
5 | system => true, | |
6 | ensure => "present" | |
7 | } | |
8 | ||
1dca26e5 IB |
9 | sudo::conf { 'aur-builder': |
10 | content => "aur-builder ALL=(root) NOPASSWD: /usr/bin/aura *" | |
11 | } | |
12 | ||
7fed35a4 | 13 | ensure_packages(['base-devel'], { 'install_options' => '--needed' }) |
43b3ddf7 | 14 | ensure_packages(['gmp', 'pcre'], { 'install_options' => '--asdeps' }) |
919d772a | 15 | |
d7b6e53e IB |
16 | # aur.sh seems down |
17 | #$aur_url = "https://aur.sh" | |
76596414 | 18 | #$aur_url = "https://raw.githubusercontent.com/stuartpb/aur.sh/dc2f3fcaa90a4d3d1e8d746160559b5d3123a425/aur.sh" |
d7b6e53e | 19 | |
919d772a IB |
20 | exec { 'aur::aura': |
21 | cwd => "/tmp", | |
22 | path => "/usr/bin", | |
46fa3b99 | 23 | command => "curl https://aur.archlinux.org/cgit/aur.git/snapshot/aura-bin.tar.gz | tar xz && cd aura-bin && makepkg aura-bin && mv /tmp/aura-bin/aura-bin-*-x86_64.pkg.tar.xz /tmp/aura-bin-x86_64.pkg.tar.xz && rm -rf /tmp/aura-bin", |
919d772a IB |
24 | user => "aur-builder", |
25 | unless => '/usr/bin/pacman -Qo aura', | |
7fed35a4 | 26 | require => Package['base-devel'], |
919d772a IB |
27 | logoutput => 'on_failure', |
28 | } | |
29 | ||
30 | package { 'aura-bin': | |
7fed35a4 IB |
31 | ensure => "present", |
32 | source => "/tmp/aura-bin-x86_64.pkg.tar.xz", | |
33 | require => Exec['aur::aura'], | |
34 | notify => Exec['aur::aura::cleanup'] | |
919d772a IB |
35 | } |
36 | ||
37 | exec { 'aur::aura::cleanup': | |
38 | path => "/usr/bin/", | |
39 | command => "rm -f /tmp/aura-bin-x86_64.pkg.tar.xz", | |
40 | refreshonly => true | |
41 | } | |
42 | } |