From cb049725927d69567b8ec1664b3ae1835313b7b3 Mon Sep 17 00:00:00 2001 From: Muhammad Gema Akbar Date: Fri, 29 Nov 2024 14:40:12 +0100 Subject: [PATCH 1/4] add package.py --- package.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package.py diff --git a/package.py b/package.py new file mode 100644 index 0000000..fb8f341 --- /dev/null +++ b/package.py @@ -0,0 +1,50 @@ +# Copyright 2013-2024 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) + +# ---------------------------------------------------------------------------- +# If you submit this package back to Spack as a pull request, +# please first remove this boilerplate and all FIXME comments. +# +# This is a template package file for Spack. We've put "FIXME" +# next to all the things you'll want to change. Once you've handled +# them, you can save this file and test your package like this: +# +# spack install spack-exercise +# +# You can edit this file again by typing: +# +# spack edit spack-exercise +# +# See the Spack documentation for more information on packaging. +# ---------------------------------------------------------------------------- +from spack.package import * + + +class SpackExercise(CMakePackage): + """FIXME: Put a proper description of your package here.""" + + # FIXME: Add a proper url for your package's homepage here. + homepage = "https://simulation-software-engineering.github.io/homepage/" + url = "https://github.com/Simulation-Software-Engineering/spack-exercise/archive/refs/tags/v0.3.0.tar.gz" + + # FIXME: Add a list of GitHub accounts to + # notify when the package is updated. + maintainers("mgemaakbar") + + # FIXME: Add the SPDX identifier of the project's license below. + # See https://spdx.org/licenses/ for a list. Upon manually verifying + # the license, set checked_by to your Github username. + license("MIT", checked_by="mgemaakbar") + + # FIXME: Add proper versions here. + version("0.1.0", sha256='cac78e641cb703e3fe51956f91fe8347ac52f74ef037d8eadae5777c65a19a00') + version("0.2.0", sha256='3dd6b4cc0f7aff179d8e290bc3879056237ae372738a4bd7222f6450fbcdfc77') + version("0.3.0", sha256='e54a4c037941d85a22fb3e6e73195df8448cf69a96aa44ef374ac518344812f0') + + # FIXME: Add dependencies if required. + variant('boost', default=True, description='boost dependency') + variant('yaml-cpp', default=True, description='yaml-cpp dependency') + depends_on("boost@1.65.1:",when="@0.2.0:") + depends_on("yaml-cpp@0.7.0:",when="@0.3.0:") From edabb535746f7dbe70c5b785ae870f78ba359a5f Mon Sep 17 00:00:00 2001 From: Muhammad Gema Akbar Date: Sun, 1 Dec 2024 18:17:22 +0100 Subject: [PATCH 2/4] optional task: add main branch as one of the version --- package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.py b/package.py index fb8f341..bfe5633 100644 --- a/package.py +++ b/package.py @@ -28,6 +28,7 @@ class SpackExercise(CMakePackage): # FIXME: Add a proper url for your package's homepage here. homepage = "https://simulation-software-engineering.github.io/homepage/" url = "https://github.com/Simulation-Software-Engineering/spack-exercise/archive/refs/tags/v0.3.0.tar.gz" + git = "https://github.com/Simulation-Software-Engineering/spack-exercise.git" # FIXME: Add a list of GitHub accounts to # notify when the package is updated. @@ -39,6 +40,7 @@ class SpackExercise(CMakePackage): license("MIT", checked_by="mgemaakbar") # FIXME: Add proper versions here. + version("main", git = git, branch="main") version("0.1.0", sha256='cac78e641cb703e3fe51956f91fe8347ac52f74ef037d8eadae5777c65a19a00') version("0.2.0", sha256='3dd6b4cc0f7aff179d8e290bc3879056237ae372738a4bd7222f6450fbcdfc77') version("0.3.0", sha256='e54a4c037941d85a22fb3e6e73195df8448cf69a96aa44ef374ac518344812f0') From ff5125db06716c0a623a728e8beb949c6f959611 Mon Sep 17 00:00:00 2001 From: Muhammad Gema Akbar Date: Tue, 3 Dec 2024 23:14:23 +0100 Subject: [PATCH 3/4] Minor change --- package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.py b/package.py index bfe5633..0d37f15 100644 --- a/package.py +++ b/package.py @@ -39,12 +39,13 @@ class SpackExercise(CMakePackage): # the license, set checked_by to your Github username. license("MIT", checked_by="mgemaakbar") - # FIXME: Add proper versions here. version("main", git = git, branch="main") version("0.1.0", sha256='cac78e641cb703e3fe51956f91fe8347ac52f74ef037d8eadae5777c65a19a00') version("0.2.0", sha256='3dd6b4cc0f7aff179d8e290bc3879056237ae372738a4bd7222f6450fbcdfc77') version("0.3.0", sha256='e54a4c037941d85a22fb3e6e73195df8448cf69a96aa44ef374ac518344812f0') + depends_on("cxx", type="build") + # FIXME: Add dependencies if required. variant('boost', default=True, description='boost dependency') variant('yaml-cpp', default=True, description='yaml-cpp dependency') From ed47b171cb1c74a6599c6af801b8df67f0e4f1e2 Mon Sep 17 00:00:00 2001 From: Muhammad Gema Akbar Date: Tue, 3 Dec 2024 23:32:07 +0100 Subject: [PATCH 4/4] remove comment --- package.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/package.py b/package.py index 0d37f15..437c407 100644 --- a/package.py +++ b/package.py @@ -1,27 +1,5 @@ -# Copyright 2013-2024 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) - -# ---------------------------------------------------------------------------- -# If you submit this package back to Spack as a pull request, -# please first remove this boilerplate and all FIXME comments. -# -# This is a template package file for Spack. We've put "FIXME" -# next to all the things you'll want to change. Once you've handled -# them, you can save this file and test your package like this: -# -# spack install spack-exercise -# -# You can edit this file again by typing: -# -# spack edit spack-exercise -# -# See the Spack documentation for more information on packaging. -# ---------------------------------------------------------------------------- from spack.package import * - class SpackExercise(CMakePackage): """FIXME: Put a proper description of your package here."""