summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/pciutils/package.py
blob: 84ca3db5869c33a998266f8f6f356df1e7d84ade (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
# Copyright 2013-2022 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 Pciutils(MakefilePackage):
    """This package contains the PCI Utilities."""

    homepage = "https://mj.ucw.cz/sw/pciutils/"
    url      = "https://github.com/pciutils/pciutils/archive/v3.7.0.tar.gz"

    version('3.7.0', sha256='ea768aa0187ba349391c6c157445ecc2b42e7d671fc1ce8c53ff5ef513f1e2ab')
    version('3.6.4', sha256='551d0ac33f030868b7e95c29e58dc2b1882455dbc9c15c15adf7086e664131f1')
    version('3.6.3', sha256='7ab0fbb35cffa326eb852539260562bac14f3d27cda8c70bc2cf3211ed97c014')

    variant('lib', default=False, description='Install libraries with headers')

    def build(self, spec, prefix):
        make('PREFIX={0}'.format(prefix))

    def install(self, spec, prefix):
        if '+lib' in spec:
            make('install-lib', 'install', 'PREFIX={0}'.format(prefix))
        else:
            make('install', 'PREFIX={0}'.format(prefix))

    def setup_run_environment(self, env):
        env.prepend_path('PATH', self.prefix.sbin)