aboutsummaryrefslogtreecommitdiffhomepage
path: root/packaging
diff options
context:
space:
mode:
authorQuanah Gibson-Mount <quanah@symas.com>2021-05-30 12:16:20 +0200
committerGuido Günther <agx@sigxcpu.org>2021-05-30 12:32:59 +0200
commit31512472ba7d7a914c0871e0ae4d6316041f8da3 (patch)
tree14440cc8fe4356c745198e30eb4e6d8a6575070f /packaging
parentd32fdb46a9e49967ffedad27ba0d522735306d9f (diff)
spec: Fix rpm build on centos7 and centos8
Diffstat (limited to 'packaging')
-rw-r--r--packaging/0001-Fix-path-to-docbook-dtd-file.patch24
-rw-r--r--packaging/git-buildpackage.spec27
2 files changed, 50 insertions, 1 deletions
diff --git a/packaging/0001-Fix-path-to-docbook-dtd-file.patch b/packaging/0001-Fix-path-to-docbook-dtd-file.patch
new file mode 100644
index 00000000..fa35ef5d
--- /dev/null
+++ b/packaging/0001-Fix-path-to-docbook-dtd-file.patch
@@ -0,0 +1,24 @@
+From 8725e1900b3924d3161a9a0233787334d03ca9a6 Mon Sep 17 00:00:00 2001
+From: "Quanah Gibson-Mount" <quanah@symas.com>
+Date: Thu, 29 Apr 2021 15:54:08 -0400
+Subject: [PATCH] Fix path to docbook dtd file
+
+---
+ docs/man.gbp.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/man.gbp.xml b/docs/man.gbp.xml
+index d74e906e..3a543376 100644
+--- a/docs/man.gbp.xml
++++ b/docs/man.gbp.xml
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
++ "/usr/share/sgml/docbook/sgml-dtd-4.5/docbook.dtd" [
+ <!ENTITY % COMMON SYSTEM "common.ent">
+ %COMMON;
+ <!ENTITY % MANPAGES SYSTEM "manpages/manpages.ent">
+--
+2.27.0
+
diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec
index a20aff5f..ebd5805c 100644
--- a/packaging/git-buildpackage.spec
+++ b/packaging/git-buildpackage.spec
@@ -1,5 +1,11 @@
# Add --without docs rpmbuild option, i.e. docs are enabled by default
%bcond_without docs
+%if 0%{?centos_ver} && 0%{?centos_ver} >= 7
+%define __python /usr/bin/python3
+%endif
+%if 0%{?centos_ver} && 0%{?centos_ver} == 7
+%define __python3 /usr/bin/python3
+%endif
Name: git-buildpackage
Summary: Build packages from git
@@ -10,6 +16,9 @@ License: GPLv2
BuildArch: noarch
URL: https://honk.sigxcpu.org/piki/projects/git-buildpackage/
Source0: %{name}_%{version}.tar.gz
+%if 0%{?centos_ver} && 0%{?centos_ver} >= 7
+Patch0: 0001-Fix-path-to-docbook-dtd-file.patch
+%endif
# Conditional package names for requirements
%if 0%{?fedora} || 0%{?centos_ver} >= 7
@@ -37,8 +46,12 @@ Source0: %{name}_%{version}.tar.gz
%if 0%{?tizen_version:1}
%define rpm_python_pkg_name python-rpm
%else
+%if 0%{?centos_ver} && 0%{?centos_ver} == 7
+%define rpm_python_pkg_name rpm-python
+%else
%define rpm_python_pkg_name python3-rpm
%endif
+%endif
Requires: %{name}-common = %{version}-%{release}
Requires: %{dpkg_pkg_name}
@@ -47,9 +60,19 @@ BuildRequires: python3
BuildRequires: python3-setuptools
%if %{with docs}
+%if 0%{?centos_ver} && 0%{?centos_ver} >= 8
+BuildRequires: docbook2X
+%else
+%if 0%{?centos_ver} && 0%{?centos_ver} == 7
+BuildRequires: docbook-utils
+%else
BuildRequires: docbook2x
+%endif
+%endif
BuildRequires: gtk-doc
+%if 0%{?suse_version}
BuildRequires: libxslt-tools
+%endif
%if 0%{?fedora}
BuildRequires: perl-podlators
%endif
@@ -130,7 +153,9 @@ Debian and the RPM tool set.
%prep
%setup -q -n %{name}-%{version}
-
+%if 0%{?centos_ver} && 0%{?centos_ver} >= 7
+%patch0 -p1
+%endif
%build