tis-opensc icon

OpenSC

Paquet d’installation silencieuse pour OpenSC

0.25.1-6

  • package: tis-opensc
  • name: OpenSC
  • version: 0.25.1-6
  • categories: Drivers
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • licence: LGPL
  • locale: all
  • target_os: macos
  • impacted_process: pkcs11-tool,opensc-notify,opensc-tool
  • architecture: all
  • signature_date:
  • size: 166.76 Mo
  • homepage : https://github.com/OpenSC/OpenSC/wiki

package           : tis-opensc
version           : 0.25.1-6
architecture      : all
section           : base
priority          : optional
name              : OpenSC
categories        : Drivers
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : OpenSC smartcard framework
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : macos
min_wapt_version  : 2.2
sources           : https://github.com/OpenSC/OpenSC/releases
installed_size    : 
impacted_process  : pkcs11-tool,opensc-notify,opensc-tool
description_fr    : Cadre de carte à puce OpenSC
description_pl    : OpenSC smartcard framework
description_de    : OpenSC Smartcard-Framework
description_es    : Marco de la tarjeta inteligente OpenSC
description_pt    : Estrutura do OpenSC smartcard
description_it    : Quadro di riferimento per smartcard OpenSC
description_nl    : OpenSC smartcard-kader
description_ru    : Система смарт-карт OpenSC
audit_schedule    : 
editor            : 
keywords          : 
licence           : LGPL
homepage          : https://github.com/OpenSC/OpenSC/wiki
package_uuid      : a17fdad0-2b7e-446d-abff-a6bb01593e46
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/OpenSC/OpenSC/releases
min_os_version    : 
max_os_version    : 
icon_sha256sum    : b80b143a5ab7954131c83e41e21b34607c7ed9a02d307f064c3099ec6a342f62
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : Krqw4+uUFkjAELgy/Ej0taCmrOFkuJmgejtDlTh4a9FnZOQfQVoGaxrs7/bgDrBLjCwOMJz39K5qlReQG7PBdPjKB3zWpX2yfDxfJ4Gd692YTCb+hcJVp7EqmLuUjHhgVew/2INu/Vd3duLnHB/CSEX92oyzQ+xMcKNoMI/tc9WrSN9dB7m04bKuVkz+KEbkZ0zI4tVC0bKetvT7VVpRY3FuYZK+IB/g4i7fOoW1pK909SCcIAZDWuOTf5ODJp6iCWOyyjDJr9pqU2532AXB1GOaFKRbj0jPbo7SwsMw+BKCgEePmc9Kd6a1ibubgtDDnSksWvU0K07W7JZMEP4NKQ==
signature_date    : 2024-04-10T13:00:12.428692
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

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

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


def install():
    install_dmg('OpenSC-%s.dmg' % control.get_software_version(),key="pkgid:org.opensc-project.mac",min_version=control.get_software_version())


def session_setup():
    pkcs11_modules_path = makepath(user_home_directory(),".pkcs11_modules")
    mkdirs(pkcs11_modules_path)

    run(rf'ln -s /Librairy/OpenSC/lib/opensc-pkcs11.so {pkcs11_modules_path}')

def uninstall():
    uninstall_pkg('org.opensc-project.mac.opensctoken')
    uninstall_pkg('org.opensc-project.mac')
    uninstall_pkg('org.opensc-project.startup')
    uninstall_pkg('org.opensc-project.tokend')

    if isdir('/Applications/Utilities/OpenSC Notify.app'):
        remove_tree('/Applications/Utilities/OpenSC Notify.app')

    if isdir('/Applications/Utilities/OpenSCTokenApp.app'):
        remove_tree('/Applications/Utilities/OpenSCTokenApp.app')
        
    if isdir('/Applications/OpenSC Uninstaller.app'):
        remove_tree('/Applications/OpenSC Uninstaller.app')

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


def update_package():
    print("Download/Update package content from upstream binary sources")

    # Initializing variables
    app_name = control.name
    url_api = "https://api.github.com/repos/OpenSC/OpenSC/releases/latest"
    proxy = get_proxies()
    dmg_name_string = "OpenSC-%s.dmg"
    # Getting latest informations from Github API
    json_load = json.loads(wgets(url_api, proxies=proxy))
    for download in json_load:
        version = json_load["tag_name"]
        break

    latest_dmg = dmg_name_string % version
    url_dl = "https://github.com/OpenSC/OpenSC/releases/download/" + version + "/" + latest_dmg

    print("Latest " + app_name + " version is: " + version)

    # Downloading latest binaries
    if not isfile(latest_dmg):
        print("Downloading: " + latest_dmg)
        wget(url_dl, latest_dmg, proxies=proxy)

        # Changing version of the package
        control.version = "%s-%s" % (version, int(control.version.split("-")[-1]) + 1)
        control.save_control_to_wapt()
        print("Changing version to: %s in WAPT\\control" % control.version)

    # Deleting outdated binaries
    for bin_in_dir in glob.glob("*.dmg"):
        if bin_in_dir != latest_dmg:
            print("Outdated binary: " + bin_in_dir + " Deleted")
            remove_file(bin_in_dir)

96276292abca0c4e498d5b0a3b89a14d03cbc8b05ffdafb17014f066c252a0f5 : setup.py
b361046791ce5e39dbf115fcbd9e7b510e9b1ec5f34787949d72bf5a31761675 : update_package.py
9679d70db011a68e99360fcd4c5538b0481bd036fb058fc309b999837e63e063 : OpenSC-0.25.1.dmg
b80b143a5ab7954131c83e41e21b34607c7ed9a02d307f064c3099ec6a342f62 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
02c46a05a14a0c1960e96afa3cdc0b7db68f984e3a29ddfd98c68eef867a1b44 : luti.json
ab0a1e138e72d7dc5be6d659cf1ced7fb1c7d556d4a8d881f4eafe4d714f8279 : WAPT/control