xref: /unit/pkg/rpm/Makefile.jsc11 (revision 1496)
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
9*1496St.nateldemoura@f5.comMODULE_CONFARGS_jsc11=	java --module=java11 --home=/usr/lib/jvm/java-11 --lib-path=/usr/lib/jvm/jre-11/lib --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
211160Sdefan@nginx.comRequires: java-11-headless
22980Sdefan@nginx.comendef
23980Sdefan@nginx.comexport MODULE_DEFINITIONS_jsc11
24980Sdefan@nginx.com
25980Sdefan@nginx.comdefine MODULE_PREINSTALL_jsc11
26980Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app
27980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
28980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/jsc-app/index.jsp
29980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
30980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc11/examples/unit.config
31989Sdefan@nginx.com%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
32996Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc11/
33980Sdefan@nginx.comendef
34980Sdefan@nginx.comexport MODULE_PREINSTALL_jsc11
35980Sdefan@nginx.com
36980Sdefan@nginx.comdefine MODULE_POSTINSTALL_jsc11
37980Sdefan@nginx.comDESTDIR=%{buildroot} make java-shared-uninstall
38980Sdefan@nginx.comendef
39980Sdefan@nginx.comexport MODULE_POSTINSTALL_jsc11
40980Sdefan@nginx.com
41980Sdefan@nginx.comdefine MODULE_FILES_jsc11
42980Sdefan@nginx.com%{_libdir}/unit/modules/*
43980Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
44980Sdefan@nginx.com%dir %{_datadir}/doc/unit-jsc11
45980Sdefan@nginx.com%{_datadir}/doc/unit-jsc11/*
46980Sdefan@nginx.com%{_datadir}/unit-jsc-common/*
47980Sdefan@nginx.comendef
48980Sdefan@nginx.comexport MODULE_FILES_jsc11
49980Sdefan@nginx.com
50980Sdefan@nginx.comdefine MODULE_POST_jsc11
51980Sdefan@nginx.comcat <<BANNER
52980Sdefan@nginx.com----------------------------------------------------------------------
53980Sdefan@nginx.com
54980Sdefan@nginx.comThe $(MODULE_SUMMARY_jsc11) has been installed.
55980Sdefan@nginx.com
56980Sdefan@nginx.comTo check out the sample app, run these commands:
57980Sdefan@nginx.com
58980Sdefan@nginx.com sudo service unit restart
59980Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
60980Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
61980Sdefan@nginx.com curl http://localhost:8800/
62980Sdefan@nginx.com
63980Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
64980Sdefan@nginx.com
65989Sdefan@nginx.com`cat /usr/share/doc/unit-jsc11/README.JSR-340`
66989Sdefan@nginx.com
67980Sdefan@nginx.com----------------------------------------------------------------------
68980Sdefan@nginx.comBANNER
69980Sdefan@nginx.comendef
70980Sdefan@nginx.comexport MODULE_POST_jsc11
71