xref: /unit/pkg/rpm/Makefile.jsc8 (revision 980)
1*980Sdefan@nginx.comMODULES+=		jsc8
2*980Sdefan@nginx.comMODULE_SUFFIX_jsc8=	jsc8
3*980Sdefan@nginx.com
4*980Sdefan@nginx.comMODULE_SUMMARY_jsc8=	Java 8 module for NGINX Unit
5*980Sdefan@nginx.com
6*980Sdefan@nginx.comMODULE_VERSION_jsc8=	$(VERSION)
7*980Sdefan@nginx.comMODULE_RELEASE_jsc8=	1
8*980Sdefan@nginx.com
9*980Sdefan@nginx.comMODULE_CONFARGS_jsc8=	java --module=java8 --home=/usr/lib/jvm/java-1.8.0 --jars=/usr/share/unit-jsc-common/
10*980Sdefan@nginx.comMODULE_MAKEARGS_jsc8=	java8
11*980Sdefan@nginx.comMODULE_INSTARGS_jsc8=	java8-install
12*980Sdefan@nginx.com
13*980Sdefan@nginx.comMODULE_SOURCES_jsc8=	unit.example-jsc-app \
14*980Sdefan@nginx.com			unit.example-jsc8-config
15*980Sdefan@nginx.com
16*980Sdefan@nginx.comBUILD_DEPENDS_jsc8=	java-1.8.0-openjdk-devel
17*980Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc8)
18*980Sdefan@nginx.com
19*980Sdefan@nginx.comdefine MODULE_DEFINITIONS_jsc8
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_jsc8
23*980Sdefan@nginx.com
24*980Sdefan@nginx.comdefine MODULE_PREINSTALL_jsc8
25*980Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app
26*980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27*980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app/index.jsp
28*980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29*980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/unit.config
30*980Sdefan@nginx.comendef
31*980Sdefan@nginx.comexport MODULE_PREINSTALL_jsc8
32*980Sdefan@nginx.com
33*980Sdefan@nginx.comdefine MODULE_POSTINSTALL_jsc8
34*980Sdefan@nginx.comDESTDIR=%{buildroot} make java-shared-uninstall
35*980Sdefan@nginx.comendef
36*980Sdefan@nginx.comexport MODULE_POSTINSTALL_jsc8
37*980Sdefan@nginx.com
38*980Sdefan@nginx.comdefine MODULE_FILES_jsc8
39*980Sdefan@nginx.com%{_libdir}/unit/modules/*
40*980Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
41*980Sdefan@nginx.com%dir %{_datadir}/doc/unit-jsc8
42*980Sdefan@nginx.com%{_datadir}/doc/unit-jsc8/*
43*980Sdefan@nginx.com%{_datadir}/unit-jsc-common/*
44*980Sdefan@nginx.comendef
45*980Sdefan@nginx.comexport MODULE_FILES_jsc8
46*980Sdefan@nginx.com
47*980Sdefan@nginx.comdefine MODULE_POST_jsc8
48*980Sdefan@nginx.comcat <<BANNER
49*980Sdefan@nginx.com----------------------------------------------------------------------
50*980Sdefan@nginx.com
51*980Sdefan@nginx.comThe $(MODULE_SUMMARY_jsc8) 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_jsc8
66