tis-ultradefrag

7.0.2-1
Ultradefrag: Utilitaire de defragmentation
3754 downloads
Download
default icon

  Description 

  • package : tis-ultradefrag
  • version : 7.0.2-1
  • architecture : all
  • categories :
  • maintainer : Tranquil IT Systems
  • description : Ultradefrag: Utilitaire de defragmentation
  • 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 :
  • editor :
  • licence :
  • signature_date : 2020-02-27T21:42:22.963423

  Setup.py 

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

uninstallkey = []

software_name = "UltraDefrag"

def install():
    print('installing %s' % software_name)
    versionsoft = control['version'].split('-',1)[0]
    if iswin64():
        install_exe_if_needed("ultradefrag-%s.bin.amd64.exe" % versionsoft,"/S",key="UltraDefrag",min_version=versionsoft,killbefore='ultradefrag.exe')
    else:
        install_exe_if_needed("ultradefrag-%s.bin.i386.exe" % versionsoft,"/S",key="UltraDefrag",min_version=versionsoft,killbefore='ultradefrag.exe')


def update_package():
    import BeautifulSoup,requests,re
    from waptpackage import PackageEntry
    verify=True
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe['version'].split('-',1)[0]

    base_url = "http://ultradefrag.sourceforge.net/en/index.html?download"

    page = requests.get(base_url,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=verify).text
    bs = BeautifulSoup.BeautifulSoup(page)
    bs_raw_string = str(bs.find('div',{'class':'mpart'}).find('h2').find('strong').text)
    software_version = re.findall('STABLE RELEASE (.*)',str(bs_raw_string))[0]

    print "Current %s WAPT package version is : %s" % (software_name,current_version)
    print "Latest %s version available is : %s" % (software_name,software_version)

    if Version(current_version) < Version(software_version):
        print("%s package is not up-to-date, updating" % software_name)
        print("Cleanup current files")

        filename = "ultradefrag-%s.bin.i386.exe" % software_version
        filename64 = "ultradefrag-%s.bin.amd64.exe" % software_version

        for exe in glob.glob('*.exe'):
            if exe not in {filename,filename64}:
                remove_file(exe)

        print("Downloading latest version")
        download_url = 'https://freefr.dl.sourceforge.net/project/ultradefrag/stable-release/%s/ultradefrag-%s.bin.i386.exe' % (software_version,software_version)
        download_url64 = 'https://freefr.dl.sourceforge.net/project/ultradefrag/stable-release/%s/ultradefrag-%s.bin.amd64.exe' % (software_version,software_version)
        wget(download_url,filename)
        wget(download_url64,filename64)

        pe.version = software_version + '-0'
        pe.save_control_to_wapt(os.getcwd())
    else:
        print("No update needed, package already up to date")

if __name__ == "__main__":
    update_package()
										

  Changelog 



No changelog.txt.
									
  manifest.sha256