tis-skype icon

Skype

Silent install package for Skype

8.75.0.140-18

  • package: tis-skype
  • name: Skype
  • version: 8.75.0.140-18
  • categories: Messaging,Media
  • maintainer: Tranquil IT,Kevin Guerineau,Kismath ADELEKE,Rayenne GUIASSA,Jimmy PELE
  • editor: Microsoft and Microsoft Skype Division
  • licence: Freemium
  • locale: all
  • target_os: debian_based
  • impacted_process: Skype
  • architecture: all
  • signature_date:
  • size: 123.09 Mo
  • homepage : https://www.skype.com

package           : tis-skype
version           : 8.75.0.140-18
architecture      : all
section           : base
priority          : optional
name              : Skype
categories        : Messaging,Media
maintainer        : Tranquil IT,Kevin Guerineau,Kismath ADELEKE,Rayenne GUIASSA,Jimmy PELE
description       : Skype is a telecommunications application software product that specializes in providing video chat and voice calls from computers, tablets, and mobile devices via the Internet to other devices or telephones/smartphones
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : debian_based
min_wapt_version  : 1.8
sources           : https://store.wapt.fr/store/tis-skype
installed_size    : 
impacted_process  : Skype
description_fr    : Skype est un logiciel qui permet aux utilisateurs de passer des appels téléphoniques ou vidéo via Internet, ainsi que le partage d'écran. Les appels d’utilisateur à utilisateur sont gratuits, tandis que ceux vers les lignes téléphoniques fixes et les téléphones mobiles sont payants.
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : Microsoft and Microsoft Skype Division
keywords          : video,chat,call,calls,telecommunication,telecommunications
licence           : Freemium
homepage          : https://www.skype.com
package_uuid      : 7540da19-feb5-45bd-a2e4-72d7041b84e5
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://support.skype.com/en/faq/FA34778/what-s-new-in-skype-for-windows-mac-linux-and-web
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 6058fdd04e7138b7c45202f641355850fe83acd6c1a3bc18e1f9f2ca98563a9f
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : O+pHM33trgAihfxcZ19LwWegn1ugj3fLTRtPZjScdUHTwmu0Iw60kgmzZ45MnrMP6g4d0QMnFrcfMbX3JC4LGoWGs6q8qH8TxPSYE/t0KVjWW0xa05v33MzVYucdiRsHsGasvyc+H3k6qJ+rneBKuX6PMQ7MSOP4vfQtGi8fn6Lg6YPFf/KkcKA+FaK4infUsdkWEKhGfEskffM/eoTkvnSJR8M2iN39NDtRaxQ1GXpwHI4MOHvuZB3EzczwjNl/RdIZAGXE9rNbzoE3cR9WowRrsoS9qK1o0YhmlwvoVZBVxLHka7m0UZgWkchjzv+ZNqyGypOM8kxiGt4pb1WO1A==
signature_date    : 2021-10-26T10:35:55.763786
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 *
import platform
import bs4 as BeautifulSoup

# Defining variables
package_name = 'skypeforlinux'

def install():
    #Removing sources in apt to install it
    source_path = '/etc/apt/sources.list.d/'
    for filename in os.listdir(source_path):
        if 'skype' in filename:
            remove_file(makepath(source_path,filename))
    
    # Installing the package
    bin_name = glob.glob('*%s*' % package_name)[0]
    print('Installing: %s' % bin_name)
    install_deb(bin_name)
    

