tis-rocketchat

3.0.2-9
Rocket.Chat permit to communicate and collaborate with your team, share files, chat in real time or switch to video/audio conferencing.
8012 downloads
Download

  Description 

  • package : tis-rocketchat
  • version : 3.0.2-9
  • architecture : all
  • categories : Messaging
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Rocket.Chat permit to communicate and collaborate with your team, share files, chat in real time or switch to video/audio conferencing.
  • locale : all
  • target_os : linux
  • min_os_version :
  • max_os_version :
  • min_wapt_version : 1.8.2
  • sources : https://github.com/RocketChat/Rocket.Chat/releases
  • installed_size :
  • impacted_process : Rocket.Chat
  • description_fr : Rocket.Chat permet de communiquer et collaborer avec votre équipe, partager des fichiers, chatter en temps réel ou passer en conférence audio/vidéo.
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Team Rocket.Chat
  • licence : MIT
  • signature_date : 2020-10-13T15:39:41.013862
  • Homepage : https://rocket.chat/

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_deb_string = 'rocketchat_%s_amd64.deb'
bin_name_rpm_string = 'rocketchat-%s.x86_64.rpm'
package_name = 'rocketchat'


def install():
    # Specific app values
    package_version = control.version.split('-')[0]
    bin_name_deb = bin_name_deb_string % package_version
    bin_name_rpm = bin_name_rpm_string  % package_version

    # Installing the package
    if platform.linux_distribution()[0].lower() in ['debian','ubuntu','mint']:
        print('Installing: %s' % bin_name_deb)
        install_deb(bin_name_deb)

    if platform.linux_distribution()[0].lower() in ['centos linux','centos','suse','fedora','redhat']:
        print('Installing: %s' % bin_name_rpm)
        install_yum(bin_name_rpm)


def uninstall():
    # Uninstalling the package
    if platform.linux_distribution()[0].lower() in ['debian','ubuntu','mint']:
        print('Uninstalling: %s' % package_name)
        uninstall_apt(package_name)

    if platform.linux_distribution()[0].lower() in ['centos linux','centos','suse','fedora','redhat']:
        print('Uninstalling: %s' % package_name)
        uninstall_yum(package_name)


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

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Specific app values
    app_name = control.name
    git_repo = 'RocketChat/Rocket.Chat.Electron'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo
    bin_deb_end = bin_name_deb_string.split('%s')[-1]
    bin_rpm_end = bin_name_rpm_string.split('%s')[-1]

    # Getting latest informations from Github API
    json_load = json.loads(wgets(url_api,proxies=proxy))

    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_deb_end):
            url_dl_deb = download['browser_download_url']
            break
    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_rpm_end):
            url_dl_rpm = download['browser_download_url']
            break
    
    version = json_load['tag_name']

    latest_bin_deb = bin_name_deb_string % version
    latest_bin_rpm = bin_name_rpm_string % version

    print('Latest ' + app_name + ' version is: ' + version)
    print('Download url for APT-based systems is: ' + url_dl_deb)
    print('Download url for YUM-based systems is: ' + url_dl_rpm)

    # Downloading latest binaries
    if not isfile(latest_bin_deb):
        print('Downloading: ' + latest_bin_deb)
        wget(url_dl_deb,latest_bin_deb,proxies=proxy)

    if not isfile(latest_bin_rpm):
        print('Downloading: ' + latest_bin_rpm)
        wget(url_dl_rpm,latest_bin_rpm,proxies=proxy)

        # Changing version of the package
        pe = PackageEntry().load_control_from_wapt('.')
        pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
        pe.save_control_to_wapt('.')
        print('Changing version to ' + pe.version + ' in WAPT\\control')
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date')

    # Deleting outdated binaries
    for bin_in_dir in glob.glob('*.deb') and glob.glob('*.rpm'):
        if bin_in_dir != latest_bin_rpm and bin_in_dir != latest_bin_deb:
            print('Outdated binary: ' + bin_in_dir + ' Deleted')
            remove_file(bin_in_dir)



										

  Changelog 


Changelog software url : https://github.com/RocketChat/Rocket.Chat.Electron/releases/

No changelog
  manifest.sha256 
[["rocketchat-3.0.2.x86_64.rpm","792cccf779f29e12e58a3aa42e2c31f9e959b7bccb8973c2c8e2221f1cb5d8b7"],["rocketchat_3.0.2_amd64.deb","2b5e814548d8b2dad2e8c2e09142574c8d1e224f01d8be78e31fe947cb03236c"],["setup.py","6f0ce5958b3cc0cf7de31cd9bcce74004f48d38fa63d0719d4e07551abd9cebe"],["WAPT/icon.png","b8127266889154a1af4f52b3add4e58cbb948d26621a60a81a5ce52243b4ed21"],["WAPT/wapt.psproj","39d59e4b264b47219b507096ff5a17a34388b6f42d62fc2b5daf6710d6dc9aa8"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","2781fa081379c9401ec294f2c99308ec330461edfc6d3e1daa0b012197a1e8f5"]]