From d8d5392adcd1e0551912d2e060d97441597760c7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sun, 6 Aug 2017 11:57:20 +0200 Subject: [PATCH] Fix Requires for git-clang-format and split into its own package --- clang.spec | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/clang.spec b/clang.spec index 536c4f0..0320743 100644 --- a/clang.spec +++ b/clang.spec @@ -16,8 +16,7 @@ %{_bindir}/clang-cpp \ %{_bindir}/clang-format \ %{_bindir}/clang-import-test \ - %{_bindir}/clang-offload-bundler \ - %{_bindir}/git-clang-format + %{_bindir}/clang-offload-bundler %if 0%{?fedora} %bcond_without python3 @@ -27,7 +26,7 @@ Name: clang Version: 4.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -123,6 +122,18 @@ Requires: clang-libs%{?_isa} = %{version} %description tools-extra A set of extra tools built using Clang's tooling API. +# Put git-clang-format in its own package, because it Requires git and python2 +# and we don't want to force users to install all those dependenices if they +# just want clang. +%package -n git-clang-format +Summary: clang-format integration for git +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: git +Requires: python2 + +%description -n git-clang-format +clang-format integration for git. + %prep %setup -T -q -b 1 -n clang-tools-extra-%{version}.src %patch3 -p1 -b .lit-dep-fix @@ -170,6 +181,8 @@ make %{?_smp_mflags} cd _build make install DESTDIR=%{buildroot} +sed -i -e 's~#!/usr/bin/env python~#!%{_bindir}/python2~' %{buildroot}%{_bindir}/git-clang-format + # multilib fix mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h install -m 0644 %{SOURCE100} %{buildroot}%{_includedir}/clang/Config/config.h @@ -239,7 +252,13 @@ make %{?_smp_mflags} check || : %{_bindir}/find-all-symbols %{_bindir}/modularize +%files -n git-clang-format +%{_bindir}/git-clang-format + %changelog +* Wed Aug 30 2017 Tom Stellard - 4.0.1-5 +- Add Requires: python for git-clang-format + * Sun Aug 06 2017 Björn Esser - 4.0.1-4 - Rebuilt for AutoReq cmake-filesystem