From 474a3c1b348bb9f69ea3e07f9f1da50d727c363d Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Thu, 3 Mar 2016 03:52:52 +0800 Subject: Fix build errors in CentOS7 Change-Id: I4c690c005d23f4b184a0aa7ee3cf2306ad3cf3ad --- packaging/git-buildpackage.spec | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec index c610606a..8a9e3cad 100644 --- a/packaging/git-buildpackage.spec +++ b/packaging/git-buildpackage.spec @@ -12,15 +12,11 @@ URL: https://honk.sigxcpu.org/piki/projects/git-buildpackage/ Source0: %{name}_%{version}.tar.gz # Conditional package names for requirements -%if 0%{?fedora} || 0%{?centos_ver} > 7 -%define dpkg_pkg_name dpkg-dev -%else -%if 0%{?centos_version} +%if 0%{?fedora} || 0%{?centos_ver} %define dpkg_pkg_name dpkg-devel %else %define dpkg_pkg_name dpkg %endif -%endif %if 0%{?suse_version} && 0%{?suse_version} < 1230 %define devscripts_pkg_name devscripts-fixes @@ -34,7 +30,7 @@ Source0: %{name}_%{version}.tar.gz %define man_pkg_name man %endif -%if 0%{?fedora} || 0%{?centos_version} || 0%{?centos_ver} || 0%{?tizen_version:1} +%if 0%{?fedora} || 0%{?centos_ver} || 0%{?tizen_version:1} %define python_pkg_name python %else %define python_pkg_name python-base @@ -177,6 +173,7 @@ GIT_CEILING_DIRECTORIES=%{_builddir} \ %install rm -rf %{buildroot} WITHOUT_NOSETESTS=1 %{__python} ./setup.py install --root=%{buildroot} --prefix=/usr +rm -rf %{buildroot}%{python_sitelib}/*info %if %{with docs} # Install man pages @@ -222,8 +219,8 @@ cat >> files.list << EOF EOF %endif -# Disable the debian tools for old CentOS -%if 0%{?centos_version} && 0%{?centos_ver} < 7 +# Disable the debian tools for CentOS +%if 0%{?centos_version} for f in `cat files.list`; do rm -rfv %{buildroot}/$f done @@ -244,7 +241,6 @@ done %dir %{python_sitelib}/gbp/pkg %dir %{python_sitelib}/gbp/scripts %dir %{python_sitelib}/gbp/scripts/common -%{python_sitelib}/gbp-* %{python_sitelib}/gbp/*.py* %{python_sitelib}/gbp/scripts/__init__.py* %{python_sitelib}/gbp/scripts/clone.py* -- cgit v1.2.3