summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/nicstat/package.py
blob: 57bb609856c7869cc5ae1b4b7d6b7cb38f359a52 (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
# Copyright 2013-2019 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 Nicstat(MakefilePackage):
    """
    Nicstat is a Solaris and Linux command-line that prints out network
    statistics for all network interface cards (NICs), including packets,
    kilobytes per second, average packet sizes and more.
    """

    homepage = "https://github.com/scotte/nicstat"
    url      = "https://jaist.dl.sourceforge.net/project/nicstat/nicstat-1.95.tar.gz"

    version('1.95', sha256='c4cc33f8838f4523f27c3d7584eedbe59f4c587f0821612f5ac2201adc18b367')

    def edit(self, spec, prefix):
        copy('Makefile.Linux', 'makefile')
        filter_file(r'CMODEL =\s+-m32', '', 'makefile')
        filter_file('sudo', '', 'makefile', string=True)

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