diff options
Diffstat (limited to 'modules/package')
-rw-r--r-- | modules/package/manifests/makepkg.pp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/package/manifests/makepkg.pp b/modules/package/manifests/makepkg.pp new file mode 100644 index 0000000..adb7af9 --- /dev/null +++ b/modules/package/manifests/makepkg.pp @@ -0,0 +1,21 @@ +define package::makepkg(extra_options=[]) { + $extra_cmdline = join($extra_options, ' ') + + exec { "install $name": + command => " + mkdir -p /tmp/makepkg + cd /tmp/makepkg + rm -rf '$name' + su doy -c 'git clone https://aur.archlinux.org/$name.git' + cd '$name' + su doy -c makepkg + pacman -U --noconfirm --needed $extra_cmdline $name-*.pkg.tar.xz + ", + unless => "pacman -Q $name > /dev/null 2>&1", + require => [ + Tozt::User["doy"], + Package["git"], + Package["pkg-config"], + ]; + } +} |