tis-typst-portable icon

typst

Paquet d’installation silencieuse pour typst

0.11.1-1

  • package: tis-typst-portable
  • name: typst
  • version: 0.11.1-1
  • maintainer: Jordan ARNAUD
  • licence: Apache-2.0 license
  • target_os: debian_based
  • architecture: x64
  • signature_date:
  • size: 12.24 Mo
  • homepage : https://typst.app/

package           : tis-typst-portable
version           : 0.11.1-1
architecture      : x64
section           : base
priority          : optional
name              : typst
categories        : 
maintainer        : Jordan ARNAUD
description       : A new, powerful and easy-to-learn markup-based composition system
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : debian_based
min_wapt_version  : 
sources           : https://github.com/typst/typst
installed_size    : 
impacted_process  : 
description_fr    : Un nouveau système de composition basé sur le balisage, puissant et facile à apprendre
description_pl    : Nowy system kompozycji oparty na znacznikach, który jest potężny i łatwy do nauczenia
description_de    : Ein neues, auf Markup basierendes Satzsystem, das leistungsstark und leicht zu erlernen ist
description_es    : Un nuevo sistema de composición basado en marcas, potente y fácil de aprender
description_pt    : Um novo sistema de composição baseado em marcação que é poderoso e fácil de aprender
description_it    : Un nuovo sistema di composizione basato su markup, potente e facile da imparare
description_nl    : Een nieuw op markup gebaseerd compositiesysteem dat krachtig en gemakkelijk te leren is
description_ru    : Новая система композиции на основе разметки, мощная и простая в освоении
audit_schedule    : 
editor            : 
keywords          : 
licence           : Apache-2.0 license
homepage          : https://typst.app/
package_uuid      : 8eb692d8-7e43-41ee-b587-eb0157c32e7f
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 299c97f82b4e1737475fb5102447fd09d23d2cbda13765e673ef9701a5a01d64
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-30T12:47:18.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : A+k5QG+w6iWkk8LXlhbFwRgz+eYIDHhRJuVVbd3nBOfY2lN4+iw65nYXWKXEwjqRh0vykGiLw3yeJv/WqYg2Y32Ed9AB0hanDo1y5v9KFf1SkEt1WgOzTvmHK52+bQ8psDCfvQX2+XVKoQCVdCt8xwhWKlUeT/Ai2A/29E6ofx00Vgk1hq4EhSqpOaYv0+iPPJIzBTpHfpaUviBUgTcW7Ptxl0m4JxaeVS7dUjfk3kRnWmcMp6UGPzwnbuOEpxQP15N3MB1oCb2vtKvO6+6LkSMsvllX3LEkIENmT/TqxnrQ5eQwZDzJoOo+afzRFNHXRVhkRAKUz3ghxtXNoeuQ4Q==

# -*- coding: utf-8 -*-
from setuphelpers import *

bin_path = makepath("/", "usr", "local", "bin")
app_path = "/opt/typst"

def install():
    # Extraction and copying to /opt/typst
    extract_path = glob.glob("*.tar.xz")[0]
    run(f"tar -xJvf {extract_path}")
    char_len = len(extract_path) - len('.tar.xz')
    extract_path = extract_path[:char_len]
    bin_name = glob.glob(extract_path)[0]
    print(f"copying typst to {app_path}")
    if not isdir(app_path):
        mkdirs(app_path)
    copytree2(bin_name, app_path)
    
    # Creation symlink
    symlink_path = f"{bin_path}/typst"
    if isfile(symlink_path) or os.path.islink(symlink_path):
        print("Symlink already exists, removing it")
        os.remove(symlink_path)
    
    print("create typst alias in path")
    os.symlink(f"{app_path}/typst", symlink_path)
    
    if isdir(extract_path):
        remove_tree(extract_path)

    

def uninstall():
    # Removing of symlink
    if isfile(f"{bin_path}/typst"):
        remove_file(f"{bin_path}/typst")
    # Removing of the software 
    if isdir(app_path):
        remove_tree(app_path)

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()
    
    if not proxies:
        proxies = get_proxies_from_wapt_console()
   
    git_repo = "typst/typst"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.tar.xz') and "x86_64" in download["browser_download_url"] and "linux" in download["browser_download_url"] and "beta" not in download["browser_download_url"] :
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        print(f'Downloading ' + filename)
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.tar.xz'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
5930e8c2d470be1fc8b30beaccd982ee0b33e8e27b75ef9e562841252841794e : WAPT/control
299c97f82b4e1737475fb5102447fd09d23d2cbda13765e673ef9701a5a01d64 : WAPT/icon.png
81c0e6cd66df208ed7cc0fe18017ce426aab57574ff456476ad7f9d84b6fef84 : luti.json
85d31017ba07bd674b9605dd47c29ac583ef66ee179a11920d77ce32b6f6d1c4 : setup.py
bb637d1d65634b2ee4b4e101d0b2d541bf3f1e03ac5f51f9619941e48dd28bd0 : typst-x86_64-unknown-linux-musl.tar.xz
41f48e3f0815883207779eb54028e353a86bc666dcf347d1f6a6457185413308 : update_package.py