From c9eea4fec4f60d99ed12365b1a3bd8a07b8b5bf5 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 4 Oct 2017 11:20:22 -0500 Subject: [PATCH] python2-clang subpkg (#1490997) tools-extras: tighten (internal) -libs dep %install: avoid cd --- clang.spec | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/clang.spec b/clang.spec index 0320743..ace1511 100644 --- a/clang.spec +++ b/clang.spec @@ -26,7 +26,7 @@ Name: clang Version: 4.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -117,7 +117,7 @@ intended to run in tandem with a build of a project or code base. %package tools-extra Summary: Extra tools for clang Requires: llvm-libs%{?_isa} = %{version} -Requires: clang-libs%{?_isa} = %{version} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description tools-extra A set of extra tools built using Clang's tooling API. @@ -134,6 +134,14 @@ Requires: python2 %description -n git-clang-format clang-format integration for git. +%package -n python2-clang +Summary: Python2 bindings for clang +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: python2 +%description -n python2-clang +%{summary}. + + %prep %setup -T -q -b 1 -n clang-tools-extra-%{version}.src %patch3 -p1 -b .lit-dep-fix @@ -178,11 +186,14 @@ cd _build make %{?_smp_mflags} %install -cd _build -make install DESTDIR=%{buildroot} +make install DESTDIR=%{buildroot} -C _build sed -i -e 's~#!/usr/bin/env python~#!%{_bindir}/python2~' %{buildroot}%{_bindir}/git-clang-format +# install clang python bindings +mkdir -p %{buildroot}%{python2_sitelib}/clang/ +install -p -m644 bindings/python/clang/* %{buildroot}%{python2_sitelib}/clang/ + # multilib fix mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h install -m 0644 %{SOURCE100} %{buildroot}%{_includedir}/clang/Config/config.h @@ -255,7 +266,15 @@ make %{?_smp_mflags} check || : %files -n git-clang-format %{_bindir}/git-clang-format +%files -n python2-clang +%{python2_sitelib}/clang/ + %changelog +* Wed Oct 04 2017 Rex Dieter - 4.0.1-6 +- python2-clang subpkg (#1490997) +- tools-extras: tighten (internal) -libs dep +- %%install: avoid cd + * Wed Aug 30 2017 Tom Stellard - 4.0.1-5 - Add Requires: python for git-clang-format