]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blame - modules/aur/manifests/aura.pp
Fix aura packager
[perso/Immae/Projets/Puppet.git] / modules / aur / manifests / aura.pp
CommitLineData
919d772a
IB
1class 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
IB
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',
7fed35a4 22 require => Package['base-devel'],
919d772a
IB
23 logoutput => 'on_failure',
24 }
25
26 package { 'aura-bin':
7fed35a4
IB
27 ensure => "present",
28 source => "/tmp/aura-bin-x86_64.pkg.tar.xz",
29 require => Exec['aur::aura'],
30 notify => Exec['aur::aura::cleanup']
919d772a
IB
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}