diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-10-07 13:59:15 +0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-10-19 08:54:32 +0200 |
commit | f45585ff22499332bf0e74bc47801a25786a7c38 (patch) | |
tree | 148630798e7e17305c3c9b71faa9e1f7f094ffe2 /packaging/git-buildpackage.spec | |
parent | 6da8e46499f4700d1ccbdd3482ff70f669c1d5bf (diff) |
rpm packaging: fix build for CentOS
The Recommends tag is not supported by older rpm that is still in use
CentOS. Also, fix some centos version macro usage.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'packaging/git-buildpackage.spec')
-rw-r--r-- | packaging/git-buildpackage.spec | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec index 6e2e991c..b8e87a62 100644 --- a/packaging/git-buildpackage.spec +++ b/packaging/git-buildpackage.spec @@ -12,10 +12,10 @@ 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 +%if 0%{?fedora} || 0%{?centos_ver} >= 7 %define dpkg_pkg_name dpkg-dev %else -%if 0%{?centos_version} +%if 0%{?centos_ver} %define dpkg_pkg_name dpkg-devel %else %define dpkg_pkg_name dpkg @@ -92,14 +92,14 @@ Requires: %{man_pkg_name} Requires: %{python_pkg_name} Requires: python-setuptools Requires: python-dateutil -%if 0%{?suse_version} || 0%{?tizen_version:1} -Recommends: unzip -Recommends: libzip -%else +%if 0%{?centos_ver} && 0%{?centos_ver} <= 7 Requires: unzip Requires: libzip -%endif +%else +Recommends: unzip +Recommends: libzip Recommends: pristine-tar +%endif %description common Common files and documentation, used by both git-buildpackage debian and rpm tools @@ -202,7 +202,7 @@ EOF %endif # Disable the Debian tools for old CentOS -%if 0%{?centos_version} && 0%{?centos_ver} < 7 +%if 0%{?centos_ver} && 0%{?centos_ver} < 7 for f in `cat files.list`; do rm -rfv %{buildroot}/$f done |