diff contrib/packaging/buildrpm @ 45836:de1f4c431619

packaging: switch centos 7 packaging to python 3 Differential Revision: https://phab.mercurial-scm.org/D9293
author Mathias De Mare <mathias.de_mare@nokia.com>
date Fri, 06 Nov 2020 17:32:23 +0100
parents 518655314fc5
children 97205cf0ee4d
line wrap: on
line diff
--- a/contrib/packaging/buildrpm	Fri Nov 06 11:24:54 2020 +0100
+++ b/contrib/packaging/buildrpm	Fri Nov 06 17:32:23 2020 +0100
@@ -7,6 +7,7 @@
 BUILD=1
 RPMBUILDDIR="$PWD/rpmbuild"
 PYTHONEXE=python3
+DOCUTILSPACKAGE=python3-docutils
 
 while [ "$1" ]; do
     case "$1" in
@@ -25,6 +26,11 @@
         PYTHONMD5=f1a2ace631068444831d01485466ece0
         PYTHONEXE=python
         ;;
+    --docutilspackage)
+        shift
+        DOCUTILSPACKAGE="$1"
+        shift
+        ;;
     --rpmbuilddir )
         shift
         RPMBUILDDIR="$1"
@@ -149,6 +155,9 @@
 sed -i \
     -e "s/^%define withpython.*$/%define withpython $RPMPYTHONVER/" \
     $rpmspec
+sed -i \
+    -e "s/^%global pythondocutils.*$/%global pythondocutils $DOCUTILSPACKAGE/" \
+    $rpmspec
 
 if [ "$BUILD" ]; then
     rpmbuild --define "_topdir $RPMBUILDDIR" -ba $rpmspec --clean