From 661a478958a6fc986a66f0e5471e9d4180b28307 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: May 20 2016 16:35:47 +0000 Subject: update to latest upstream release ... and introduce the python2- and python3- subpackages --- diff --git a/csdiff.spec b/csdiff.spec index 62a5ba7..7da1d03 100644 --- a/csdiff.spec +++ b/csdiff.spec @@ -1,6 +1,6 @@ Name: csdiff -Version: 1.2.3 -Release: 8%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: Non-interactive tools for processing code scan results in plain-text Group: Applications/Text @@ -11,18 +11,41 @@ Source0: https://git.fedorahosted.org/cgit/codescan-diff.git/snapshot/%{name} BuildRequires: boost-devel BuildRequires: cmake BuildRequires: help2man -BuildRequires: python-devel %description This package contains the csdiff tool for comparing code scan defect lists in order to find out added or fixed defects, and the csgrep utility for filtering defect lists using various filtering predicates. +%package -n python2-%{name} +Summary: Python interface to csdiff for Python 2 +Conflicts: %{name} <= 1.2.3 +BuildRequires: python2-devel +%{?python_provide:%python_provide python2-%{name}} + +%description -n python2-%{name} +This package contains the Python 2 binding for the csdiff tool for comparing +code scan defect lists to find out added or fixed defects. + %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif +# build the python3-csdiff package on Fedora 23+ +%global py3_support ((7 < 0%{?rhel}) || (22 < 0%{?fedora})) +%if %{py3_support} +%package -n python3-%{name} +Summary: Python interface to csdiff for Python 3 +BuildRequires: boost-python3-devel +BuildRequires: python3-devel +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +This package contains the Python 3 binding for the csdiff tool for comparing +code scan defect lists to find out added or fixed defects. +%endif + %prep %setup -q @@ -30,10 +53,22 @@ defect lists using various filtering predicates. make version.cc mkdir csdiff_build cd csdiff_build -%cmake .. +%cmake .. -DPYTHON_EXECUTABLE=%{__python2} make %{?_smp_mflags} VERBOSE=yes +# build the python3-csdiff package on Fedora 23+ +%if %{py3_support} +mkdir ../csdiff_build_py3 +cd ../csdiff_build_py3 +%cmake .. -DPYTHON_EXECUTABLE=%{__python3} -DBOOST_PYTHON_LIB_NAME=boost_python3 +make %{?_smp_mflags} VERBOSE=yes pycsdiff +%endif + %install +%if %{py3_support} +mkdir -vp %{buildroot}%{python3_sitearch} +install -vm0644 csdiff_build_py3/pycsdiff.so %{buildroot}%{python3_sitearch} +%endif cd csdiff_build make install DESTDIR="$RPM_BUILD_ROOT" @@ -52,10 +87,23 @@ ctest %{?_smp_mflags} --output-on-failure %{_mandir}/man1/cshtml.1* %{_mandir}/man1/cslinker.1* %{_mandir}/man1/cssort.1* -%{python2_sitearch}/pycsdiff.so %doc COPYING README +%files -n python2-%{name} +%{python2_sitearch}/pycsdiff.so +%doc COPYING + +%if %{py3_support} +%files -n python3-%{name} +%{python3_sitearch}/pycsdiff.so +%doc COPYING +%endif + %changelog +* Fri May 20 2016 Kamil Dudka 1.3.0-1 +- update to latest upstream release +- introduce the python2- and python3- subpackages + * Fri May 13 2016 Kamil Dudka 1.2.3-8 - rebuild against latest boost libs to fix linking errors at run time (#1331983) diff --git a/sources b/sources index fc1b7ab..2b13e92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -63aff44d0e7cb3f0d3e3791f4306f955 csdiff-1.2.3.tar.xz +3465be943e88192a7e167b29ccf2b605 csdiff-1.3.0.tar.xz