xref: /unit/pkg/rpm/Makefile.python39 (revision 2116:c8fd41f564cf)
11778Sdefan@nginx.comMODULES+=		python39
21778Sdefan@nginx.comMODULE_SUFFIX_python39=	python3.9
31778Sdefan@nginx.com
41778Sdefan@nginx.comMODULE_SUMMARY_python39=	Python 3.9 module for NGINX Unit
51778Sdefan@nginx.com
61778Sdefan@nginx.comMODULE_VERSION_python39=	$(VERSION)
71778Sdefan@nginx.comMODULE_RELEASE_python39=	1
81778Sdefan@nginx.com
91778Sdefan@nginx.comMODULE_CONFARGS_python39=	python --config=python3.9-config
101778Sdefan@nginx.comMODULE_MAKEARGS_python39=	python3.9
111778Sdefan@nginx.comMODULE_INSTARGS_python39=	python3.9-install
121778Sdefan@nginx.com
131778Sdefan@nginx.comMODULE_SOURCES_python39=	unit.example-python-app \
141778Sdefan@nginx.com			unit.example-python39-config
151778Sdefan@nginx.com
16*2116Sthresh@nginx.comifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2 centos9))
171778Sdefan@nginx.comBUILD_DEPENDS_python39=	python3-devel
181778Sdefan@nginx.comelse
191778Sdefan@nginx.comBUILD_DEPENDS_python39=	python39-devel
201778Sdefan@nginx.comendif
211778Sdefan@nginx.com
221778Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_python39)
231778Sdefan@nginx.com
241778Sdefan@nginx.comdefine MODULE_PREINSTALL_python39
251778Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python39/examples/python-app
261778Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
271778Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python39/examples/python-app/wsgi.py
281778Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
291778Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python39/examples/unit.config
301778Sdefan@nginx.comendef
311778Sdefan@nginx.comexport MODULE_PREINSTALL_python39
321778Sdefan@nginx.com
331778Sdefan@nginx.comdefine MODULE_FILES_python39
341778Sdefan@nginx.com%{_libdir}/unit/modules/*
351778Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
361778Sdefan@nginx.comendef
371778Sdefan@nginx.comexport MODULE_FILES_python39
381778Sdefan@nginx.com
391778Sdefan@nginx.comdefine MODULE_POST_python39
401778Sdefan@nginx.comcat <<BANNER
411778Sdefan@nginx.com----------------------------------------------------------------------
421778Sdefan@nginx.com
431778Sdefan@nginx.comThe $(MODULE_SUMMARY_python39) has been installed.
441778Sdefan@nginx.com
451778Sdefan@nginx.comTo check the sample app, run these commands:
461778Sdefan@nginx.com
471778Sdefan@nginx.com sudo service unit start
481778Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
491778Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
501778Sdefan@nginx.com curl http://localhost:8400/
511778Sdefan@nginx.com
521778Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
531778Sdefan@nginx.com
541778Sdefan@nginx.com----------------------------------------------------------------------
551778Sdefan@nginx.comBANNER
561778Sdefan@nginx.comendef
571778Sdefan@nginx.comexport MODULE_POST_python39
58