tis-josm icon

Josm

Silent install package for Josm

19439-1

  • package: tis-josm
  • name: Josm
  • version: 19439-1
  • maintainer: Jordan ARNAUD
  • target_os: darwin
  • architecture: x64
  • signature_date:
  • size: 82.05 Mo

package           : tis-josm
version           : 19439-1
architecture      : x64
section           : base
priority          : optional
name              : Josm
categories        : 
maintainer        : Jordan ARNAUD
description       : JOSM is an extensible editor for OpenStreetMap (OSM) for Java 8+. JOSM is open source and licensed under GPL
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : darwin
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : JOSM est un éditeur extensible pour OpenStreetMap (OSM) pour Java 8+. JOSM est open source et sous licence GPL
description_pl    : JOSM to rozszerzalny edytor dla OpenStreetMap (OSM) dla Java 8+. JOSM jest oprogramowaniem open source na licencji GPL
description_de    : JOSM ist ein erweiterbarer Editor für OpenStreetMap (OSM) für Java 8+. JOSM ist Open Source und lizenziert unter GPL
description_es    : JOSM es un editor extensible para OpenStreetMap (OSM) para Java 8+. JOSM es de código abierto y licenciado bajo GPL
description_pt    : O JOSM é um editor extensível para o OpenStreetMap (OSM) para Java 8+. O JOSM é de código aberto e licenciado sob a GPL
description_it    : JOSM è un editor estensibile per OpenStreetMap (OSM) per Java 8+. JOSM è open source e ha una licenza GPL
description_nl    : JOSM is een uitbreidbare editor voor OpenStreetMap (OSM) voor Java 8+. JOSM is open source en gelicentieerd onder GPL
description_ru    : JOSM - это расширяемый редактор для OpenStreetMap (OSM) для Java 8+. JOSM имеет открытый исходный код и лицензию GPL
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 893ba6f7-d207-4c32-878b-8f3c599f03d9
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : f61fc2a800f385f6d0eb5f4f23d18f0c9ec9bb8571a7067b0b36d0f3cb2a58ef
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-09-06T10:00:38.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         : v9lX/6KuSmOyZpjPHoY1LWMCx1qqi+IHUihtzZQbxVd2avjZ7DP9uusKem6RBPCRTmVa7pOwuMSRAO4MeBrhBAwl9ZZ9MO4aUN0hwV+rYthW79m+nnOgsah+gx8O8aqjTl8aRDfNN5D/lTPZIVFmRdI1v3RPwGnYRtB6zxSY0K5/MP+h1rx8bHBjE17YONATN0s8T/AzesOKKhB7322nrdE/VeEC9UbQjP2SjdDhEJGzt5vi00IEzO7wdF4X7cPAmpJZhPDmoCJ2Wqn78UziS21Ibbp5JpO2dBmsFTUJ3EvwkT9+UZi3HGMX++qVGKcSxf9TCnFbeswanFld9xLRsw==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *

def install():
    ver = control.version.split("-")[0]
    bin_name = glob.glob("JOSM-macOS-java17-*-x64.zip")[0]
    mkdirs('/tmp/josm')
    unzip(bin_name, "/tmp/josm")
    if glob.glob('/Applications/JOSM*.app'):
        for app_dir in glob.glob('/Applications/JOSM*.app'):
            run(f'rm -rf {app_dir}')
    shutil.move('/tmp/josm/JOSM_17_x86_64.app', '/Applications/JOSM_17_x86_64.app')
    remove_tree("/tmp/josm")

def uninstall():
    remove_tree("/Applications/JOSM_17_x86_64.app")

from setuphelpers import *
import requests
import re
import json

def update_package():
    # Déclarer les variables locales
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    git_repo = "JOSM/josm"
    api_url = f"https://api.github.com/repos/{git_repo}/releases/latest"
    os_dict = {"windows": ".exe", "debian_based": ".deb", "redhat_based": ".rpm", "darwin": "-x64.zip"}

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for to_download in json_load["assets"]:
        if os_dict[control.target_os] in to_download["name"] and "java17" in to_download['name']:
            download_url = to_download["browser_download_url"]
            version = json_load["tag_name"].split("-")[0]
            latest_bin = to_download["name"]
            break

    # Deleting outdated binaries
    remove_outdated_binaries(version)
    
    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    control.set_software_version(version)
    control.save_control_to_wapt()

bbd47eb422d87f9e8a4f0df9d20d00a16ca255c07ea4d16947c89061e906e74a : JOSM-macOS-java17-19439-x64.zip
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
29863a8f021d3f78d1eb97e02d13638a12b15abe5fdf81d7606332690f39141d : WAPT/control
f61fc2a800f385f6d0eb5f4f23d18f0c9ec9bb8571a7067b0b36d0f3cb2a58ef : WAPT/icon.png
fb36f6c967327a89203b653b31ac5bfce5971c5f7aa7c6e0e807a41f58ebe70e : luti.json
e241cd300489afce4220339d51dacf9112a52d2cd3744d01dcc3a5f8d2f9a6ab : setup.py
eb4950ab4de41fc67a707ece8fad7c07f6e94250ecf84e1b411a3f8678f524a6 : update_package.py