]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/aur/manifests/aura.pp
2dbcf39b1d2ab3dad023f0a5e9206c26ce04790e
[perso/Immae/Projets/Puppet.git] / modules / aur / manifests / aura.pp
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 -Sy base-devel --needed --noconfirm',
11 unless => '/usr/bin/pacman -Qo aura',
12 logoutput => 'on_failure',
13 }
14
15 ensure_packages(['gmp', 'pcre'], { '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 }