xref: /unit/pkg/rpm/Makefile.python310 (revision 2003:28f0ed517b6e)
1MODULES+=		python310
2MODULE_SUFFIX_python310=	python3.10
3
4MODULE_SUMMARY_python310=	Python 3.10 module for NGINX Unit
5
6MODULE_VERSION_python310=	$(VERSION)
7MODULE_RELEASE_python310=	1
8
9MODULE_CONFARGS_python310=	python --config=python3.10-config
10MODULE_MAKEARGS_python310=	python3.10
11MODULE_INSTARGS_python310=	python3.10-install
12
13MODULE_SOURCES_python310=	unit.example-python-app \
14			unit.example-python310-config
15
16ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
17BUILD_DEPENDS_python310=	python3-devel
18else
19BUILD_DEPENDS_python310=	python310-devel
20endif
21
22BUILD_DEPENDS+=		$(BUILD_DEPENDS_python310)
23
24define MODULE_PREINSTALL_python310
25%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app
26%{__install} -m 644 -p %{SOURCE100} \
27    %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app/wsgi.py
28%{__install} -m 644 -p %{SOURCE101} \
29    %{buildroot}%{_datadir}/doc/unit-python310/examples/unit.config
30endef
31export MODULE_PREINSTALL_python310
32
33define MODULE_FILES_python310
34%{_libdir}/unit/modules/*
35%{_libdir}/unit/debug-modules/*
36endef
37export MODULE_FILES_python310
38
39define MODULE_POST_python310
40cat <<BANNER
41----------------------------------------------------------------------
42
43The $(MODULE_SUMMARY_python310) 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_python310
58