diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/deb/Makefile | 28 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc-common | 28 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc10 | 53 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc11 | 53 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc8 | 53 |
5 files changed, 210 insertions, 5 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index ffd9aa2e..3d747402 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -26,6 +26,9 @@ include Makefile.go19 include Makefile.go110 include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 +include Makefile.jsc11 endif # Ubuntu 18.04 @@ -37,6 +40,9 @@ include Makefile.go19 include Makefile.go110 include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 +include Makefile.jsc10 endif # Ubuntu 17.10 @@ -69,6 +75,8 @@ include Makefile.python35 include Makefile.go include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 endif # Ubuntu 14.04 @@ -87,6 +95,8 @@ include Makefile.go17 include Makefile.go18 include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 endif # Debian 8 @@ -200,7 +210,11 @@ else -e "s#%%CODENAME%%#$(CODENAME)#g" \ > $@/$(SRCDIR)/debian/changelog endif - cp debian/copyright debuild-$*/$(SRCDIR)/debian/ + if [ -f debian.module/copyright.unit-$(MODULE_SUFFIX_$*) ]; then \ + cp debian.module/copyright.unit-$(MODULE_SUFFIX_$*) debuild-$*/$(SRCDIR)/debian/copyright ; \ + else \ + cp debian/copyright debuild-$*/$(SRCDIR)/debian/ ; \ + fi @{ \ set -e ; \ for src in $(MODULE_SOURCES_$*); do \ @@ -209,8 +223,9 @@ endif definitions=`echo "$$MODULE_DEFINITIONS_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ prebuild=`echo "$$MODULE_PREBUILD_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ preinstall=`echo "$$MODULE_PREINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + postinstall=`echo "$$MODULE_POSTINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ post=`echo "$$MODULE_POST_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ - cat debian.module/control.in | sed \ + cat debian.module/$(if $(MODULE_NOARCH_$*),control-noarch.in,control.in) | sed \ -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ -e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \ -e "s#%%CODENAME%%#$(CODENAME)#g" \ @@ -221,7 +236,7 @@ endif -e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \ -e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \ > $@/$(SRCDIR)/debian/control ; \ - cat debian.module/rules.in | sed \ + cat debian.module/$(if $(MODULE_NOARCH_$*),rules-noarch.in,rules.in) | sed \ -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ -e "s#%%CODENAME%%#$(CODENAME)#g" \ -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \ @@ -233,6 +248,7 @@ endif -e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \ -e "s#%%MODULE_PREBUILD%%#$${prebuild}#g" \ -e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \ + -e "s#%%MODULE_POSTINSTALL%%#$${postinstall}#g" \ > $@/$(SRCDIR)/debian/rules ; \ cat debian.module/preinst.in | sed \ -e "s#%%MODULE_POST%%#$$post#g" \ @@ -249,8 +265,9 @@ unit-%: check-build-depends-% | debuild-% test: unit modules @{ \ - for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f -name "*.so"` ; do \ + for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \ soname=`basename $${so}` ; \ + test "$${soname}" = "java.unit.so" && continue ; \ test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \ done ; \ @@ -259,8 +276,9 @@ test: unit modules test-debug: unit modules @{ \ - for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f -name "*.so"` ; do \ + for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \ soname=`basename $${so}` ; \ + test "$${soname}" = "java.unit.so" && continue ; \ test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \ done ; \ diff --git a/pkg/deb/Makefile.jsc-common b/pkg/deb/Makefile.jsc-common new file mode 100644 index 00000000..902d60df --- /dev/null +++ b/pkg/deb/Makefile.jsc-common @@ -0,0 +1,28 @@ +MODULES+= jsc_common +MODULE_SUFFIX_jsc_common= jsc-common + +MODULE_SUMMARY_jsc_common= Java shared packages for NGINX Unit + +MODULE_VERSION_jsc_common= $(VERSION) +MODULE_RELEASE_jsc_common= 1 + +MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-8-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ +MODULE_MAKEARGS_jsc_common= java +MODULE_INSTARGS_jsc_common= java-shared-install + +BUILD_DEPENDS_jsc_common= openjdk-8-jdk-headless openjdk-8-jre-headless +BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc_common) + +MODULE_NOARCH_jsc_common= true + +define MODULE_POST_jsc_common +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_jsc_common) have been installed. +Please find licenses and related information at: TBD. + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc_common diff --git a/pkg/deb/Makefile.jsc10 b/pkg/deb/Makefile.jsc10 new file mode 100644 index 00000000..d40269ea --- /dev/null +++ b/pkg/deb/Makefile.jsc10 @@ -0,0 +1,53 @@ +MODULES+= jsc10 +MODULE_SUFFIX_jsc10= jsc10 + +MODULE_SUMMARY_jsc10= Java 10 module for NGINX Unit + +MODULE_VERSION_jsc10= $(VERSION) +MODULE_RELEASE_jsc10= 1 + +MODULE_CONFARGS_jsc10= java --module=java10 --home=/usr/lib/jvm/java-11-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ +MODULE_MAKEARGS_jsc10= java10 +MODULE_INSTARGS_jsc10= java10-install + +MODULE_SOURCES_jsc10= unit.example-jsc-app \ + unit.example-jsc10-config + +BUILD_DEPENDS_jsc10= openjdk-11-jdk-headless openjdk-11-jre-headless +BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc10) + +MODULE_BUILD_DEPENDS_jsc10=,openjdk-11-jdk-headless +MODULE_DEPENDS_jsc10=,openjdk-11-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) + +define MODULE_PREINSTALL_jsc10 + mkdir -p debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/jsc-app + install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/jsc-app/index.jsp + install -m 644 -p debian/unit.example-jsc10-config debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/unit.config +endef +export MODULE_PREINSTALL_jsc10 + +define MODULE_POSTINSTALL_jsc10 + cd $$\(BUILDDIR_unit\) \&\& \ + DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall +endef +export MODULE_POSTINSTALL_jsc10 + +define MODULE_POST_jsc10 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_jsc10) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc10)/examples + sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config + curl http://localhost:8800/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc10 diff --git a/pkg/deb/Makefile.jsc11 b/pkg/deb/Makefile.jsc11 new file mode 100644 index 00000000..dce5f4f5 --- /dev/null +++ b/pkg/deb/Makefile.jsc11 @@ -0,0 +1,53 @@ +MODULES+= jsc11 +MODULE_SUFFIX_jsc11= jsc11 + +MODULE_SUMMARY_jsc11= Java 11 module for NGINX Unit + +MODULE_VERSION_jsc11= $(VERSION) +MODULE_RELEASE_jsc11= 1 + +MODULE_CONFARGS_jsc11= java --module=java11 --home=/usr/lib/jvm/java-11-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ +MODULE_MAKEARGS_jsc11= java11 +MODULE_INSTARGS_jsc11= java11-install + +MODULE_SOURCES_jsc11= unit.example-jsc-app \ + unit.example-jsc11-config + +BUILD_DEPENDS_jsc11= openjdk-11-jdk-headless openjdk-11-jre-headless +BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc11) + +MODULE_BUILD_DEPENDS_jsc11=,openjdk-11-jdk-headless +MODULE_DEPENDS_jsc11=,openjdk-11-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) + +define MODULE_PREINSTALL_jsc11 + mkdir -p debian/unit-jsc11/usr/share/doc/unit-jsc11/examples/jsc-app + install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc11/usr/share/doc/unit-jsc11/examples/jsc-app/index.jsp + install -m 644 -p debian/unit.example-jsc11-config debian/unit-jsc11/usr/share/doc/unit-jsc11/examples/unit.config +endef +export MODULE_PREINSTALL_jsc11 + +define MODULE_POSTINSTALL_jsc11 + cd $$\(BUILDDIR_unit\) \&\& \ + DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall +endef +export MODULE_POSTINSTALL_jsc11 + +define MODULE_POST_jsc11 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_jsc11) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc11)/examples + sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config + curl http://localhost:8800/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc11 diff --git a/pkg/deb/Makefile.jsc8 b/pkg/deb/Makefile.jsc8 new file mode 100644 index 00000000..88179782 --- /dev/null +++ b/pkg/deb/Makefile.jsc8 @@ -0,0 +1,53 @@ +MODULES+= jsc8 +MODULE_SUFFIX_jsc8= jsc8 + +MODULE_SUMMARY_jsc8= Java 8 module for NGINX Unit + +MODULE_VERSION_jsc8= $(VERSION) +MODULE_RELEASE_jsc8= 1 + +MODULE_CONFARGS_jsc8= java --module=java8 --home=/usr/lib/jvm/java-8-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ +MODULE_MAKEARGS_jsc8= java8 +MODULE_INSTARGS_jsc8= java8-install + +MODULE_SOURCES_jsc8= unit.example-jsc-app \ + unit.example-jsc8-config + +BUILD_DEPENDS_jsc8= openjdk-8-jdk-headless openjdk-8-jre-headless +BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc8) + +MODULE_BUILD_DEPENDS_jsc8=,openjdk-8-jdk-headless +MODULE_DEPENDS_jsc8=,openjdk-8-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) + +define MODULE_PREINSTALL_jsc8 + mkdir -p debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app + install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app/index.jsp + install -m 644 -p debian/unit.example-jsc8-config debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/unit.config +endef +export MODULE_PREINSTALL_jsc8 + +define MODULE_POSTINSTALL_jsc8 + cd $$\(BUILDDIR_unit\) \&\& \ + DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall +endef +export MODULE_POSTINSTALL_jsc8 + +define MODULE_POST_jsc8 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_jsc8) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc8)/examples + sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config + curl http://localhost:8800/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc8 |