summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-08-31 09:41:46 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-08-31 09:41:46 -0700
commitc45c8919c7232eb20023484f6d1fc9f1f50395d8 (patch)
treecc12eb307c1611494948645e4b487fa06495c3d2 /pkg/deb
parent88c90e1c351ab8c5bd487a5cd4b735014b08e271 (diff)
parent9b22b6957bc87b3df002d0bc691fdae6a20abdac (diff)
downloadunit-c45c8919c7232eb20023484f6d1fc9f1f50395d8.tar.gz
unit-c45c8919c7232eb20023484f6d1fc9f1f50395d8.tar.bz2
Merged with the default branch.1.31.0-1
Diffstat (limited to 'pkg/deb')
-rw-r--r--pkg/deb/Makefile26
-rw-r--r--pkg/deb/Makefile.wasm47
-rw-r--r--pkg/deb/debian.module/copyright.unit-jsc1111
-rw-r--r--pkg/deb/debian.module/copyright.unit-jsc811
-rwxr-xr-xpkg/deb/debian.module/rules.in1
-rw-r--r--pkg/deb/debian/control.in4
-rw-r--r--pkg/deb/debian/copyright11
-rw-r--r--pkg/deb/debian/dirs1
-rw-r--r--pkg/deb/debian/rules.in10
9 files changed, 106 insertions, 16 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index 044b7226..f82441c6 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -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,19 @@ include Makefile.ruby
include Makefile.jsc-common
include Makefile.jsc8
include Makefile.jsc11
+include Makefile.wasm
+endif
+
+# Debian 12
+ifeq ($(CODENAME),bookworm)
+include Makefile.php
+include Makefile.python311
+include Makefile.go
+include Makefile.perl
+include Makefile.ruby
+include Makefile.jsc-common
+include Makefile.jsc17
+include Makefile.wasm
endif
# Debian 12
@@ -127,6 +145,7 @@ include Makefile.perl
include Makefile.ruby
include Makefile.jsc-common
include Makefile.jsc11
+include Makefile.wasm
endif
# Debian 10
@@ -139,13 +158,16 @@ include Makefile.perl
include Makefile.ruby
include Makefile.jsc-common
include Makefile.jsc11
+include Makefile.wasm
endif
CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
--statedir=/var/lib/unit \
--control="unix:/var/run/control.unit.sock" \
+ --runstatedir=/var/run \
--pid=/var/run/unit.pid \
+ --logdir=/var/log \
--log=/var/log/unit.log \
--tmpdir=/var/tmp \
--user=unit \
@@ -232,7 +254,7 @@ debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
unit: check-build-depends-unit debuild/unit_$(VERSION).orig.tar.gz debuild/$(SRCDIR)/debian/changelog
@echo "===> Building $@ package"
- cd debuild/$(SRCDIR) && debuild -us -uc
+ cd debuild/$(SRCDIR) && debuild --preserve-envvar PATH --preserve-envvar RUSTUP_HOME -us -uc
mkdir -p debs
find debuild/ -maxdepth 1 -type f -exec cp {} debs/ \;
ln -s debuild/$(SRCDIR)/build $@
@@ -305,7 +327,7 @@ endif
unit-%: check-build-depends-% | debuild-%
@echo "===> Building $@ package"
- cd debuild-$*/$(SRCDIR) && debuild -us -uc
+ cd debuild-$*/$(SRCDIR) && debuild --preserve-envvar PATH --preserve-envvar RUSTUP_HOME -us -uc
mkdir -p debs
find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \;
ln -s debuild-$*/$(SRCDIR)/build $@
diff --git a/pkg/deb/Makefile.wasm b/pkg/deb/Makefile.wasm
new file mode 100644
index 00000000..da028f19
--- /dev/null
+++ b/pkg/deb/Makefile.wasm
@@ -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
diff --git a/pkg/deb/debian.module/copyright.unit-jsc11 b/pkg/deb/debian.module/copyright.unit-jsc11
index b2e4a117..e11b64d3 100644
--- a/pkg/deb/debian.module/copyright.unit-jsc11
+++ b/pkg/deb/debian.module/copyright.unit-jsc11
@@ -1,12 +1,15 @@
NGINX Unit.
- Copyright 2017-2022 NGINX, Inc.
+ Copyright 2017-2023 NGINX, Inc.
+ Copyright 2017-2023 Andrei Zeliankou
+ Copyright 2018-2023 Konstantin Pavlov
+ Copyright 2021-2023 Zhidao Hong
+ Copyright 2021-2023 Alejandro Colomar
+ Copyright 2022-2023 Andrew Clayton
+ Copyright 2022-2023 Liam Crilly
Copyright 2017-2022 Valentin V. Bartenev
Copyright 2017-2022 Max Romanov
- Copyright 2017-2022 Andrei Zeliankou
- Copyright 2018-2022 Konstantin Pavlov
- Copyright 2021-2022 Zhidao Hong
Copyright 2021-2022 Oisín Canty
Copyright 2017-2021 Igor Sysoev
Copyright 2017-2021 Andrei Belov
diff --git a/pkg/deb/debian.module/copyright.unit-jsc8 b/pkg/deb/debian.module/copyright.unit-jsc8
index 1dab9cce..1d267021 100644
--- a/pkg/deb/debian.module/copyright.unit-jsc8
+++ b/pkg/deb/debian.module/copyright.unit-jsc8
@@ -1,12 +1,15 @@
NGINX Unit.
- Copyright 2017-2022 NGINX, Inc.
+ Copyright 2017-2023 NGINX, Inc.
+ Copyright 2017-2023 Andrei Zeliankou
+ Copyright 2018-2023 Konstantin Pavlov
+ Copyright 2021-2023 Zhidao Hong
+ Copyright 2021-2023 Alejandro Colomar
+ Copyright 2022-2023 Andrew Clayton
+ Copyright 2022-2023 Liam Crilly
Copyright 2017-2022 Valentin V. Bartenev
Copyright 2017-2022 Max Romanov
- Copyright 2017-2022 Andrei Zeliankou
- Copyright 2018-2022 Konstantin Pavlov
- Copyright 2021-2022 Zhidao Hong
Copyright 2021-2022 Oisín Canty
Copyright 2017-2021 Igor Sysoev
Copyright 2017-2021 Andrei Belov
diff --git a/pkg/deb/debian.module/rules.in b/pkg/deb/debian.module/rules.in
index 861a9c00..7814fbfd 100755
--- a/pkg/deb/debian.module/rules.in
+++ b/pkg/deb/debian.module/rules.in
@@ -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_$*)/
diff --git a/pkg/deb/debian/control.in b/pkg/deb/debian/control.in
index 579f41e3..bc757233 100644
--- a/pkg/deb/debian/control.in
+++ b/pkg/deb/debian/control.in
@@ -6,7 +6,9 @@ Build-Depends: debhelper (>= 11),
linux-libc-dev,
libssl-dev,
libpcre2-dev,
- pkg-config
+ pkg-config,
+ clang,
+ llvm
Standards-Version: 4.1.4
Homepage: https://unit.nginx.org
diff --git a/pkg/deb/debian/copyright b/pkg/deb/debian/copyright
index 487c92c5..692ae2e0 100644
--- a/pkg/deb/debian/copyright
+++ b/pkg/deb/debian/copyright
@@ -1,12 +1,15 @@
NGINX Unit.
- Copyright 2017-2022 NGINX, Inc.
+ Copyright 2017-2023 NGINX, Inc.
+ Copyright 2017-2023 Andrei Zeliankou
+ Copyright 2018-2023 Konstantin Pavlov
+ Copyright 2021-2023 Zhidao Hong
+ Copyright 2021-2023 Alejandro Colomar
+ Copyright 2022-2023 Andrew Clayton
+ Copyright 2022-2023 Liam Crilly
Copyright 2017-2022 Valentin V. Bartenev
Copyright 2017-2022 Max Romanov
- Copyright 2017-2022 Andrei Zeliankou
- Copyright 2018-2022 Konstantin Pavlov
- Copyright 2021-2022 Zhidao Hong
Copyright 2021-2022 Oisín Canty
Copyright 2017-2021 Igor Sysoev
Copyright 2017-2021 Andrei Belov
diff --git a/pkg/deb/debian/dirs b/pkg/deb/debian/dirs
index 2568bac1..552cdf7c 100644
--- a/pkg/deb/debian/dirs
+++ b/pkg/deb/debian/dirs
@@ -1,4 +1,5 @@
usr/bin
usr/sbin
usr/lib/unit
+usr/include/unit
var/lib/unit
diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in
index 0d7cf830..55a4ebec 100644
--- a/pkg/deb/debian/rules.in
+++ b/pkg/deb/debian/rules.in
@@ -25,6 +25,11 @@ njs:
cd pkg/contrib && make .njs
touch $@
+libunit-wasm:
+ dh_testdir
+ cd pkg/contrib && make .libunit-wasm
+ touch $@
+
config.env.%: njs
dh_testdir
mkdir -p $(BUILDDIR_$*)
@@ -92,7 +97,7 @@ build-arch: build-arch.unit build-arch.unit_debug
dh_testdir
touch $@
-build: build-arch build-indep
+build: build-arch build-indep libunit-wasm
dh_testdir
touch $@
@@ -123,6 +128,9 @@ install: build do.tests
install -m 644 README.md $(INSTALLDIR)/usr/share/doc/unit/
install -m 644 CONTRIBUTING.md $(INSTALLDIR)/usr/share/doc/unit/
install -m 644 NOTICE $(INSTALLDIR)/usr/share/doc/unit/
+ mkdir -p $(INSTALLDIR_dev)/usr/include/unit
+ install -m644 $(CURDIR)/pkg/contrib/libunit-wasm/src/c/libunit-wasm.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-wasm.a
+ install -m644 $(CURDIR)/pkg/contrib/libunit-wasm/src/c/include/unit/unit-wasm.h $(INSTALLDIR_dev)/usr/include/unit/
binary-indep: build install
dh_testdir