xref: /unit/pkg/rpm/Makefile.python36 (revision 1333:7b483cf5cb09)
1490Sdefan@nginx.comMODULES+=		python36
2561Sdefan@nginx.comMODULE_SUFFIX_python36=	python3.6
3490Sdefan@nginx.com
4490Sdefan@nginx.comMODULE_SUMMARY_python36=	Python 3.6 module for NGINX Unit
5490Sdefan@nginx.com
6490Sdefan@nginx.comMODULE_VERSION_python36=	$(VERSION)
7821Svbart@nginx.comMODULE_RELEASE_python36=	1
8490Sdefan@nginx.com
9490Sdefan@nginx.comMODULE_CONFARGS_python36=	python --config=python3.6-config
10490Sdefan@nginx.comMODULE_MAKEARGS_python36=	python3.6
11490Sdefan@nginx.comMODULE_INSTARGS_python36=	python3.6-install
12490Sdefan@nginx.com
13490Sdefan@nginx.comMODULE_SOURCES_python36=	unit.example-python-app \
14490Sdefan@nginx.com			unit.example-python36-config
15490Sdefan@nginx.com
16*1301Sdefan@nginx.comifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora centos7))
17562Sdefan@nginx.comBUILD_DEPENDS_python36=	python3-devel
18562Sdefan@nginx.comelse
19490Sdefan@nginx.comBUILD_DEPENDS_python36=	python36-devel
20562Sdefan@nginx.comendif
21562Sdefan@nginx.com
22490Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_python36)
23490Sdefan@nginx.com
24490Sdefan@nginx.comdefine MODULE_PREINSTALL_python36
25490Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python36/examples/python-app
26490Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27490Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python36/examples/python-app/wsgi.py
28490Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29490Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python36/examples/unit.config
30490Sdefan@nginx.comendef
31490Sdefan@nginx.comexport MODULE_PREINSTALL_python36
32490Sdefan@nginx.com
33490Sdefan@nginx.comdefine MODULE_FILES_python36
34490Sdefan@nginx.com%{_libdir}/unit/modules/*
35490Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
36490Sdefan@nginx.comendef
37490Sdefan@nginx.comexport MODULE_FILES_python36
38490Sdefan@nginx.com
39490Sdefan@nginx.comdefine MODULE_POST_python36
40490Sdefan@nginx.comcat <<BANNER
41490Sdefan@nginx.com----------------------------------------------------------------------
42490Sdefan@nginx.com
43490Sdefan@nginx.comThe $(MODULE_SUMMARY_python36) has been installed.
44490Sdefan@nginx.com
45490Sdefan@nginx.comTo check the sample app, run these commands:
46490Sdefan@nginx.com
47490Sdefan@nginx.com sudo service unit start
48787Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
49912Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
50490Sdefan@nginx.com curl http://localhost:8400/
51490Sdefan@nginx.com
52490Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
53490Sdefan@nginx.com
54490Sdefan@nginx.com----------------------------------------------------------------------
55490Sdefan@nginx.comBANNER
56490Sdefan@nginx.comendef
57490Sdefan@nginx.comexport MODULE_POST_python36
58