xref: /unit/pkg/rpm/Makefile.jsc11 (revision 996:03f8415de1d8)
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
30%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
31    %{buildroot}%{_datadir}/doc/unit-jsc11/
32endef
33export MODULE_PREINSTALL_jsc11
34
35define MODULE_POSTINSTALL_jsc11
36DESTDIR=%{buildroot} make java-shared-uninstall
37endef
38export MODULE_POSTINSTALL_jsc11
39
40define MODULE_FILES_jsc11
41%{_libdir}/unit/modules/*
42%{_libdir}/unit/debug-modules/*
43%dir %{_datadir}/doc/unit-jsc11
44%{_datadir}/doc/unit-jsc11/*
45%{_datadir}/unit-jsc-common/*
46endef
47export MODULE_FILES_jsc11
48
49define MODULE_POST_jsc11
50cat <<BANNER
51----------------------------------------------------------------------
52
53The $(MODULE_SUMMARY_jsc11) has been installed.
54
55To check out the sample app, run these commands:
56
57 sudo service unit restart
58 cd /usr/share/doc/%{name}/examples
59 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
60 curl http://localhost:8800/
61
62Online documentation is available at https://unit.nginx.org
63
64`cat /usr/share/doc/unit-jsc11/README.JSR-340`
65
66----------------------------------------------------------------------
67BANNER
68endef
69export MODULE_POST_jsc11
70