summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wang <junbill.wang@samsung.com>2016-03-03 03:52:52 +0800
committerJun Wang <junbill.wang@samsung.com>2016-03-03 03:52:52 +0800
commit474a3c1b348bb9f69ea3e07f9f1da50d727c363d (patch)
treed1fd4f1f131031ca4ae631392e1566ffa5460669
parent5e389d45d9ad5606928cefbb79b11d428e2f0ad9 (diff)
downloadgit-buildpackage-474a3c1b348bb9f69ea3e07f9f1da50d727c363d.tar.gz
git-buildpackage-474a3c1b348bb9f69ea3e07f9f1da50d727c363d.tar.bz2
git-buildpackage-474a3c1b348bb9f69ea3e07f9f1da50d727c363d.zip
Fix build errors in CentOS7
Change-Id: I4c690c005d23f4b184a0aa7ee3cf2306ad3cf3ad
-rw-r--r--packaging/git-buildpackage.spec14
1 files 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*