summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/istio/package.py
blob: 7cb7f5504594373943420c732ff6b8909fa7020f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 2013-2023 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)

import platform

from spack.package import *

_versions = {
    "1.6.7": {
        "Linux-aarch64": "22b0f94efafe9f221c00f4599d9a04e473554515e5fdf8d119fd27e27e36c89f",
        "Linux-x86_64": "3243d2c4bb7a116aa04a6bc21d289fb73cdc704988af1749d2a1f0fb5426be36",
    },
    "1.6.6": {
        "Linux-aarch64": "b122a0abde24b7680194f504815db5e054483b3657292a6150104e9d129787a5",
        "Linux-x86_64": "3f092ffb3a1c13eccfadb42fe14166049535945f349241f90a91d97e57036da7",
    },
    "1.6.5": {
        "Linux-aarch64": "c32ed12be0e2bb33bae510fd6b680656990bf2c2ba6059277b6f463a195355a0",
        "Linux-x86_64": "68e58e8aec544c2b72377f7c334f90f6215bc819f3ed71ac952692cc5c9b73ac",
    },
    "1.6.4": {
        "Linux-aarch64": "700416965f48f91ce5a654513b5aa4ed56dd5875e98af203389b3d20d55016b2",
        "Linux-x86_64": "97ce26edad734b4a324b1a3914cead3a38ac70a029dbe09777a483ec192d04df",
    },
}


class Istio(Package):
    """An open platform to connect, manage, and secure microservices."""

    homepage = "https://istio.io/"
    url = "https://github.com/istio/istio/releases/download/1.6.5/istio-1.6.5-linux-arm64.tar.gz"
    list_url = "https://github.com/istio/istio/releases/download"
    list_depth = 1

    for ver, packages in _versions.items():
        key = "{0}-{1}".format(platform.system(), platform.machine())
        sha_val = packages.get(key)
        if sha_val:
            version(ver, sha256=sha_val)

    def url_for_version(self, version):
        url = "https://github.com/istio/istio/releases/download/{0}/istio-{0}-linux-{1}.tar.gz"
        if platform.machine() == "aarch64":
            aarch = "arm64"
        elif platform.machine() == "x86_64":
            aarch = "amd64"
        else:
            aarch = "unknown"
        return url.format(version, aarch)

    def install(self, spec, prefix):
        install_tree(".", prefix)