xref: /unit/pkg/rpm/Makefile.jsc11 (revision 989)
1980Sdefan@nginx.comMODULES+=		jsc11
2980Sdefan@nginx.comMODULE_SUFFIX_jsc11=	jsc11
3980Sdefan@nginx.com
4980Sdefan@nginx.comMODULE_SUMMARY_jsc11=	Java 11 module for NGINX Unit
5980Sdefan@nginx.com
6980Sdefan@nginx.comMODULE_VERSION_jsc11=	$(VERSION)
7980Sdefan@nginx.comMODULE_RELEASE_jsc11=	1
8980Sdefan@nginx.com
9980Sdefan@nginx.comMODULE_CONFARGS_jsc11=	java --module=java11 --home=/usr/lib/jvm/java-11 --jars=/usr/share/unit-jsc-common/
10980Sdefan@nginx.comMODULE_MAKEARGS_jsc11=	java11
11980Sdefan@nginx.comMODULE_INSTARGS_jsc11=	java11-install
12980Sdefan@nginx.com
13980Sdefan@nginx.comMODULE_SOURCES_jsc11=	unit.example-jsc-app \
14980Sdefan@nginx.com			unit.example-jsc11-config
15980Sdefan@nginx.com
16980Sdefan@nginx.comBUILD_DEPENDS_jsc11=	java-11-openjdk-devel
17980Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc11)
18980Sdefan@nginx.com
19980Sdefan@nginx.comdefine MODULE_DEFINITIONS_jsc11
20980Sdefan@nginx.comRequires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
21980Sdefan@nginx.comendef
22980Sdefan@nginx.comexport MODULE_DEFINITIONS_jsc11
23980Sdefan@nginx.com
24980Sdefan@nginx.comdefine MODULE_PREINSTALL_jsc11
25980Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app
26980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app/index.jsp
28980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/unit.config
30*989Sdefan@nginx.com%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
31*989Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/
32980Sdefan@nginx.comendef
33980Sdefan@nginx.comexport MODULE_PREINSTALL_jsc11
34980Sdefan@nginx.com
35980Sdefan@nginx.comdefine MODULE_POSTINSTALL_jsc11
36980Sdefan@nginx.comDESTDIR=%{buildroot} make java-shared-uninstall
37980Sdefan@nginx.comendef
38980Sdefan@nginx.comexport MODULE_POSTINSTALL_jsc11
39980Sdefan@nginx.com
40980Sdefan@nginx.comdefine MODULE_FILES_jsc11
41980Sdefan@nginx.com%{_libdir}/unit/modules/*
42980Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
43980Sdefan@nginx.com%dir %{_datadir}/doc/unit-jsc11
44980Sdefan@nginx.com%{_datadir}/doc/unit-jsc11/*
45980Sdefan@nginx.com%{_datadir}/unit-jsc-common/*
46980Sdefan@nginx.comendef
47980Sdefan@nginx.comexport MODULE_FILES_jsc11
48980Sdefan@nginx.com
49980Sdefan@nginx.comdefine MODULE_POST_jsc11
50980Sdefan@nginx.comcat <<BANNER
51980Sdefan@nginx.com----------------------------------------------------------------------
52980Sdefan@nginx.com
53980Sdefan@nginx.comThe $(MODULE_SUMMARY_jsc11) has been installed.
54980Sdefan@nginx.com
55980Sdefan@nginx.comTo check out the sample app, run these commands:
56980Sdefan@nginx.com
57980Sdefan@nginx.com sudo service unit restart
58980Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
59980Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
60980Sdefan@nginx.com curl http://localhost:8800/
61980Sdefan@nginx.com
62980Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
63980Sdefan@nginx.com
64*989Sdefan@nginx.com`cat /usr/share/doc/unit-jsc11/README.JSR-340`
65*989Sdefan@nginx.com
66980Sdefan@nginx.com----------------------------------------------------------------------
67980Sdefan@nginx.comBANNER
68980Sdefan@nginx.comendef
69980Sdefan@nginx.comexport MODULE_POST_jsc11
70