aboutsummaryrefslogblamecommitdiff
path: root/modules/aur/manifests/aura.pp
blob: 1683cf8347c1953f25984145e2ee69ac3b6dcf4d (plain) (tree)
1
2
3
4
5
6
7
8
9







                            
                                                                       
                                                                       






                                                                                                                                                                                                                         
                                       



                              



                                                 







                                                           
class aur::aura(
) {
  user { "aur-builder":
    name   => "aur-builder",
    system => true,
    ensure => "present"
  }

  ensure_packages(['base-devel'], { 'install_options'  => '--needed' })
  ensure_packages(['gmp', 'pcre'], { 'install_options' => '--asdeps' })

  exec { 'aur::aura':
    cwd       => "/tmp",
    path      => "/usr/bin",
    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',
    user      => "aur-builder",
    unless    => '/usr/bin/pacman -Qo aura',
    require   => Package['base-devel'],
    logoutput => 'on_failure',
  }

  package { 'aura-bin':
    ensure  => "present",
    source  => "/tmp/aura-bin-x86_64.pkg.tar.xz",
    require => Exec['aur::aura'],
    notify  => Exec['aur::aura::cleanup']
  }

  exec { 'aur::aura::cleanup':
    path        => "/usr/bin/",
    command     => "rm -f /tmp/aura-bin-x86_64.pkg.tar.xz",
    refreshonly => true
  }
}