summaryrefslogtreecommitdiffstats
path: root/modules/package/manifests/makepkg.pp
blob: adb7af90599fab30003de500882fceaaff4ff4c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"],
    ];
  }
}