summaryrefslogtreecommitdiffstats
path: root/modules/package
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-11-05 02:40:37 -0500
committerJesse Luehrs <doy@tozt.net>2017-11-05 02:41:16 -0500
commit2844a5b7bfa0e6b060ffda666f6099d8e5220daf (patch)
tree07c1ca410298b16e706e1f6ccab67cd15becf22e /modules/package
parent7e8d7c43a2c0482ea017e00b779b251532d48d94 (diff)
downloadpuppet-tozt-2844a5b7bfa0e6b060ffda666f6099d8e5220daf.tar.gz
puppet-tozt-2844a5b7bfa0e6b060ffda666f6099d8e5220daf.zip
better way to install yaourt
Diffstat (limited to 'modules/package')
-rw-r--r--modules/package/manifests/makepkg.pp21
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"],
+ ];
+ }
+}