diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/deb/Makefile | 57 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc-common | 30 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc10 | 71 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc11 | 71 | ||||
-rw-r--r-- | pkg/deb/Makefile.jsc8 | 71 |
5 files changed, 269 insertions, 31 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 1a16b6ee..f481ff02 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -1,11 +1,10 @@ #!/usr/bin/make -DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \ - | sed -e 's/^.*"\(.*\)".*/\1/') +include ../../version DEFAULT_RELEASE := 1 -VERSION ?= $(DEFAULT_VERSION) +VERSION ?= $(NXT_VERSION) RELEASE ?= $(DEFAULT_RELEASE) SRCDIR= unit-$(VERSION) @@ -27,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 @@ -38,28 +40,9 @@ include Makefile.go19 include Makefile.go110 include Makefile.perl include Makefile.ruby -endif - -# Ubuntu 17.10 -ifeq ($(CODENAME),artful) -include Makefile.php -include Makefile.python27 -include Makefile.python36 -include Makefile.go18 -include Makefile.go19 -include Makefile.perl -include Makefile.ruby -endif - -# Ubuntu 17.04 -ifeq ($(CODENAME),zesty) -include Makefile.php -include Makefile.python27 -include Makefile.python35 -include Makefile.go17 -include Makefile.go18 -include Makefile.perl -include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 +include Makefile.jsc10 endif # Ubuntu 16.04 @@ -70,6 +53,8 @@ include Makefile.python35 include Makefile.go include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 endif # Ubuntu 14.04 @@ -88,6 +73,8 @@ include Makefile.go17 include Makefile.go18 include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 endif # Debian 8 @@ -171,7 +158,7 @@ endif debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \ --transform "s#^#$(SRCDIR)/#" \ - LICENSE NOTICE CHANGES README configure auto src test + LICENSE NOTICE CHANGES README configure auto src test version mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz cd debuild && tar zxf unit_$(VERSION).orig.tar.gz @@ -201,7 +188,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 \ @@ -210,8 +201,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" \ @@ -222,7 +214,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" \ @@ -234,6 +226,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" \ @@ -250,8 +243,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 ; \ @@ -260,8 +254,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..42fdb12f --- /dev/null +++ b/pkg/deb/Makefile.jsc-common @@ -0,0 +1,30 @@ +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: + /usr/share/doc/unit-jsc-common/copyright + +---------------------------------------------------------------------- +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..43ded86b --- /dev/null +++ b/pkg/deb/Makefile.jsc10 @@ -0,0 +1,71 @@ +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 + install -m 644 -p src/java/README.JSR-340 debian/unit-jsc10/usr/share/doc/unit-jsc10/ +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 + +NOTICE: + +This version of Unit code is made available in support of the open source +development process. This is an intermediate build made available for +testing purposes only. This Unit code is untested and presumed incompatible +with the JSR 340 Java Servlet 3.1 specification. You should not deploy or +write to this code. You should instead deploy and write production +applications on pre-built binaries that have been tested and certified +to meet the JSR-340 compatibility requirements such as certified binaries +published for the JSR-340 reference implementation available at +https://javaee.github.io/glassfish/. + +Redistribution of any Intermediate Build must retain this notice. + +Oracle and Java are registered trademarks of Oracle and/or its affiliates. +Other names may be trademarks of their respective owners. + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc10 diff --git a/pkg/deb/Makefile.jsc11 b/pkg/deb/Makefile.jsc11 new file mode 100644 index 00000000..40f60f17 --- /dev/null +++ b/pkg/deb/Makefile.jsc11 @@ -0,0 +1,71 @@ +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 + install -m 644 -p src/java/README.JSR-340 debian/unit-jsc11/usr/share/doc/unit-jsc11/ +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 + +NOTICE: + +This version of Unit code is made available in support of the open source +development process. This is an intermediate build made available for +testing purposes only. This Unit code is untested and presumed incompatible +with the JSR 340 Java Servlet 3.1 specification. You should not deploy or +write to this code. You should instead deploy and write production +applications on pre-built binaries that have been tested and certified +to meet the JSR-340 compatibility requirements such as certified binaries +published for the JSR-340 reference implementation available at +https://javaee.github.io/glassfish/. + +Redistribution of any Intermediate Build must retain this notice. + +Oracle and Java are registered trademarks of Oracle and/or its affiliates. +Other names may be trademarks of their respective owners. + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc11 diff --git a/pkg/deb/Makefile.jsc8 b/pkg/deb/Makefile.jsc8 new file mode 100644 index 00000000..d7eed96b --- /dev/null +++ b/pkg/deb/Makefile.jsc8 @@ -0,0 +1,71 @@ +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 + install -m 644 -p src/java/README.JSR-340 debian/unit-jsc8/usr/share/doc/unit-jsc8/ +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 + +NOTICE: + +This version of Unit code is made available in support of the open source +development process. This is an intermediate build made available for +testing purposes only. This Unit code is untested and presumed incompatible +with the JSR 340 Java Servlet 3.1 specification. You should not deploy or +write to this code. You should instead deploy and write production +applications on pre-built binaries that have been tested and certified +to meet the JSR-340 compatibility requirements such as certified binaries +published for the JSR-340 reference implementation available at +https://javaee.github.io/glassfish/. + +Redistribution of any Intermediate Build must retain this notice. + +Oracle and Java are registered trademarks of Oracle and/or its affiliates. +Other names may be trademarks of their respective owners. + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_jsc8 |