xref: /unit/pkg/rpm/Makefile.python34 (revision 1225:0f35b3937026)
1MODULES+=		python34
2MODULE_SUFFIX_python34=	python3.4
3
4MODULE_SUMMARY_python34=	Python 3.4 module for NGINX Unit
5
6MODULE_VERSION_python34=	$(VERSION)
7MODULE_RELEASE_python34=	1
8
9MODULE_CONFARGS_python34=	python --config=python3.4-config
10MODULE_MAKEARGS_python34=	python3.4
11MODULE_INSTARGS_python34=	python3.4-install
12
13MODULE_SOURCES_python34=	unit.example-python-app \
14			unit.example-python34-config
15
16ifneq (,$(findstring $(OSVER),opensuse-leap sles))
17BUILD_DEPENDS_python34=	python3-devel
18else
19BUILD_DEPENDS_python34=	python34-devel
20endif
21
22BUILD_DEPENDS+=		$(BUILD_DEPENDS_python34)
23
24define MODULE_PREINSTALL_python34
25%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python34/examples/python-app
26%{__install} -m 644 -p %{SOURCE100} \
27    %{buildroot}%{_datadir}/doc/unit-python34/examples/python-app/wsgi.py
28%{__install} -m 644 -p %{SOURCE101} \
29    %{buildroot}%{_datadir}/doc/unit-python34/examples/unit.config
30endef
31export MODULE_PREINSTALL_python34
32
33define MODULE_FILES_python34
34%{_libdir}/unit/modules/*
35%{_libdir}/unit/debug-modules/*
36endef
37export MODULE_FILES_python34
38
39define MODULE_POST_python34
40cat <<BANNER
41----------------------------------------------------------------------
42
43The $(MODULE_SUMMARY_python34) has been installed.
44
45To check the sample app, run these commands:
46
47 sudo service unit start
48 cd /usr/share/doc/%{name}/examples
49 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
50 curl http://localhost:8400/
51
52Online documentation is available at https://unit.nginx.org
53
54----------------------------------------------------------------------
55BANNER
56endef
57export MODULE_POST_python34
58