tis-seafile 6.1.1-21

  • package : tis-seafile
  • version : 6.1.1-21
  • description : Windows client for cloud file storage Seafile (HaiWenHuZhi ltd.), Desinstallation non silencieuse.
  • maintainer : Hubert TOUVET, Amelie LE JEUNE
  • date : 2017-09-21 08:48:04
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170921-084755
  • min_os_version :
  • min_wapt_version :

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():
    for fn in glob.glob('*.msi'):
        install_msi_if_needed(fn,killbefore = ['seaf-daemon','seafile-applet'])

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)

    package_version = control.version.split('-')[1]
    for fn in glob.glob('*.msi'):
        control.version = "%s-%s" % (fn.split('-')[1],package_version)
    control.save_control_to_wapt()
    return control.version

if __name__ == '__main__':
    update_package()


    

manifest

[["WAPT/icon.png", "f25eb08542d55efb4326e07173514eaeeb120ece"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["setup.py", "1a7dfd5c4d3512488f20de5d309ca3e707a2d969"], ["seafile-6.1.1-en.msi", "d1c2a2ab95220e0880fbc1548c9eb1fd41130ca9"], ["WAPT/control", "6bd59c4dca518ac816236fbb1aefe44ead9929bb"], ["WAPT/changelog.txt", "1aa21d7e107cae40f71b56c55901ce12afc7cd53"]]