xref: /unit/pkg/rpm/Makefile.jsc8 (revision 1144:b651ff72ffe0)
1MODULES+=		jsc8
2MODULE_SUFFIX_jsc8=	jsc8
3
4MODULE_SUMMARY_jsc8=	Java 8 module for NGINX Unit
5
6MODULE_VERSION_jsc8=	$(VERSION)
7MODULE_RELEASE_jsc8=	2
8
9MODULE_CONFARGS_jsc8=	java --module=java8 --home=/usr/lib/jvm/java-1.8.0 --jars=/usr/share/unit-jsc-common/
10MODULE_MAKEARGS_jsc8=	java8
11MODULE_INSTARGS_jsc8=	java8-install
12
13MODULE_SOURCES_jsc8=	unit.example-jsc-app \
14			unit.example-jsc8-config
15
16BUILD_DEPENDS_jsc8=	java-1.8.0-openjdk-devel
17BUILD_DEPENDS+=		$(BUILD_DEPENDS_jsc8)
18
19define MODULE_DEFINITIONS_jsc8
20Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
21endef
22export MODULE_DEFINITIONS_jsc8
23
24define MODULE_PREINSTALL_jsc8
25%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app
26%{__install} -m 644 -p %{SOURCE100} \
27    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/jsc-app/index.jsp
28%{__install} -m 644 -p %{SOURCE101} \
29    %{buildroot}%{_datadir}/doc/unit-jsc8/examples/unit.config
30%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
31    %{buildroot}%{_datadir}/doc/unit-jsc8/
32endef
33export MODULE_PREINSTALL_jsc8
34
35define MODULE_POSTINSTALL_jsc8
36DESTDIR=%{buildroot} make java-shared-uninstall
37endef
38export MODULE_POSTINSTALL_jsc8
39
40define MODULE_FILES_jsc8
41%{_libdir}/unit/modules/*
42%{_libdir}/unit/debug-modules/*
43%dir %{_datadir}/doc/unit-jsc8
44%{_datadir}/doc/unit-jsc8/*
45%{_datadir}/unit-jsc-common/*
46endef
47export MODULE_FILES_jsc8
48
49define MODULE_POST_jsc8
50cat <<BANNER
51----------------------------------------------------------------------
52
53The $(MODULE_SUMMARY_jsc8) has been installed.
54
55To check out the sample app, run these commands:
56
57 sudo service unit restart
58 cd /usr/share/doc/%{name}/examples
59 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
60 curl http://localhost:8800/
61
62Online documentation is available at https://unit.nginx.org
63
64`cat /usr/share/doc/unit-jsc8/README.JSR-340`
65
66----------------------------------------------------------------------
67BANNER
68endef
69export MODULE_POST_jsc8
70