--- {%- from "telegram/map.jinja" import telegram with context %} telegram-archive-extract: archive.extracted: - name: {{ telegram.release_dir }}/telegram-{{ telegram.version }} - source: {{ telegram.mirror }}/v{{ telegram.version }}/tsetup.{{ telegram.version }}.tar.xz - skip_verify: true - archive_format: tar - enforce_toplevel: false - options: --transform 's/Telegram/telegram/g' --transform 's/Updater/updater/g' --strip 1 - keep: true - if_missing: {{ telegram.release_dir }}/telegram-{{ telegram.version }}/telegram telegram-symlink: file.symlink: - name: {{ telegram.install_dir }}/telegram - target: {{ telegram.release_dir }}/telegram-{{ telegram.version }} - force: true - require: - archive: telegram-archive-extract telegram-bin-symlink: file.symlink: - name: /usr/bin/telegram - target: {{ telegram.install_dir }}/telegram/telegram - force: true - require: - archive: telegram-archive-extract telegram-icon: file.managed: - name: /usr/share/icons/telegram.png - source: salt://telegram/files/telegram.png - user: root - group: root - mode: 644 - require: - archive: telegram-archive-extract telegram-shortcut: file.managed: - name: /usr/share/applications/telegram.desktop - source: salt://telegram/templates/telegram.desktop.j2 - user: root - group: root - mode: 644 - template: jinja - require: - archive: telegram-archive-extract telegram-cleanup: software.cleanup: - name: telegram - path: {{ telegram.release_dir }} - version: "{{ telegram.version }}"