- helper 'make' will check for repo to use git, and extract_to to use archive - configure target is changed to run the ./configure script
67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: stow
|
|
## Description: GNU symbolic link manager
|
|
## Version: latest
|
|
## Methods: [system, source]
|
|
## Helpers: make
|
|
---
|
|
- name: Set stow default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
stow:
|
|
methods:
|
|
- system
|
|
- source
|
|
pkgname:
|
|
RedHat: stow
|
|
Archlinux: stow
|
|
baseurl: https://ftp.gnu.org/gnu/stow
|
|
version: 2.4.1
|
|
# }}}
|
|
- name: Configure stow
|
|
when:
|
|
- "'stow' not in __configured"
|
|
block:
|
|
- name: Set stow install method
|
|
when:
|
|
- stow_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
stow_imethod: "{{ imethod if imethod in stow.methods else stow.methods[0] }}"
|
|
|
|
- name: Configure stow system install
|
|
when:
|
|
- stow_imethod == 'system'
|
|
block:
|
|
- name: Queue stow for system install
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + [stow.pkgname[os_family]] }}"
|
|
stow_install: "{{ stow_imethod }}={{ stow.pkgname[os_family] }}"
|
|
|
|
- name: Configure stow source install
|
|
when:
|
|
- stow_imethod == 'source'
|
|
block:
|
|
- name: Set stow source install configuration
|
|
ansible.builtin.set_fact:
|
|
stow_src_install:
|
|
url: "{{ stow.baseurl }}/stow-{{ stow.version }}.tar.gz"
|
|
name: "stow-{{ stow.version }}.tar.gz"
|
|
extract_to: "{{ d_cache.path }}"
|
|
path: "{{ d_cache.path }}/stow-{{ stow.version }}"
|
|
target:
|
|
configure:
|
|
options: "--prefix={{ install_prefix }}"
|
|
build:
|
|
name: ""
|
|
install:
|
|
name: install
|
|
|
|
- name: Queue stow source install
|
|
ansible.builtin.set_fact:
|
|
pkg_make: "{{ pkg_make + [stow_src_install] }}"
|
|
stow_install: "{{ stow_imethod }}={{ stow_src_install }}"
|
|
|
|
- name: Finalise stow configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'stow': stow_install } ) }}"
|