2024-01-02 16:21:30 +08:00
|
|
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
2019-08-29 10:30:00 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2019-08-29 10:30:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Attr(AutotoolsPackage):
|
|
|
|
"""Commands for Manipulating Filesystem Extended Attributes"""
|
|
|
|
|
|
|
|
homepage = "https://savannah.nongnu.org/projects/attr"
|
|
|
|
url = "http://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz"
|
|
|
|
|
2023-12-23 03:29:11 +08:00
|
|
|
license("LGPL-2.1-or-later")
|
|
|
|
|
2020-03-19 22:24:35 +08:00
|
|
|
version("2.4.48", sha256="5ead72b358ec709ed00bbf7a9eaef1654baad937c001c044fe8b74c57f5324e7")
|
2019-08-29 10:30:00 +08:00
|
|
|
version("2.4.47", sha256="25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859")
|
|
|
|
version("2.4.46", sha256="dcd69bdca7ff166bc45141eddbcf21967999a6b66b0544be12a1cc2fd6340e1f")
|
|
|
|
|
2020-03-19 22:24:35 +08:00
|
|
|
def url_for_version(self, version):
|
|
|
|
if version >= Version("2.4.48"):
|
|
|
|
url = "http://download.savannah.gnu.org/releases/attr/attr-{0}.tar.gz"
|
|
|
|
else:
|
|
|
|
url = "http://download.savannah.gnu.org/releases/attr/attr-{0}.src.tar.gz"
|
|
|
|
return url.format(version)
|
|
|
|
|
2019-08-29 10:30:00 +08:00
|
|
|
def configure_args(self):
|
|
|
|
args = []
|
|
|
|
args.append("--disable-static")
|
|
|
|
return args
|
|
|
|
|
2021-09-14 00:21:35 +08:00
|
|
|
# Ref. https://www.linuxfromscratch.org/blfs/view/7.5/postlfs/attr.html
|
2019-08-29 10:30:00 +08:00
|
|
|
def install(self, spec, prefix):
|
2020-03-19 22:24:35 +08:00
|
|
|
if self.version >= Version("2.4.48"):
|
|
|
|
make("install")
|
|
|
|
else:
|
|
|
|
make("install", "install-dev", "install-lib")
|