31e01c3
Name:       csdiff
6b6da4c
Version:    1.3.2
6061901
Release:    1%{?dist}
31e01c3
Summary:    Non-interactive tools for processing code scan results in plain-text
31e01c3
31e01c3
Group:      Applications/Text
31e01c3
License:    GPLv3+
6b6da4c
URL:        https://github.com/kdudka/csdiff
6b6da4c
Source0:    https://github.com/kdudka/csdiff/releases/download/%{name}-%{version}/%{name}-%{version}.tar.xz
31e01c3
31e01c3
BuildRequires: boost-devel
31e01c3
BuildRequires: cmake
31e01c3
BuildRequires: help2man
31e01c3
31e01c3
%description
31e01c3
This package contains the csdiff tool for comparing code scan defect lists in
31e01c3
order to find out added or fixed defects, and the csgrep utility for filtering
31e01c3
defect lists using various filtering predicates. 
31e01c3
661a478
%package -n python2-%{name}
661a478
Summary:        Python interface to csdiff for Python 2
661a478
Conflicts:      %{name} <= 1.2.3
661a478
BuildRequires:  python2-devel
661a478
%{?python_provide:%python_provide python2-%{name}}
661a478
661a478
%description -n python2-%{name}
661a478
This package contains the Python 2 binding for the csdiff tool for comparing
661a478
code scan defect lists to find out added or fixed defects.
661a478
4cbb8f7
%if 0%{?rhel} && 0%{?rhel} <= 6
4cbb8f7
%{!?__python2: %global __python2 /usr/bin/python2}
4cbb8f7
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
4cbb8f7
%endif
4cbb8f7
661a478
# build the python3-csdiff package on Fedora 23+
661a478
%global py3_support ((7 < 0%{?rhel}) || (22 < 0%{?fedora}))
661a478
%if %{py3_support}
661a478
%package -n python3-%{name}
661a478
Summary:        Python interface to csdiff for Python 3
661a478
BuildRequires:  boost-python3-devel
661a478
BuildRequires:  python3-devel
661a478
%{?python_provide:%python_provide python3-%{name}}
661a478
661a478
%description -n python3-%{name}
661a478
This package contains the Python 3 binding for the csdiff tool for comparing
661a478
code scan defect lists to find out added or fixed defects.
661a478
%endif
661a478
31e01c3
%prep
31e01c3
%setup -q
31e01c3
31e01c3
%build
31e01c3
make version.cc
31e01c3
mkdir csdiff_build
31e01c3
cd csdiff_build
661a478
%cmake .. -DPYTHON_EXECUTABLE=%{__python2}
31e01c3
make %{?_smp_mflags} VERBOSE=yes
31e01c3
661a478
# build the python3-csdiff package on Fedora 23+
661a478
%if %{py3_support}
661a478
mkdir ../csdiff_build_py3
661a478
cd ../csdiff_build_py3
661a478
%cmake .. -DPYTHON_EXECUTABLE=%{__python3} -DBOOST_PYTHON_LIB_NAME=boost_python3
661a478
make %{?_smp_mflags} VERBOSE=yes pycsdiff
661a478
%endif
661a478
31e01c3
%install
661a478
%if %{py3_support}
661a478
mkdir -vp %{buildroot}%{python3_sitearch}
661a478
install -vm0644 csdiff_build_py3/pycsdiff.so %{buildroot}%{python3_sitearch}
661a478
%endif
31e01c3
cd csdiff_build
31e01c3
make install DESTDIR="$RPM_BUILD_ROOT"
31e01c3
31e01c3
%check
31e01c3
cd csdiff_build
31e01c3
ctest %{?_smp_mflags} --output-on-failure
31e01c3
31e01c3
%files
31e01c3
%{_bindir}/csdiff
31e01c3
%{_bindir}/csgrep
31e01c3
%{_bindir}/cshtml
31e01c3
%{_bindir}/cslinker
31e01c3
%{_bindir}/cssort
31e01c3
%{_mandir}/man1/csdiff.1*
31e01c3
%{_mandir}/man1/csgrep.1*
31e01c3
%{_mandir}/man1/cshtml.1*
31e01c3
%{_mandir}/man1/cslinker.1*
31e01c3
%{_mandir}/man1/cssort.1*
31e01c3
%doc COPYING README
31e01c3
661a478
%files -n python2-%{name}
661a478
%{python2_sitearch}/pycsdiff.so
661a478
%doc COPYING
661a478
661a478
%if %{py3_support}
661a478
%files -n python3-%{name}
661a478
%{python3_sitearch}/pycsdiff.so
661a478
%doc COPYING
661a478
%endif
661a478
31e01c3
%changelog
6b6da4c
* Wed Feb 15 2017 Kamil Dudka <kdudka@redhat.com> 1.3.2-1
6b6da4c
- update to latest upstream release
6b6da4c
- update project URL and source URL
6b6da4c
6061901
* Wed Sep 14 2016 Kamil Dudka <kdudka@redhat.com> 1.3.1-1
6061901
- update to latest upstream release
6061901
c660e65
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
c660e65
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
c660e65
661a478
* Fri May 20 2016 Kamil Dudka <kdudka@redhat.com> 1.3.0-1
661a478
- update to latest upstream release
661a478
- introduce the python2- and python3- subpackages
661a478
5771684
* Fri May 13 2016 Kamil Dudka <kdudka@redhat.com> 1.2.3-8
5771684
- rebuild against latest boost libs to fix linking errors at run time (#1331983)
5771684
95bb3a0
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-7
95bb3a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
95bb3a0
ee350a2
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1.2.3-6
ee350a2
- Rebuilt for Boost 1.60
ee350a2
92005d9
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.2.3-5
92005d9
- Rebuilt for Boost 1.59
92005d9
7174d92
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-4
7174d92
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
7174d92
a4d8bfd
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.2.3-3
a4d8bfd
- rebuild for Boost 1.58
a4d8bfd
f89e899
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
f89e899
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f89e899
b0562d1
* Tue May 26 2015 Kamil Dudka <kdudka@redhat.com> 1.2.3-1
b0562d1
- update to latest upstream release
b0562d1
6b0d65b
* Tue Apr 14 2015 Kamil Dudka <kdudka@redhat.com> 1.2.2-2
6b0d65b
- rebuild against latest boost (missing symbol _ZN5boost15program_options3argE)
6b0d65b
effa04e
* Wed Apr 01 2015 Kamil Dudka <kdudka@redhat.com> 1.2.2-1
effa04e
- update to latest upstream release
effa04e
958c492
* Tue Mar 03 2015 Kamil Dudka <kdudka@redhat.com> 1.2.1-1
958c492
- update to latest upstream release
958c492
5050de5
* Wed Feb 18 2015 Kamil Dudka <kdudka@redhat.com> 1.2.0-1
5050de5
- update to latest upstream release
5050de5
b8d5f6b
* Thu Feb 05 2015 Kamil Dudka <kdudka@redhat.com> 1.1.4-2
b8d5f6b
- rebuild for boost 1.57.0
b8d5f6b
1a4f3f3
* Wed Jan 28 2015 Kamil Dudka <kdudka@redhat.com> 1.1.4-1
1a4f3f3
- update to latest upstream release
1a4f3f3
Petr Machata b22c118
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.1.3-2
Petr Machata b22c118
- Rebuild for boost 1.57.0
Petr Machata b22c118
5103b51
* Mon Jan 19 2015 Kamil Dudka <kdudka@redhat.com> 1.1.3-1
5103b51
- update to latest upstream
5103b51
4cbb8f7
* Thu Dec 18 2014 Kamil Dudka <kdudka@redhat.com> 1.1.2-1
4cbb8f7
- update to latest upstream release
4cbb8f7
- package the pycsdiff python module
4cbb8f7
9857081
* Thu Nov 06 2014 Kamil Dudka <kdudka@redhat.com> 1.1.1-1
9857081
- update to latest upstream release
9857081
a3eacb3
* Fri Sep 19 2014 Kamil Dudka <kdudka@redhat.com> 1.1.0-1
a3eacb3
- update to latest upstream release
a3eacb3
d401a5b
* Wed Aug 20 2014 Kamil Dudka <kdudka@redhat.com> 1.0.10-1
d401a5b
- update to latest upstream bugfix release
d401a5b
97c59d3
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
97c59d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
97c59d3
28c6fd1
* Fri Aug 01 2014 Kamil Dudka <kdudka@redhat.com> 1.0.9-1
28c6fd1
- update to latest upstream bugfix release
28c6fd1
5569280
* Thu Jul 17 2014 Kamil Dudka <kdudka@redhat.com> 1.0.8-1
5569280
- update to latest upstream bugfix release
5569280
99a3441
* Thu Jun 19 2014 Kamil Dudka <kdudka@redhat.com> 1.0.6-1
99a3441
- update to latest upstream bugfix release
99a3441
ea55310
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-3
ea55310
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ea55310
Petr Machata 5375e62
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.0.4-2
Petr Machata 5375e62
- Rebuild for boost 1.55.0
Petr Machata 5375e62
807fc31
* Mon Mar 17 2014 Kamil Dudka <kdudka@redhat.com> 1.0.4-1
807fc31
- update to latest upstream
807fc31
31e01c3
* Thu Feb 20 2014 Kamil Dudka <kdudka@redhat.com> 1.0.2-2
31e01c3
- abandon RHEL-5 compatibility per Fedora Review Request (#1066027)
31e01c3
31e01c3
* Wed Feb 19 2014 Kamil Dudka <kdudka@redhat.com> 1.0.2-1
31e01c3
- packaged for Fedora