Show More
@@ -20,6 +20,7 b' CENTOS_RELEASES := \\' | |||
|
20 | 20 | # Build a Python for these CentOS releases. |
|
21 | 21 | CENTOS_WITH_PYTHON_RELEASES := |
|
22 | 22 | CENTOS_WITH_NONVERSIONED_PYTHON := |
|
23 | CENTOS_WITH_36_DOCUTILS := 7 | |
|
23 | 24 | |
|
24 | 25 | help: |
|
25 | 26 | @echo 'Packaging Make Targets' |
@@ -110,13 +111,13 b' define centos_targets' | |||
|
110 | 111 | .PHONY: centos$(1) |
|
111 | 112 | centos$(1): |
|
112 | 113 | mkdir -p $$(HGROOT)/packages/centos$(1) |
|
113 | ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,)) | |
|
114 | ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(CENTOS_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,) | |
|
114 | 115 | cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1) |
|
115 | 116 | cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1) |
|
116 | 117 | |
|
117 | 118 | .PHONY: docker-centos$(1) |
|
118 | 119 | docker-centos$(1): |
|
119 | ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,)) | |
|
120 | ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(CENTOS_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,) | |
|
120 | 121 | |
|
121 | 122 | endef |
|
122 | 123 |
@@ -7,6 +7,7 b'' | |||
|
7 | 7 | BUILD=1 |
|
8 | 8 | RPMBUILDDIR="$PWD/rpmbuild" |
|
9 | 9 | PYTHONEXE=python3 |
|
10 | DOCUTILSPACKAGE=python3-docutils | |
|
10 | 11 | |
|
11 | 12 | while [ "$1" ]; do |
|
12 | 13 | case "$1" in |
@@ -25,6 +26,11 b' while [ "$1" ]; do' | |||
|
25 | 26 | PYTHONMD5=f1a2ace631068444831d01485466ece0 |
|
26 | 27 | PYTHONEXE=python |
|
27 | 28 | ;; |
|
29 | --docutilspackage) | |
|
30 | shift | |
|
31 | DOCUTILSPACKAGE="$1" | |
|
32 | shift | |
|
33 | ;; | |
|
28 | 34 | --rpmbuilddir ) |
|
29 | 35 | shift |
|
30 | 36 | RPMBUILDDIR="$1" |
@@ -149,6 +155,9 b' fi' | |||
|
149 | 155 | sed -i \ |
|
150 | 156 | -e "s/^%define withpython.*$/%define withpython $RPMPYTHONVER/" \ |
|
151 | 157 | $rpmspec |
|
158 | sed -i \ | |
|
159 | -e "s/^%global pythondocutils.*$/%global pythondocutils $DOCUTILSPACKAGE/" \ | |
|
160 | $rpmspec | |
|
152 | 161 | |
|
153 | 162 | if [ "$BUILD" ]; then |
|
154 | 163 | rpmbuild --define "_topdir $RPMBUILDDIR" -ba $rpmspec --clean |
@@ -3,12 +3,13 b' FROM centos:centos7' | |||
|
3 | 3 | RUN groupadd -g %GID% build && \ |
|
4 | 4 | useradd -u %UID% -g %GID% -s /bin/bash -d /build -m build |
|
5 | 5 | |
|
6 | RUN yum install -y epel-release | |
|
6 | 7 | RUN yum install -y \ |
|
7 | 8 | gcc \ |
|
8 | 9 | gettext \ |
|
9 | 10 | make \ |
|
10 | python-devel \ | |
|
11 | python-docutils \ | |
|
11 | python3-devel \ | |
|
12 | python36-docutils \ | |
|
12 | 13 | rpm-build \ |
|
13 | 14 | tar |
|
14 | 15 |
@@ -3,6 +3,7 b'' | |||
|
3 | 3 | %define withpython %{nil} |
|
4 | 4 | |
|
5 | 5 | %global pythonexe python3 |
|
6 | %global pythondocutils python3-docutils | |
|
6 | 7 | |
|
7 | 8 | %if "%{?withpython}" |
|
8 | 9 | |
@@ -39,7 +40,7 b' BuildRequires: make, gcc, gettext' | |||
|
39 | 40 | %if "%{?withpython}" |
|
40 | 41 | BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel |
|
41 | 42 | %else |
|
42 |
BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{python |
|
|
43 | BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythondocutils} | |
|
43 | 44 | Requires: %{pythonexe} >= %{pythonver} |
|
44 | 45 | %endif |
|
45 | 46 | # The hgk extension uses the wish tcl interpreter, but we don't enforce it |
General Comments 0
You need to be logged in to leave comments.
Login now