xref: /unit/pkg/rpm/Makefile.jsc8 (revision 1160)
1980Sdefan@nginx.comMODULES+=		jsc8
2980Sdefan@nginx.comMODULE_SUFFIX_jsc8=	jsc8
3980Sdefan@nginx.com
4980Sdefan@nginx.comMODULE_SUMMARY_jsc8=	Java 8 module for NGINX Unit
5980Sdefan@nginx.com
6980Sdefan@nginx.comMODULE_VERSION_jsc8=	$(VERSION)
7980Sdefan@nginx.comMODULE_RELEASE_jsc8=	1
8980Sdefan@nginx.com
9*1160Sdefan@nginx.comJAVA_ARCH_jsc8=	$(shell /usr/lib/jvm/java-1.8.0/bin/java -XshowSettings 2>&1 | grep -F -e os.arch | sed -e 's/^.*= //')
10*1160Sdefan@nginx.com
11*1160Sdefan@nginx.comMODULE_CONFARGS_jsc8=	java --module=java8 --home=/usr/lib/jvm/java-1.8.0 --lib-path=/usr/lib/jvm/jre-1.8.0/lib/$(JAVA_ARCH_jsc8)/server --jars=/usr/share/unit-jsc-common/
12980Sdefan@nginx.comMODULE_MAKEARGS_jsc8=	java8
13980Sdefan@nginx.comMODULE_INSTARGS_jsc8=	java8-install
14980Sdefan@nginx.com
15980Sdefan@nginx.comMODULE_SOURCES_jsc8=	unit.example-jsc-app \
16980Sdefan@nginx.com			unit.example-jsc8-config
17980Sdefan@nginx.com
18980Sdefan@nginx.comBUILD_DEPENDS_jsc8=	java-1.8.0-openjdk-devel
19980Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc8)
20980Sdefan@nginx.com
21980Sdefan@nginx.comdefine MODULE_DEFINITIONS_jsc8
22980Sdefan@nginx.comRequires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
23*1160Sdefan@nginx.comRequires: java-1.8.0-headless
24980Sdefan@nginx.comendef
25980Sdefan@nginx.comexport MODULE_DEFINITIONS_jsc8
26980Sdefan@nginx.com
27980Sdefan@nginx.comdefine MODULE_PREINSTALL_jsc8
28980Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app
29980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
30980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app/index.jsp
31980Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
32980Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/unit.config
33989Sdefan@nginx.com%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
34989Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-jsc8/
35980Sdefan@nginx.comendef
36980Sdefan@nginx.comexport MODULE_PREINSTALL_jsc8
37980Sdefan@nginx.com
38980Sdefan@nginx.comdefine MODULE_POSTINSTALL_jsc8
39980Sdefan@nginx.comDESTDIR=%{buildroot} make java-shared-uninstall
40980Sdefan@nginx.comendef
41980Sdefan@nginx.comexport MODULE_POSTINSTALL_jsc8
42980Sdefan@nginx.com
43980Sdefan@nginx.comdefine MODULE_FILES_jsc8
44980Sdefan@nginx.com%{_libdir}/unit/modules/*
45980Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
46980Sdefan@nginx.com%dir %{_datadir}/doc/unit-jsc8
47980Sdefan@nginx.com%{_datadir}/doc/unit-jsc8/*
48980Sdefan@nginx.com%{_datadir}/unit-jsc-common/*
49980Sdefan@nginx.comendef
50980Sdefan@nginx.comexport MODULE_FILES_jsc8
51980Sdefan@nginx.com
52980Sdefan@nginx.comdefine MODULE_POST_jsc8
53980Sdefan@nginx.comcat <<BANNER
54980Sdefan@nginx.com----------------------------------------------------------------------
55980Sdefan@nginx.com
56980Sdefan@nginx.comThe $(MODULE_SUMMARY_jsc8) has been installed.
57980Sdefan@nginx.com
58980Sdefan@nginx.comTo check out the sample app, run these commands:
59980Sdefan@nginx.com
60980Sdefan@nginx.com sudo service unit restart
61980Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
62980Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
63980Sdefan@nginx.com curl http://localhost:8800/
64980Sdefan@nginx.com
65980Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
66980Sdefan@nginx.com
67989Sdefan@nginx.com`cat /usr/share/doc/unit-jsc8/README.JSR-340`
68989Sdefan@nginx.com
69980Sdefan@nginx.com----------------------------------------------------------------------
70980Sdefan@nginx.comBANNER
71980Sdefan@nginx.comendef
72980Sdefan@nginx.comexport MODULE_POST_jsc8
73