summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/Makefile.wasm
blob: da028f1998828baf0818d713b061ac5baed9293f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
MODULES+=		wasm
MODULE_SUFFIX_wasm=	wasm

MODULE_SUMMARY_wasm=	WASM module for NGINX Unit

MODULE_VERSION_wasm=	$(VERSION)
MODULE_RELEASE_wasm=	1

MODULE_CONFARGS_wasm=	wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/target/release
MODULE_MAKEARGS_wasm=	wasm
MODULE_INSTARGS_wasm=	wasm-install

MODULE_SOURCES_wasm=

BUILD_DEPENDS_wasm=
MODULE_BUILD_DEPENDS_wasm=
MODULE_DEPENDS_wasm=

BUILD_DEPENDS+=		$(BUILD_DEPENDS_wasm)

define MODULE_PREBUILD_wasm
	\$$(MAKE) -C pkg/contrib .wasmtime
endef
export MODULE_PREBUILD_wasm

define MODULE_PREINSTALL_wasm
endef
export MODULE_PREINSTALL_wasm

define MODULE_POSTINSTALL_wasm
	mkdir -p debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/
	install -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/
endef
export MODULE_POSTINSTALL_wasm

define MODULE_POST_wasm
cat <<BANNER
----------------------------------------------------------------------

The $(MODULE_SUMMARY_wasm) has been installed.

Online documentation is available at https://unit.nginx.org

----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_wasm