summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-12-02 15:09:53 +0300
committerAndrei Belov <defan@nginx.com>2019-12-02 15:09:53 +0300
commita3e5d095016166a78a45c9aade2b19d75d66833f (patch)
treeb4610c10fa4a315f1643f4caffb94faad2c0ea9b /pkg/rpm
parent9a7881d131767083fb095e0339c0ed788d998b05 (diff)
downloadunit-a3e5d095016166a78a45c9aade2b19d75d66833f.tar.gz
unit-a3e5d095016166a78a45c9aade2b19d75d66833f.tar.bz2
Packages: added Python 3 support on RHEL/CentOS 7.
Diffstat (limited to 'pkg/rpm')
-rw-r--r--pkg/rpm/Makefile3
-rw-r--r--pkg/rpm/Makefile.python279
-rw-r--r--pkg/rpm/Makefile.python362
3 files changed, 12 insertions, 2 deletions
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 4e970e45..7d9de8ad 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -57,7 +57,8 @@ endif
ifeq ($(OSVER), centos7)
include Makefile.php
-include Makefile.python
+include Makefile.python27
+include Makefile.python36
include Makefile.go
include Makefile.perl
include Makefile.jsc-common
diff --git a/pkg/rpm/Makefile.python27 b/pkg/rpm/Makefile.python27
index 95b392a9..19e64d43 100644
--- a/pkg/rpm/Makefile.python27
+++ b/pkg/rpm/Makefile.python27
@@ -17,12 +17,21 @@ ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
BUILD_DEPENDS_python27= python-devel
else ifneq (,$(findstring $(OSVER),fedora centos8))
BUILD_DEPENDS_python27= python2-devel
+else ifneq (,$(findstring $(OSVER),centos7))
+BUILD_DEPENDS_python27= python-devel
else
BUILD_DEPENDS_python27= python27-devel
endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_python27)
+define MODULE_DEFINITIONS_python27
+%if (0%{?rhel} == 7)
+Obsoletes: unit-python
+%endif
+endef
+export MODULE_DEFINITIONS_python27
+
define MODULE_PREINSTALL_python27
%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python27/examples/python-app
%{__install} -m 644 -p %{SOURCE100} \
diff --git a/pkg/rpm/Makefile.python36 b/pkg/rpm/Makefile.python36
index 25e33968..827d2253 100644
--- a/pkg/rpm/Makefile.python36
+++ b/pkg/rpm/Makefile.python36
@@ -13,7 +13,7 @@ MODULE_INSTARGS_python36= python3.6-install
MODULE_SOURCES_python36= unit.example-python-app \
unit.example-python36-config
-ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora))
+ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora centos7))
BUILD_DEPENDS_python36= python3-devel
else
BUILD_DEPENDS_python36= python36-devel