xref: /unit/pkg/rpm/Makefile.jsc11 (revision 980:e1c4434c1060)
1MODULES+=		jsc11
2MODULE_SUFFIX_jsc11=	jsc11
3
4MODULE_SUMMARY_jsc11=	Java 11 module for NGINX Unit
5
6MODULE_VERSION_jsc11=	$(VERSION)
7MODULE_RELEASE_jsc11=	1
8
9MODULE_CONFARGS_jsc11=	java --module=java11 --home=/usr/lib/jvm/java-11 --jars=/usr/share/unit-jsc-common/
10MODULE_MAKEARGS_jsc11=	java11
11MODULE_INSTARGS_jsc11=	java11-install
12
13MODULE_SOURCES_jsc11=	unit.example-jsc-app \
14			unit.example-jsc11-config
15
16BUILD_DEPENDS_jsc11=	java-11-openjdk-devel
17BUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc11)
18
19define MODULE_DEFINITIONS_jsc11
20Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
21endef
22export MODULE_DEFINITIONS_jsc11
23
24define MODULE_PREINSTALL_jsc11
25%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app
26%{__install} -m 644 -p %{SOURCE100} \
27    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app/index.jsp
28%{__install} -m 644 -p %{SOURCE101} \
29    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/unit.config
30endef
31export MODULE_PREINSTALL_jsc11
32
33define MODULE_POSTINSTALL_jsc11
34DESTDIR=%{buildroot} make java-shared-uninstall
35endef
36export MODULE_POSTINSTALL_jsc11
37
38define MODULE_FILES_jsc11
39%{_libdir}/unit/modules/*
40%{_libdir}/unit/debug-modules/*
41%dir %{_datadir}/doc/unit-jsc11
42%{_datadir}/doc/unit-jsc11/*
43%{_datadir}/unit-jsc-common/*
44endef
45export MODULE_FILES_jsc11
46
47define MODULE_POST_jsc11
48cat <<BANNER
49----------------------------------------------------------------------
50
51The $(MODULE_SUMMARY_jsc11) has been installed.
52
53To check out the sample app, run these commands:
54
55 sudo service unit restart
56 cd /usr/share/doc/%{name}/examples
57 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
58 curl http://localhost:8800/
59
60Online documentation is available at https://unit.nginx.org
61
62----------------------------------------------------------------------
63BANNER
64endef
65export MODULE_POST_jsc11
66