# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Libssh(CMakePackage):
    """libssh: the SSH library"""

    homepage = "https://www.libssh.org"
    url      = "https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz"

    version('0.7.5', 'd3fc864208bf607ad87cdee836894feb')

    depends_on('openssl')
    depends_on('zlib')

@@ -344,11 +344,11 @@
 s://
-red
+www
 .lib
@@ -359,31 +359,16 @@
 org/
-attachments/download/21
+files/0.
 8/li
@@ -374,17 +374,17 @@
 ibssh-0.
-7
+8
 .5.tar.x
@@ -406,96 +406,391 @@
 ('0.
-7.5', 'd3fc864208bf607ad87cdee836894feb')%0A%0A    depends_on('openssl')%0A    depends_on('zlib'
+8.5', '07d2c431240fc88f6b06bcb36ae267f9afeedce2e32f6c42f8844b205ab5a335')%0A    version('0.7.5', 'd3fc864208bf607ad87cdee836894feb')%0A%0A    depends_on('openssl@:1.0', when='@:0.7')%0A    depends_on('openssl')%0A    depends_on('zlib')%0A%0A    def url_for_version(self, version):%0A        url = %22https://www.libssh.org/files/%7B0%7D/libssh-%7B1%7D.tar.xz%22%0A        return url.format(version.up_to(2), version
 )%0A

fix fetching and add 0.8.5 (#9779)