summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/licenses-1/package.py18
-rw-r--r--var/spack/repos/builtin/packages/zlib/package.py2
2 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/licenses-1/package.py b/var/spack/repos/builtin.mock/packages/licenses-1/package.py
new file mode 100644
index 0000000000..d5c67830c9
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/licenses-1/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2023 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 Licenses1(Package):
+ """Package with a licenses field."""
+
+ homepage = "https://www.example.com"
+ url = "https://www.example.com/license"
+
+ license("MIT", when="+foo")
+ license("Apache-2.0", when="~foo")
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py
index a4edbea4a0..144e3b0ec6 100644
--- a/var/spack/repos/builtin/packages/zlib/package.py
+++ b/var/spack/repos/builtin/packages/zlib/package.py
@@ -60,6 +60,8 @@ class Zlib(MakefilePackage, Package):
provides("zlib-api")
+ license("Zlib")
+
@property
def libs(self):
shared = "+shared" in self.spec