summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/xmlrpc-c/package.py
blob: 080b08658495c83f81c75f27b01877a1e5ef9c21 (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
# Copyright 2013-2024 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.package import *


class XmlrpcC(AutotoolsPackage):
    """Programming library for writing an XML-RPC server or client in
    C or C++."""

    homepage = "https://sourceforge.net/projects/xmlrpc-c/"
    url = "https://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.51.06/xmlrpc-c-1.51.06.tgz"

    license("BSD-3-Clause AND MIT", checked_by="tgamblin")

    version("1.51.06", sha256="06dcd87d9c88374559369ffbe83b3139cf41418c1a2d03f20e08808085f89fd0")

    variant("curl", default=False, description="Build the XMLRPC curl client")
    depends_on("curl", when="+curl")

    def configure_args(self):
        args = self.enable_or_disable("curl-client", variant="curl")
        if self.spec.target.family == "aarch64":
            args.append("--build=arm-linux")

        return args

    def build(self, spec, prefix):
        make()
        with working_dir("tools"):
            make()

    def install(self, spec, prefix):
        make("install")
        with working_dir("tools"):
            make("install")