Détails du package smp-seafile_7.0.1-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           : 7.0.1-1
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
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      : 97619ae3-da83-44b6-8f28-996616e5d831
valid_from        : 
valid_until       : 
forced_install_on : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : iFwvPpF4a/+x+QaZuUwZeUKEaYl9n1PsSytlFaC1NoVhy289Yn48kAu1Cg8yz0nfdA1QPYgQFCr2bTmGDYzJfpUKgSXMdwiBx1p2FgbJmr9asanpijWbD2svePuEKLnkK8CcXGycY8SH5tjXuPwD0IH9dPStUkQTcQSnQDfidnSfp5KcD5HAPQD+mmkYPkH/CaNfTQhRUGzjThB0ODpVuNH/fevSCiAxE+MFZ9bCndNHOczLhLDS3H+TTMB/ImL38CpvK0Xu8UTUKHxK9KTPlnFAs1EJDn862iCN2V/TPpe8o5CfRwnd60dr8KW/TfYypijV4uWLPKWbbYJJjZHcJg==
signature_date    : 2019-07-12T21:56:56.285000
signed_attributes : package,version,architecture,section,priority,name,categories,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,valid_from,valid_until,forced_install_on,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()