xref: /unit/pkg/rpm/Makefile.python34 (revision 1225:0f35b3937026)
1490Sdefan@nginx.comMODULES+=		python34
2561Sdefan@nginx.comMODULE_SUFFIX_python34=	python3.4
3490Sdefan@nginx.com
4490Sdefan@nginx.comMODULE_SUMMARY_python34=	Python 3.4 module for NGINX Unit
5490Sdefan@nginx.com
6490Sdefan@nginx.comMODULE_VERSION_python34=	$(VERSION)
7*1225Sdefan@nginx.comMODULE_RELEASE_python34=	1
8490Sdefan@nginx.com
9490Sdefan@nginx.comMODULE_CONFARGS_python34=	python --config=python3.4-config
10490Sdefan@nginx.comMODULE_MAKEARGS_python34=	python3.4
11490Sdefan@nginx.comMODULE_INSTARGS_python34=	python3.4-install
12490Sdefan@nginx.com
13490Sdefan@nginx.comMODULE_SOURCES_python34=	unit.example-python-app \
14490Sdefan@nginx.com			unit.example-python34-config
15490Sdefan@nginx.com
16562Sdefan@nginx.comifneq (,$(findstring $(OSVER),opensuse-leap sles))
17562Sdefan@nginx.comBUILD_DEPENDS_python34=	python3-devel
18562Sdefan@nginx.comelse
19490Sdefan@nginx.comBUILD_DEPENDS_python34=	python34-devel
20562Sdefan@nginx.comendif
21562Sdefan@nginx.com
22490Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_python34)
23490Sdefan@nginx.com
24490Sdefan@nginx.comdefine MODULE_PREINSTALL_python34
25490Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python34/examples/python-app
26490Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27490Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python34/examples/python-app/wsgi.py
28490Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29490Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-python34/examples/unit.config
30490Sdefan@nginx.comendef
31490Sdefan@nginx.comexport MODULE_PREINSTALL_python34
32490Sdefan@nginx.com
33490Sdefan@nginx.comdefine MODULE_FILES_python34
34490Sdefan@nginx.com%{_libdir}/unit/modules/*
35490Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
36490Sdefan@nginx.comendef
37490Sdefan@nginx.comexport MODULE_FILES_python34
38490Sdefan@nginx.com
39490Sdefan@nginx.comdefine MODULE_POST_python34
40490Sdefan@nginx.comcat <<BANNER
41490Sdefan@nginx.com----------------------------------------------------------------------
42490Sdefan@nginx.com
43490Sdefan@nginx.comThe $(MODULE_SUMMARY_python34) 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_python34
58