added thunderbird state
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2024-04-27 18:26:21 +02:00
parent 014d7fba46
commit a35e7dd298
5 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,10 @@
---
thunderbird:
enabled: true
mirror: "https://ftp.mozilla.org/pub/thunderbird/releases"
install_dir: "/usr/local/apps"
release_dir: "/usr/local/apps/releases"
dest_path: "/usr/local/apps/thunderbird-"
version: "125.0"
platform: "linux-x86_64"
lang: "en-GB"

View File

@ -0,0 +1,3 @@
---
include:
- .install

View File

@ -0,0 +1,53 @@
---
{%- from "thunderbird/map.jinja" import thunderbird with context %}
thunderbird-archive-extract:
archive.extracted:
- name: {{ thunderbird.release_dir }}/thunderbird-{{ thunderbird.version }}
- source: {{ thunderbird.mirror }}/{{ thunderbird.version }}/{{ thunderbird.platform }}/{{ thunderbird.lang }}/thunderbird-{{ thunderbird.version }}.tar.bz2
- skip_verify: true
- archive_format: tar
- enforce_toplevel: false
- options: --strip 1
- keep: true
- if_missing: {{ thunderbird.release_dir }}/thunderbird-{{ thunderbird.version }}/thunderbird
thunderbird-symlink:
file.symlink:
- name: {{ thunderbird.install_dir }}/thunderbird
- target: {{ thunderbird.release_dir }}/thunderbird-{{ thunderbird.version }}
- force: true
- require:
- archive: thunderbird-archive-extract
thunderbird-bin-symlink:
file.symlink:
- name: /usr/bin/thunderbird
- target: {{ thunderbird.install_dir }}/thunderbird/thunderbird
- force: true
- require:
- archive: thunderbird-archive-extract
thunderbird-shortcut:
file.managed:
- name: /usr/share/applications/thunderbird.desktop
- source: salt://thunderbird/templates/thunderbird.desktop.j2
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- archive: thunderbird-archive-extract
thunderbird-icon:
file.managed:
- name: /usr/share/icons/thunderbird.png
- source: /usr/local/apps/thunderbird/chrome/icons/default/default128.png
- user: root
- group: root
- mode: 644
thunderbird-cleanup:
software.cleanup:
- name: thunderbird
- path: {{ thunderbird.release_dir }}
- version: "{{ thunderbird.version }}"

View File

@ -0,0 +1,5 @@
{%- import_yaml "thunderbird/defaults.yaml" as default_settings -%}
{%- set defaults = salt['grains.filter_by'](default_settings, default='thunderbird') -%}
{%- set thunderbird = salt['pillar.get']('thunderbird', default=defaults, merge=True) -%}

View File

@ -0,0 +1,13 @@
## Managed by PaulBSD Salt (https://git.paulbsd.com/paulbsd/paulbsd-salt)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Thunderbird
Comment=Thunderbird mail client
Exec=/usr/local/apps/releases/thunderbird/thunderbird
Icon=/usr/local/apps/releases/thunderbird/chrome/icons/default/default128.png
Terminal=false
StartupWMClass=Thunderbird
Type=Application
Categories=Network;
X-Desktop-File-Install-Version=0.22