summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fpart/package.py
blob: 12a07a01a83685f591aa8e1b0746c51733c3c9c8 (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
# 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 Fpart(AutotoolsPackage):
    """Fpart is a filesystem partitioner. It helps you sort file trees and pack them
    into bags (called "partitions"). Fpsync wraps fpart and rsync, tar, or cpio
    to launch several synchronization jobs in parallel."""

    homepage = "https://www.fpart.org"
    url = "https://github.com/martymac/fpart/archive/refs/tags/fpart-1.5.1.tar.gz"
    git = "https://github.com/martymac/fpart.git"

    maintainers("drkrynstrng")

    license("BSD-2-Clause")

    version("master", branch="master")
    version("1.5.1", sha256="c353a28f48e4c08f597304cb4ebb88b382f66b7fabfc8d0328ccbb0ceae9220c")

    variant("embfts", default=False, description="Build with embedded fts functions")
    variant("static", default=False, description="Build static binary")
    variant("debug", default=False, description="Build with debugging support")
    # fpsync has the following run dependencies, at least one is required
    variant(
        "fpsynctools",
        default="rsync",
        values=("rsync", "tar", "cpio"),
        multi=True,
        description="Tools used by fpsync to copy files",
    )

    depends_on("autoconf", type="build")
    depends_on("automake", type="build")
    depends_on("libtool", type="build")
    depends_on("rsync", when="fpsynctools=rsync", type="run")
    depends_on("tar", when="fpsynctools=tar", type="run")
    depends_on("cpio", when="fpsynctools=cpio", type="run")

    def configure_args(self):
        config_args = []
        config_args.extend(self.enable_or_disable("embfts"))
        config_args.extend(self.enable_or_disable("static"))
        config_args.extend(self.enable_or_disable("debug"))
        return config_args