xref: /unit/pkg/rpm/Makefile.python37 (revision 1333:7b483cf5cb09)
1MODULES+=		python37
2MODULE_SUFFIX_python37=	python3.7
3
4MODULE_SUMMARY_python37=	Python 3.7 module for NGINX Unit
5
6MODULE_VERSION_python37=	$(VERSION)
7MODULE_RELEASE_python37=	1
8
9MODULE_CONFARGS_python37=	python --config=python3.7-config
10MODULE_MAKEARGS_python37=	python3.7
11MODULE_INSTARGS_python37=	python3.7-install
12
13MODULE_SOURCES_python37=	unit.example-python-app \
14			unit.example-python37-config
15
16ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
17BUILD_DEPENDS_python37=	python3-devel
18else
19BUILD_DEPENDS_python37=	python37-devel
20endif
21
22BUILD_DEPENDS+=		$(BUILD_DEPENDS_python37)
23
24define MODULE_PREINSTALL_python37
25%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python37/examples/python-app
26%{__install} -m 644 -p %{SOURCE100} \
27    %{buildroot}%{_datadir}/doc/unit-python37/examples/python-app/wsgi.py
28%{__install} -m 644 -p %{SOURCE101} \
29    %{buildroot}%{_datadir}/doc/unit-python37/examples/unit.config
30endef
31export MODULE_PREINSTALL_python37
32
33define MODULE_FILES_python37
34%{_libdir}/unit/modules/*
35%{_libdir}/unit/debug-modules/*
36endef
37export MODULE_FILES_python37
38
39define MODULE_POST_python37
40cat <<BANNER
41----------------------------------------------------------------------
42
43The $(MODULE_SUMMARY_python37) has been installed.
44
45To check the sample app, run these commands:
46
47 sudo service unit start
48 cd /usr/share/doc/%{name}/examples
49 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
50 curl http://localhost:8400/
51
52Online documentation is available at https://unit.nginx.org
53
54----------------------------------------------------------------------
55BANNER
56endef
57export MODULE_POST_python37
58