Packages: added wasm module packaging for deb-based distros.
This commit is contained in:
@@ -32,6 +32,7 @@ include Makefile.jsc17
|
||||
include Makefile.jsc18
|
||||
include Makefile.jsc19
|
||||
include Makefile.jsc20
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Ubuntu 22.10
|
||||
@@ -47,6 +48,7 @@ include Makefile.jsc11
|
||||
include Makefile.jsc17
|
||||
include Makefile.jsc18
|
||||
include Makefile.jsc19
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Ubuntu 22.04
|
||||
@@ -61,6 +63,7 @@ include Makefile.jsc-common
|
||||
include Makefile.jsc11
|
||||
include Makefile.jsc17
|
||||
include Makefile.jsc18
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Ubuntu 21.10
|
||||
@@ -77,6 +80,7 @@ include Makefile.jsc11
|
||||
include Makefile.jsc16
|
||||
include Makefile.jsc17
|
||||
include Makefile.jsc18
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Ubuntu 20.04
|
||||
@@ -89,6 +93,7 @@ include Makefile.perl
|
||||
include Makefile.ruby
|
||||
include Makefile.jsc-common
|
||||
include Makefile.jsc11
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Ubuntu 18.04
|
||||
@@ -104,6 +109,7 @@ include Makefile.ruby
|
||||
include Makefile.jsc-common
|
||||
include Makefile.jsc8
|
||||
include Makefile.jsc11
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Debian 12
|
||||
@@ -115,6 +121,7 @@ include Makefile.perl
|
||||
include Makefile.ruby
|
||||
include Makefile.jsc-common
|
||||
include Makefile.jsc17
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Debian 11
|
||||
@@ -127,6 +134,7 @@ include Makefile.perl
|
||||
include Makefile.ruby
|
||||
include Makefile.jsc-common
|
||||
include Makefile.jsc11
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
# Debian 10
|
||||
@@ -139,6 +147,7 @@ include Makefile.perl
|
||||
include Makefile.ruby
|
||||
include Makefile.jsc-common
|
||||
include Makefile.jsc11
|
||||
include Makefile.wasm
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS_COMMON=\
|
||||
|
||||
47
pkg/deb/Makefile.wasm
Normal file
47
pkg/deb/Makefile.wasm
Normal file
@@ -0,0 +1,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
|
||||
@@ -17,6 +17,7 @@ BASEDIR = $(CURDIR)
|
||||
|
||||
config.env.%:
|
||||
dh_testdir
|
||||
%%MODULE_PREBUILD%%
|
||||
mkdir -p $(BUILDDIR_$*)
|
||||
cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/
|
||||
cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/
|
||||
|
||||
Reference in New Issue
Block a user