---

- name: download fotowall binary
  get_url:
    url: https://github.com/enricoros/fotowall/releases/download/v1.0/Fotowall-1.0-RETRO-Linux_static-x86_64.x86_64
    checksum: sha256:17d43106a3487dbd3853fff3421145b11bad86360fc96757f76cc8904bb0ed03
    dest: /usr/local/bin/fotowall
    mode: 0755

- name: download fotowall archive
  get_url:
    url: https://github.com/enricoros/fotowall/releases/download/v1.0/Fotowall-1.0-RETRO.tar.bz2
    checksum: sha256:bbd8c6108ecbac1943122a8398475381865d9833a8bba8c10f0d3262a578fb9f
    dest: /opt/fotowall.tar.bz2

- name: fotowall directory
  file:
    path: /opt/fotowall
    state: directory

- name: unpack fotowall archive
  unarchive:
    src: /opt/fotowall.tar.bz2
    remote_src: yes
    dest: /opt/fotowall

- name: fotowall desktop file
  file:
    src: /opt/fotowall/fotowall.desktop
    dest: /usr/share/applications/fotowall.desktop
    state: link

- name: fotowall icon
  file:
    src: /opt/fotowall/fotowall.png
    dest: /usr/share/icons/fotowall.png
    state: link
