summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorOlivier Cessenat <cessenat@gmail.com>2021-02-12 14:42:43 +0100
committerGitHub <noreply@github.com>2021-02-12 07:42:43 -0600
commitca7d1c29bc118f000c111674dedc4e3f428ab706 (patch)
treee011a8f20d226bd64c4992d8bd5bb72d34525413 /var
parent5d9c17d2bf633b0ad7cc1a0c17e46097d0702360 (diff)
downloadspack-ca7d1c29bc118f000c111674dedc4e3f428ab706.tar.gz
spack-ca7d1c29bc118f000c111674dedc4e3f428ab706.tar.bz2
spack-ca7d1c29bc118f000c111674dedc4e3f428ab706.tar.xz
spack-ca7d1c29bc118f000c111674dedc4e3f428ab706.zip
ocamlbuild: new package (#21559)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ocamlbuild/package.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ocamlbuild/package.py b/var/spack/repos/builtin/packages/ocamlbuild/package.py
new file mode 100644
index 0000000000..0bee1bfd19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ocamlbuild/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2021 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 Ocamlbuild(MakefilePackage):
+ """OCamlbuild is a generic build tool,
+ that has built-in rules for building OCaml library and programs."""
+
+ # Add a proper url for your package's homepage here.
+ homepage = "https://ocaml.org/learn/tutorials/ocamlbuild/"
+ url = "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz"
+ git = "https://github.com/ocaml/ocamlbuild/ocamlbuild.git"
+
+ # Add a list of GitHub accounts to
+ # notify when the package is updated.
+ maintainers = ['scemama', 'cessenat']
+
+ # Add proper versions here.
+ version('master', branch='master')
+ version('0.14.0', sha256='87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78')
+ version('0.13.1', sha256='79839544bcaebc8f9f0d73d029e2b67e2c898bba046c559ea53de81ea763408c')
+
+ # Add dependencies if required.
+ depends_on('ocaml')
+
+ # Installation : https://github.com/ocaml/ocamlbuild/
+ def edit(self, spec, prefix):
+ makefile_inc = [
+ 'BINDIR = bin',
+ 'LIBDIR = lib',
+ 'MANDIR = man',
+ ]
+ makefile_inc.append('OCAML_PREFIX = %s' % self.spec['ocaml'].prefix)
+ makefile_inc.append('DESTDIR = %s/' % self.spec.prefix)
+ with open('Makefile.config', 'a') as fh:
+ fh.write('\n'.join(makefile_inc))
+ make('configure')