tis-opensc icon

OpenSC

Paquet d’installation silencieuse pour OpenSC

0.26.1-6

  • package: tis-opensc
  • name: OpenSC
  • version: 0.26.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: 165.07 Mo
  • homepage : https://github.com/OpenSC/OpenSC/wiki

package           : tis-opensc
version           : 0.26.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      : 95da898d-562b-4926-b898-af7103d4da4c
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_date    : 2025-01-19T19:07:42.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         : lIoN6orta957G2CTondB7G7WBigVbtt0+T9Xu/XXkFulig614o/cuBF7LCluTXxOrsIDJ2hELwnKKCPGP3O4E1iscyAgsIzTQzafnqQ8qnOgo+I118s3za4cF0IbCYdfSp+FQJBG2o7ULF5rjVmHnok3hRuKgpo/FzRQqCDu1yreC+Asyh2bZ9+gr0rnSh5YmU303aoRWoK9a8Tsn6pWaZ30fboOtk7nZHke2CPVKqFSYrkKUqcnMbl7TQIjjH4o4bb3Sed5q+STLWVHgqBo26tF8/FYyxFqP29AY5kkJ/BDSC/S6OpvLXtYPm11sFcApebvLVKoBgaEtREsfFrdzQ==

# -*- 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)

7b66e256cefc7fdf6d9267383ac9e4763e299339aa52c99973f414b8a6a2ee05 : OpenSC-0.26.1.dmg
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1e0aacb00d956f9f43596eabbaf50d0343d5a41d3a979438452a03f19e64f4c6 : WAPT/control
b80b143a5ab7954131c83e41e21b34607c7ed9a02d307f064c3099ec6a342f62 : WAPT/icon.png
7d72a6a77e2353ac045ebf1075a09d24ebbf21196812d29357007ef80ba74eaa : luti.json
96276292abca0c4e498d5b0a3b89a14d03cbc8b05ffdafb17014f066c252a0f5 : setup.py
b361046791ce5e39dbf115fcbd9e7b510e9b1ec5f34787949d72bf5a31761675 : update_package.py