xref: /unit/pkg/rpm/Makefile.python310 (revision 2003:28f0ed517b6e)
1*2003Sdefan@nginx.comMODULES+=		python310
2*2003Sdefan@nginx.comMODULE_SUFFIX_python310=	python3.10
3*2003Sdefan@nginx.com
4*2003Sdefan@nginx.comMODULE_SUMMARY_python310=	Python 3.10 module for NGINX Unit
5*2003Sdefan@nginx.com
6*2003Sdefan@nginx.comMODULE_VERSION_python310=	$(VERSION)
7*2003Sdefan@nginx.comMODULE_RELEASE_python310=	1
8*2003Sdefan@nginx.com
9*2003Sdefan@nginx.comMODULE_CONFARGS_python310=	python --config=python3.10-config
10*2003Sdefan@nginx.comMODULE_MAKEARGS_python310=	python3.10
11*2003Sdefan@nginx.comMODULE_INSTARGS_python310=	python3.10-install
12*2003Sdefan@nginx.com
13*2003Sdefan@nginx.comMODULE_SOURCES_python310=	unit.example-python-app \
14*2003Sdefan@nginx.com			unit.example-python310-config
15*2003Sdefan@nginx.com
16*2003Sdefan@nginx.comifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
17*2003Sdefan@nginx.comBUILD_DEPENDS_python310=	python3-devel
18*2003Sdefan@nginx.comelse
19*2003Sdefan@nginx.comBUILD_DEPENDS_python310=	python310-devel
20*2003Sdefan@nginx.comendif
21*2003Sdefan@nginx.com
22*2003Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_python310)
23*2003Sdefan@nginx.com
24*2003Sdefan@nginx.comdefine MODULE_PREINSTALL_python310
25*2003Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app
26*2003Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27*2003Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app/wsgi.py
28*2003Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29*2003Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python310/examples/unit.config
30*2003Sdefan@nginx.comendef
31*2003Sdefan@nginx.comexport MODULE_PREINSTALL_python310
32*2003Sdefan@nginx.com
33*2003Sdefan@nginx.comdefine MODULE_FILES_python310
34*2003Sdefan@nginx.com%{_libdir}/unit/modules/*
35*2003Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
36*2003Sdefan@nginx.comendef
37*2003Sdefan@nginx.comexport MODULE_FILES_python310
38*2003Sdefan@nginx.com
39*2003Sdefan@nginx.comdefine MODULE_POST_python310
40*2003Sdefan@nginx.comcat <<BANNER
41*2003Sdefan@nginx.com----------------------------------------------------------------------
42*2003Sdefan@nginx.com
43*2003Sdefan@nginx.comThe $(MODULE_SUMMARY_python310) has been installed.
44*2003Sdefan@nginx.com
45*2003Sdefan@nginx.comTo check the sample app, run these commands:
46*2003Sdefan@nginx.com
47*2003Sdefan@nginx.com sudo service unit start
48*2003Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
49*2003Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
50*2003Sdefan@nginx.com curl http://localhost:8400/
51*2003Sdefan@nginx.com
52*2003Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
53*2003Sdefan@nginx.com
54*2003Sdefan@nginx.com----------------------------------------------------------------------
55*2003Sdefan@nginx.comBANNER
56*2003Sdefan@nginx.comendef
57*2003Sdefan@nginx.comexport MODULE_POST_python310
58