xref: /unit/pkg/deb/Makefile.jsc8 (revision 980:e1c4434c1060)
1MODULES+=		jsc8
2MODULE_SUFFIX_jsc8=	jsc8
3
4MODULE_SUMMARY_jsc8=	Java 8 module for NGINX Unit
5
6MODULE_VERSION_jsc8=	$(VERSION)
7MODULE_RELEASE_jsc8=	1
8
9MODULE_CONFARGS_jsc8=	java --module=java8 --home=/usr/lib/jvm/java-8-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/
10MODULE_MAKEARGS_jsc8=	java8
11MODULE_INSTARGS_jsc8=	java8-install
12
13MODULE_SOURCES_jsc8=	unit.example-jsc-app \
14			unit.example-jsc8-config
15
16BUILD_DEPENDS_jsc8=	openjdk-8-jdk-headless openjdk-8-jre-headless
17BUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc8)
18
19MODULE_BUILD_DEPENDS_jsc8=,openjdk-8-jdk-headless
20MODULE_DEPENDS_jsc8=,openjdk-8-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME))
21
22define MODULE_PREINSTALL_jsc8
23	mkdir -p debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app
24	install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app/index.jsp
25	install -m 644 -p debian/unit.example-jsc8-config debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/unit.config
26endef
27export MODULE_PREINSTALL_jsc8
28
29define MODULE_POSTINSTALL_jsc8
30	cd $$\(BUILDDIR_unit\) \&\& \
31        DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall
32endef
33export MODULE_POSTINSTALL_jsc8
34
35define MODULE_POST_jsc8
36cat <<BANNER
37----------------------------------------------------------------------
38
39The $(MODULE_SUMMARY_jsc8) has been installed.
40
41To check out the sample app, run these commands:
42
43 sudo service unit restart
44 cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc8)/examples
45 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
46 curl http://localhost:8800/
47
48Online documentation is available at https://unit.nginx.org
49
50----------------------------------------------------------------------
51BANNER
52endef
53export MODULE_POST_jsc8
54