def uninstall():
    # Uninstalling the package 
    print('Uninstalling: %s' % package_name)
    uninstall_apt(package_name)


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name    
    if control.architecture == 'x64':
        arch = '64bit'
    else:
        arch = '32bit'

    # Specific app values
    url = 'https://support.skype.com/en/faq/FA12041/quelle-est-la-derniere-version-de-skype-sur-chaque-plateforme'

    # Getting latest version from official website

    for u in bs_find_all(url,'td', proxies=proxies):
        if 'Skype for Linux version' in u.text:
            latest_version = u.text.split('\xa0')[-1] 
            break   
   
    url_dl = 'https://repo.skype.com/latest/skypeforlinux-64.deb'
    latest_bin = url_dl.split('/')[-1]

    print("Latest %s version is: %s" % (package_name, latest_version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    current_version = control.get_software_version()
    if Version(latest_version) > Version(current_version):
        remove_outdated_binaries(latest_version, filename_contains=app_name)
        print('Downloading: ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

    # Changing version of the package
    if Version(latest_version) != control.get_software_version():
        print("Software updated to version: %s" % Version(latest_version))
        result = True
    control.version = '%s-%s' % (latest_version, control.version.split('-', 1)[-1])
    #control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return result

def get_proxies():
    r"""Return system proxy with the urllib python library

    >>> get_proxies()
    {'http': 'http://srvproxy.ad.domain.lan:8080',
    'https': 'http://srvproxy.ad.domain.lan:8080'}

    """
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    r"""Return proxy information from the current user WAPT console

    >>> get_proxies_from_wapt_console()
    {'http': 'http://srvproxy.ad.domain.lan:8080',
    'https': 'http://srvproxy.ad.domain.lan:8080'}

    """
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def bs_find(url, element, attribute=None, value=None, user_agent=None, proxies=None, features='html.parser', **kwargs):
    r""""Parse html web page with BeautifulSoup and get the first result

    Args:
        url (str): url of the web page to parse
        element (str): searched element
        attribute (str): selected attribute of the element
        value (str): value of the selected attribute
        user_agent (str): specify a user-agent if needed
        proxies (dict): specify your proxy if needed
        **kwargs (str): joker for requests parameters
        features (str): bs feature to use


    >>> bs_find('https://www.w3.org/', 'a', 'title', 'Open Web Platform testing')['href']
    'https://web-platform-tests.org/'

    >>> bs_find('https://www.w3.org/', 'span', 'class', 'alt-logo').string
    'W3C'

    .. versionadded:: 2.0

    """
    import requests
    if user_agent:
        page = requests.get(url, proxies=proxies, headers={'User-Agent':'%s' % user_agent}, **kwargs).text
    else:
        page = requests.get(url, proxies=proxies, **kwargs).text
    soup = BeautifulSoup.BeautifulSoup(page, features=features)
    if value:
        return soup.find(element, {attribute: value})
    else:
        return soup.find(element)


def bs_find_all(url, element, attribute=None, value=None, user_agent=None, proxies=None, features='html.parser', **kwargs):
    r""""Parse html web page with BeautifulSoup and get a list of the result

    Args:
        url (str): url of the web page to parse
        element (str): searched element
        attribute (str): selected attribute of the element
        value (str): value of the selected attribute
        user_agent (str): specify a user-agent if needed
        proxies (dict): specify your proxy if needed
        **kwargs (str): joker for requests parameters
        features (str): bs feature to use


    >>> bs_find_all('https://www.w3.org/', 'a', 'title', 'Open Web Platform testing')[0]['href']
    'https://web-platform-tests.org/'

    >>> bs_find_all('https://www.w3.org/', 'span', 'class', 'alt-logo')[0].string
    'W3C'

    .. versionadded:: 2.0

    """
    import requests
    if user_agent:
        page = requests.get(url, proxies=proxies, headers={'User-Agent':'%s' % user_agent}, **kwargs).text
    else:
        page = requests.get(url, proxies=proxies, **kwargs).text
    soup = BeautifulSoup.BeautifulSoup(page, features=features)
    if value:
        return soup.find_all(element, {attribute:value})
    else:
        return soup.find_all(element)


def get_version_from_binary(filename, property_name='ProductVersion'):
    r""" Get installer version from file informations, for now, only exe and msi files are compatibles

    Args:
        filename (str): path to the file
        property_name (str): selected property

    Returns:
        str: version number

     """
    if filename.endswith('.msi'):
        return get_msi_properties(filename)[property_name]
    else:
        return get_file_properties(filename)[property_name]


def remove_outdated_binaries(version, filename_contains=None, list_extensions=['exe','msi','deb','rpm','dmg','pkg']):
    r"""Remove files based on the version contained in his filename

    Args:
        version (str): version number of keeped files
        filename_contains (str or list of str): Part of the filename that must be contained (useful for distinguishing architecture and os)
        list_extensions (str or list of str): file extensions of verified files

    Returns:
        None

    .. versionadded:: 2.0

    """
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if filename_contains:
        if type(filename_contains) != list:
            filename_contains = [filename_contains]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if filename_contains:
                for filename_contain in filename_contains:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)

b67fe124a65c471f7cf221e42485a093c25433d9c5548769617c722613c84d54 : setup.py
d2ed5fa4a26bb0481bbd3c1d92a259fd2c02443989c048bd2171db32663c3092 : skypeforlinux-64.deb
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
6058fdd04e7138b7c45202f641355850fe83acd6c1a3bc18e1f9f2ca98563a9f : WAPT/icon.png
78fa2a860081bda0eaaa42ddeb22c5bdae0361f4566bae6801a046db58c2c873 : WAPT/control