Skip to content

Commit 797cb5e

Browse files
committed
[interpreter] Makefile support for opam releases
1 parent 3abc587 commit 797cb5e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

interpreter/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,13 @@ install: _build/$(LIB).cmx _build/$(LIB).cmo
206206
207207
uninstall:
208208
ocamlfind remove $(LIB)
209+
210+
opam-release/%:
211+
git tag opam-$*
212+
git push --tags
213+
wget https://github.com/WebAssembly/spec/archive/opam-$*.zip
214+
cp meta/opam/opam .
215+
sed s/@VERSION/$*/g opam >opam.tmp
216+
sed s/@MD5/`md5 -q opam-$*.zip`/g opam.tmp >opam
217+
rm opam.tmp
218+
echo Created file ./opam, submit to github opam-repository/packages/wasm/wasm.$*/opam

interpreter/meta/opam/opam

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
opam-version: "2.0"
2+
maintainer: "Andreas Rossberg <rossberg@mpi-sws.org>"
3+
authors: "Andreas Rossberg <rossberg@mpi-sws.org>"
4+
homepage: "https://github.com/WebAssembly/spec"
5+
bug-reports: "https://github.com/WebAssembly/spec/issues"
6+
license: "Apache-2.0"
7+
dev-repo: "git+https://github.com/WebAssembly/spec.git"
8+
build: [
9+
[make "-C" "interpreter" "opt" "unopt"]
10+
]
11+
install: [make "-C" "interpreter" "install"]
12+
depends: [
13+
"ocaml" {>= "4.12.0"}
14+
"ocamlfind" {build}
15+
"ocamlbuild" {build}
16+
]
17+
synopsis:
18+
"Library to read and write WebAssembly (Wasm) files and manipulate their AST"
19+
url {
20+
src: "https://github.com/WebAssembly/spec/archive/opam-@VERSION.zip"
21+
checksum: "md5=@MD5"
22+
}

0 commit comments

Comments
 (0)