From 8317b706d7a0a91c67c46950be07d40168705b6c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 19 Oct 2018 23:15:14 -0400 Subject: rename modules dir --- modules/package/manifests/cargo.pp | 39 ---------------------------------- modules/package/manifests/makepkg.pp | 41 ------------------------------------ 2 files changed, 80 deletions(-) delete mode 100644 modules/package/manifests/cargo.pp delete mode 100644 modules/package/manifests/makepkg.pp (limited to 'modules/package') diff --git a/modules/package/manifests/cargo.pp b/modules/package/manifests/cargo.pp deleted file mode 100644 index 2f599b9..0000000 --- a/modules/package/manifests/cargo.pp +++ /dev/null @@ -1,39 +0,0 @@ -define package::cargo($package, $user, $ensure, $home=undef) { - $_home = $home ? { - undef => $user ? { - 'root' => '/root', - default => "/home/$user", - }, - default => $home, - } - - case $ensure { - 'installed': { - exec { "cargo install $package for $user": - provider => "shell", - command => "cargo install $package", - unless => "cargo install --list | grep -q '^$package'", - user => $user, - timeout => 3600, - require => [ - User[$user], - Rust::User[$user], - File["${_home}/.cargo"], - ]; - } - } - 'absent': { - exec { "cargo uninstall $package for $user": - provider => "shell", - command => "cargo uninstall $package", - onlyif => "cargo install --list | grep -q '^$package'", - user => $user, - require => [ - User[$user], - Rust::User[$user], - File["${_home}/.cargo"], - ]; - } - } - } -} diff --git a/modules/package/manifests/makepkg.pp b/modules/package/manifests/makepkg.pp deleted file mode 100644 index c9d0318..0000000 --- a/modules/package/manifests/makepkg.pp +++ /dev/null @@ -1,41 +0,0 @@ -define package::makepkg($ensure, $build_user, $asdeps=false) { - if $asdeps { - $extra_cmdline = " --asdeps" - } - else { - $extra_cmdline = "" - } - - include c_toolchain - include git - - case $ensure { - 'installed': { - exec { "makepkg install $name": - provider => "shell", - command => " - cd /tmp - rm -rf 'makepkg-$name' - su $build_user -c 'git clone https://aur.archlinux.org/$name.git makepkg-$name' - cd 'makepkg-$name' - su $build_user -c makepkg - pacman -U --noconfirm --needed $extra_cmdline $name-*.pkg.tar.xz - ", - unless => "pacman -Q $name > /dev/null 2>&1", - path => "/usr/bin", - require => [ - Class["git"], - Class["c_toolchain"], - ]; - } - } - 'absent': { - exec { "makepkg uninstall $name": - provider => "shell", - command => "pacman --noconfirm -Rsn $name", - onlyif => "pacman -Q $name > /dev/null 2>&1", - path => "/usr/bin"; - } - } - } -} -- cgit v1.2.3-54-g00ecf