From aac839faec4f89d89248add9f7be3a8222b5863c Mon Sep 17 00:00:00 2001 From: Nikhil Date: Tue, 2 Dec 2025 19:12:43 +0100 Subject: [PATCH] =?UTF-8?q?Add=20complete=20Spack=20package=20for=20spack-?= =?UTF-8?q?exercise=20with=20versions=200.1.0=E2=80=930.3.0=20and=20verifi?= =?UTF-8?q?ed=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package.py diff --git a/package.py b/package.py new file mode 100644 index 0000000..577072a --- /dev/null +++ b/package.py @@ -0,0 +1,42 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack_repo.builtin.build_systems.cmake import CMakePackage +from spack.package import * + + +class SpackExercise(CMakePackage): + """Example C++ project from the Simulation Software Engineering course + demonstrating basic CMake and dependency handling, packaged with Spack. + """ + + homepage = "https://simulation-software-engineering.github.io/homepage/" + url = "https://github.com/Simulation-Software-Engineering/spack-exercise/archive/refs/tags/v0.1.0.tar.gz" + + maintainers("nikhil-4595") + + # The upstream repo uses the MIT license (see LICENSE file in the project) + license("MIT", checked_by="nikhil-4595") + + version( + "0.3.0", + sha256="c179ccc9d56b724fcb7eeff8cebbc1afe2797929b99aa6e7d9b8478a014f2d02", + ) + version( + "0.2.0", + sha256="010c900a3d4770116844636b89c1e42b1920f27c3da615543fb14f2ae9bb7f64", + ) + version( + "0.1.0", + sha256="f1c212a58376fd78e9854576627e6927d7cb93ccffe3a162b1664570c491e3a7", + ) + + depends_on("cxx", type="build") + depends_on("c", type="build") + + # Boost is required starting from version 0.2.0 + depends_on("boost@1.65.1:", when="@0.2.0:") + + # yaml-cpp is only required for version 0.3.0 and newer + depends_on("yaml-cpp@0.7.0:", when="@0.3.0:")