Détails du package smp-seafile_6.2.11-1_all_all.wapt
retour Revenir à la liste des packages

smp-seafile

ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-seafile
version           : 6.2.11-1
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Windows client for cloud file storage Seafile
depends           : 
conflicts         : 
maturity          : 
locale            : all
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 221257728
impacted_process  : seaf-daemon.exe,seafile-applet.exe
description_fr    : Client Windows pour le stockage de fichiers cloud Seafile
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 0dbedd83-0746-4c39-b96c-a14c6be7eedd
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : WfKsJnFQUjpqTkQYqEKdzSgdanOGlv/VeBFrjNk5uegGGrCAgGxykpJkSvl7RyRFZh0AXMpH6yg55EMYDScrx7MPXI/nsHWmBif7DPrfzJ4cGyPMSPY3cPc4hzNROw6yhn2o5W87Y4UkliAjU16ZRYXRcmz826gmQ3uPKvC1Qo4DLqlsgJyasiXxRhP8n4O3Y5SVxPopVt5pxOmOLWtDPlVPgnYY3lMjPtnZZ+1jgG7Y+MDAyoSAq40RWTc+iFqgkCIfCt7RR5+Pd3JuqieghKdrmEkdMNvsrirxJaRUi18sj/b9Wpt1nGdZIaMQBFOUEclit1bCi/ytdQUYjdtZ+Q==
signature_date    : 20190119-160030
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

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

# registry key(s) where WAPT will find how to remove the application(s)
uninstallkey = []

def install():
    diskfreespacebefore = get_disk_free_space(programfiles)

    versionsoft = control['version'].split('-',1)[0]
    install_msi_if_needed("seafile-%s-en.msi" % versionsoft,killbefore = ['seaf-daemon','seafile-applet'])
    uninstallkey.remove(get_msi_properties("seafile-%s-en.msi" % versionsoft)['ProductCode'])
    remove_desktop_shortcut('Seafile')

    diskfreespaceafter = get_disk_free_space(programfiles)
    difffreespace = diskfreespacebefore - diskfreespaceafter
    print(ur"Espace disque necessaire pour l'installation : " + str(difffreespace))

def update_package():
    import re
    index = wgets('https://www.seafile.com/en/download/')
    re_versions = re.compile('<a href="https://download.seadrive.org/seafile-([\d\.]*)-en.msi"')
    # find latest
    last_version = sorted(re_versions.findall(index))[-1]
    print last_version
    download_url = 'https://download.seadrive.org/seafile-%s-en.msi' % last_version
    localfile = 'seafile-%s-en.msi' % last_version
    if not isfile(localfile):
        wget(download_url,localfile)

    # recup changelog
    #from BeautifulSoup import BeautifulSoup
    #bs = BeautifulSoup(wgets('https://seacloud.cc/group/3/wiki/client-changelog'))

    # removes old msi
    msis = glob.glob('*.msi')
    for fn in msis:
        if fn != localfile:
            remove_file(fn)

    control = PackageEntry().load_control_from_wapt ('.')
    control.version = '%s-0'% last_version
    control.save_control_to_wapt('.')


def uninstall():
    import time
    try:
        for seafile in installed_softwares('seafile'):
            run(uninstall_cmd(seafile['key']),timeout=20)
    except:
        killalltasks('seafile-applet.exe')
        time.sleep(30)
        if installed_softwares('seafile'):
            error('Error found seafile')


if __name__ == '__main__':
    update_package()