paulbsd-salt/states/telegram/install.sls

56 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

2020-07-10 00:58:55 +02:00
---
{%- from "telegram/map.jinja" import telegram with context %}
telegram-archive-extract:
archive.extracted:
2021-03-22 19:11:32 +01:00
- name: {{ telegram.release_dir }}/telegram-{{ telegram.version }}
2020-07-10 00:58:55 +02:00
- source: {{ telegram.mirror }}/v{{ telegram.version }}/tsetup.{{ telegram.version }}.tar.xz
2020-09-12 17:41:35 +02:00
- skip_verify: true
2020-07-10 00:58:55 +02:00
- archive_format: tar
2020-09-12 17:41:35 +02:00
- enforce_toplevel: false
2020-07-10 00:58:55 +02:00
- options: --transform 's/Telegram/telegram/g' --transform 's/Updater/updater/g' --strip 1
2020-09-12 17:41:35 +02:00
- keep: true
2022-06-10 00:39:52 +02:00
- if_missing: {{ telegram.release_dir }}/telegram-{{ telegram.version }}/telegram
2020-07-10 00:58:55 +02:00
telegram-symlink:
file.symlink:
- name: {{ telegram.install_dir }}/telegram
2021-03-22 19:11:32 +01:00
- target: {{ telegram.release_dir }}/telegram-{{ telegram.version }}
2020-09-12 17:41:35 +02:00
- force: true
2021-07-11 17:39:41 +02:00
- require:
- archive: telegram-archive-extract
2020-07-10 00:58:55 +02:00
telegram-bin-symlink:
file.symlink:
- name: /usr/bin/telegram
2021-03-22 19:11:32 +01:00
- target: {{ telegram.install_dir }}/telegram/telegram
2020-09-12 17:41:35 +02:00
- force: true
2021-07-11 17:39:41 +02:00
- require:
- archive: telegram-archive-extract
2020-07-10 00:58:55 +02:00
2021-03-22 19:11:32 +01:00
telegram-icon:
file.managed:
- name: /usr/share/icons/telegram.png
2023-06-29 08:57:26 +02:00
- source: salt://telegram/files/telegram.png
2021-03-22 19:11:32 +01:00
- user: root
- group: root
- mode: 644
2021-07-11 17:39:41 +02:00
- require:
- archive: telegram-archive-extract
2021-03-22 19:11:32 +01:00
2020-07-10 00:58:55 +02:00
telegram-shortcut:
file.managed:
- name: /usr/share/applications/telegram.desktop
2023-03-10 00:08:05 +01:00
- source: salt://telegram/templates/telegram.desktop.j2
2020-07-10 00:58:55 +02:00
- user: root
- group: root
- mode: 644
2021-07-11 17:39:41 +02:00
- template: jinja
- require:
2021-11-14 13:37:49 +01:00
- archive: telegram-archive-extract
telegram-cleanup:
software.cleanup:
- name: telegram
- path: {{ telegram.release_dir }}
2023-03-10 00:08:05 +01:00
- version: "{{ telegram.version }}"