xref: /unit/pkg/rpm/Makefile.python37 (revision 1310)
1910Sremi@remirepo.netMODULES+=		python37
2910Sremi@remirepo.netMODULE_SUFFIX_python37=	python3.7
3910Sremi@remirepo.net
4910Sremi@remirepo.netMODULE_SUMMARY_python37=	Python 3.7 module for NGINX Unit
5910Sremi@remirepo.net
6910Sremi@remirepo.netMODULE_VERSION_python37=	$(VERSION)
7910Sremi@remirepo.netMODULE_RELEASE_python37=	1
8910Sremi@remirepo.net
9910Sremi@remirepo.netMODULE_CONFARGS_python37=	python --config=python3.7-config
10910Sremi@remirepo.netMODULE_MAKEARGS_python37=	python3.7
11910Sremi@remirepo.netMODULE_INSTARGS_python37=	python3.7-install
12910Sremi@remirepo.net
13910Sremi@remirepo.netMODULE_SOURCES_python37=	unit.example-python-app \
14910Sremi@remirepo.net			unit.example-python37-config
15910Sremi@remirepo.net
16*1310Sdefan@nginx.comifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
17910Sremi@remirepo.netBUILD_DEPENDS_python37=	python3-devel
18910Sremi@remirepo.netelse
19910Sremi@remirepo.netBUILD_DEPENDS_python37=	python37-devel
20910Sremi@remirepo.netendif
21910Sremi@remirepo.net
22910Sremi@remirepo.netBUILD_DEPENDS+=		$(BUILD_DEPENDS_python37)
23910Sremi@remirepo.net
24910Sremi@remirepo.netdefine MODULE_PREINSTALL_python37
25910Sremi@remirepo.net%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python37/examples/python-app
26910Sremi@remirepo.net%{__install} -m 644 -p %{SOURCE100} \
27910Sremi@remirepo.net    %{buildroot}%{_datadir}/doc/unit-python37/examples/python-app/wsgi.py
28910Sremi@remirepo.net%{__install} -m 644 -p %{SOURCE101} \
29910Sremi@remirepo.net    %{buildroot}%{_datadir}/doc/unit-python37/examples/unit.config
30910Sremi@remirepo.netendef
31910Sremi@remirepo.netexport MODULE_PREINSTALL_python37
32910Sremi@remirepo.net
33910Sremi@remirepo.netdefine MODULE_FILES_python37
34910Sremi@remirepo.net%{_libdir}/unit/modules/*
35910Sremi@remirepo.net%{_libdir}/unit/debug-modules/*
36910Sremi@remirepo.netendef
37910Sremi@remirepo.netexport MODULE_FILES_python37
38910Sremi@remirepo.net
39910Sremi@remirepo.netdefine MODULE_POST_python37
40910Sremi@remirepo.netcat <<BANNER
41910Sremi@remirepo.net----------------------------------------------------------------------
42910Sremi@remirepo.net
43910Sremi@remirepo.netThe $(MODULE_SUMMARY_python37) has been installed.
44910Sremi@remirepo.net
45910Sremi@remirepo.netTo check the sample app, run these commands:
46910Sremi@remirepo.net
47910Sremi@remirepo.net sudo service unit start
48910Sremi@remirepo.net 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
50910Sremi@remirepo.net curl http://localhost:8400/
51910Sremi@remirepo.net
52910Sremi@remirepo.netOnline documentation is available at https://unit.nginx.org
53910Sremi@remirepo.net
54910Sremi@remirepo.net----------------------------------------------------------------------
55910Sremi@remirepo.netBANNER
56910Sremi@remirepo.netendef
57910Sremi@remirepo.netexport MODULE_POST_python37
58