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