aboutsummaryrefslogtreecommitdiff
path: root/modules/aur/manifests/aura.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/aur/manifests/aura.pp')
-rw-r--r--modules/aur/manifests/aura.pp38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/aur/manifests/aura.pp b/modules/aur/manifests/aura.pp
new file mode 100644
index 0000000..fff988b
--- /dev/null
+++ b/modules/aur/manifests/aura.pp
@@ -0,0 +1,38 @@
1class 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 -S base-devel --needed --noconfirm',
11 unless => '/usr/bin/pacman -Qo aura',
12 logoutput => 'on_failure',
13 }
14
15 ensure_packages(['gmp', 'pcre', 'abs'], { '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}