---
- name: light-locker-settings dependencies
  apt:
    name: "{{ item }}"
  with_items:
    - gettext
    - intltool
    - python3-psutil

- name: download light-locker-settings
  get_url:
    url: https://github.com/Antergos/light-locker-settings/archive/1.5.3.tar.gz
    dest: /opt/light-locker-settings-1.5.3.tar.bz2
    checksum: sha256:9174ee896d9ea7f41cb14eed61bea473de4b57278858bbd32045f1ed64858fcd

- name: unpack light-locker-settings
  unarchive:
    src: /opt/light-locker-settings-1.5.3.tar.bz2
    remote_src: yes
    dest: /opt

- name: configure script for light-locker-settings
  command: ./configure --prefix=/usr --python=python3
  args:
    chdir: /opt/light-locker-settings-1.5.3
    creates: /usr/local/bin/light-locker-settings

- name: make light-locker-settings
  command: make
  args:
    chdir: /opt/light-locker-settings-1.5.3
    creates: /usr/local/bin/light-locker-settings

- name: install light-locker-settings
  command: make install
  args:
    chdir: /opt/light-locker-settings-1.5.3
    creates: /usr/local/bin/light-locker-settings
