821ec93
# python2 is not available on RHEL > 7 and Fedora
821ec93
%if 0%{?rhel} > 7 || 0%{?fedora}
3c4259c
%bcond_with python2
3c4259c
%else
3c4259c
%bcond_without python2
3c4259c
%endif
3c4259c
821ec93
# python3 support is optional
821ec93
%bcond_without python3
821ec93
31e01c3
Name:       csdiff
fee50f2
Version:    2.2.0
fee50f2
Release:    1%{?dist}
31e01c3
Summary:    Non-interactive tools for processing code scan results in plain-text
31e01c3
31e01c3
License:    GPLv3+
fee50f2
URL:        https://github.com/csutils/csdiff
fee50f2
Source0:    https://github.com/csutils/csdiff/releases/download/%{name}-%{version}/%{name}-%{version}.tar.xz
31e01c3
6937c27
# the following upstream commit is needed to work with up2date csdiff/csgrep
6937c27
# https://github.com/kdudka/csmock/commit/48b09b3a
6937c27
Conflicts:  csmock-plugin-shellcheck <= 2.5
6937c27
31e01c3
BuildRequires: boost-devel
31e01c3
BuildRequires: cmake
b9a89b9
BuildRequires: gcc-c++
31e01c3
BuildRequires: help2man
e965356
BuildRequires: make
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
3c4259c
%if %{with python2}
661a478
%package -n python2-%{name}
661a478
Summary:        Python interface to csdiff for Python 2
821ec93
%if 0%{?fedora}
3c4259c
BuildRequires:  boost-python2-devel
3c4259c
%endif
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.
3c4259c
%endif
4cbb8f7
3c4259c
%if %{with python3}
661a478
%package -n python3-%{name}
661a478
Summary:        Python interface to csdiff for Python 3
821ec93
821ec93
# this packages redefines %%{python3_pkgversion} to 36 because there is
821ec93
# no boost-python3-devel in epel-7 buildroot, only boost-python36-devel
821ec93
%if 0%{?rhel} == 7
821ec93
BuildRequires:  epel-rpm-macros
821ec93
%endif
821ec93
BuildRequires:  boost-python%{python3_pkgversion}-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
821ec93
mkdir -p %{_target_platform}
821ec93
cd %{_target_platform}
821ec93
%cmake .. -B. -DBUILD_PYCSDIFF=OFF
821ec93
%make_build
3c4259c
3c4259c
%if %{with python2}
821ec93
mkdir -p ../%{_target_platform}-py2
821ec93
cd ../%{_target_platform}-py2
821ec93
%cmake .. -B. -DPYTHON_EXECUTABLE=%{__python2}
821ec93
%make_build pycsdiff
3c4259c
%endif
31e01c3
3c4259c
%if %{with python3}
821ec93
mkdir -p ../%{_target_platform}-py3
821ec93
cd ../%{_target_platform}-py3
821ec93
%cmake .. -B. \
12cdedf
    -DPYTHON_EXECUTABLE=%{__python3} \
12cdedf
    -DBOOST_PYTHON_LIB_NAME=boost_python%{python3_version_nodots}
821ec93
%make_build pycsdiff
661a478
%endif
661a478
31e01c3
%install
3c4259c
%if %{with python2}
821ec93
make install-pycsdiff -C %{_target_platform}-py2 DESTDIR=%{buildroot}
3c4259c
%endif
3c4259c
3c4259c
%if %{with python3}
821ec93
make install-pycsdiff -C %{_target_platform}-py3 DESTDIR=%{buildroot}
661a478
%endif
3c4259c
821ec93
%make_install -C %{_target_platform}
31e01c3
31e01c3
%check
821ec93
cd %{_target_platform}
821ec93
ctest %{?_smp_mflags} --output-on-failure
31e01c3
31e01c3
%files
31e01c3
%{_bindir}/csdiff
31e01c3
%{_bindir}/csgrep
31e01c3
%{_bindir}/cshtml
31e01c3
%{_bindir}/cslinker
31e01c3
%{_bindir}/cssort
beb1892
%{_bindir}/cstrans-df-run
821ec93
%{_datadir}/%{name}
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*
beb1892
%{_mandir}/man1/cstrans-df-run.1*
31e01c3
%doc COPYING README
31e01c3
3c4259c
%if %{with python2}
661a478
%files -n python2-%{name}
661a478
%{python2_sitearch}/pycsdiff.so
661a478
%doc COPYING
3c4259c
%endif
661a478
3c4259c
%if %{with python3}
661a478
%files -n python3-%{name}
661a478
%{python3_sitearch}/pycsdiff.so
661a478
%doc COPYING
661a478
%endif
661a478
31e01c3
%changelog
fee50f2
* Tue Aug 31 2021 Kamil Dudka <kdudka@redhat.com> 2.2.0-1
fee50f2
- update to latest upstream release
fee50f2
ee08dba
* Fri Aug 06 2021 Jonathan Wakely <jwakely@redhat.com> - 2.1.1-4
ee08dba
- Rebuilt for Boost 1.76
ee08dba
67b8f4f
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-3
67b8f4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
67b8f4f
f5777fa
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.1.1-2
f5777fa
- Rebuilt for Python 3.10
f5777fa
1ac7ec7
* Fri May 21 2021 Kamil Dudka <kdudka@redhat.com> 2.1.1-1
1ac7ec7
- update to latest upstream release
1ac7ec7
e965356
* Wed Feb 17 2021 Kamil Dudka <kdudka@redhat.com> 2.1.0-1
e965356
- update to latest upstream release
e965356
e9940c2
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
e9940c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e9940c2
209e2f0
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 2.0.0-2
209e2f0
- Rebuilt for Boost 1.75
209e2f0
821ec93
* Fri Jan 08 2021 Kamil Dudka <kdudka@redhat.com> 2.0.0-1
821ec93
- update to latest upstream release
821ec93
6937c27
* Tue Oct 20 2020 Kamil Dudka <kdudka@redhat.com> 1.9.0-1
6937c27
- update to latest upstream release
6937c27
5d24cc3
* Wed Aug 19 2020 Kamil Dudka <kdudka@redhat.com> 1.8.0-1
5d24cc3
- update to latest upstream release
5d24cc3
bbfa41b
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-4
bbfa41b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bbfa41b
282b52e
* Fri May 29 2020 Jonathan Wakely <jwakely@redhat.com> - 1.7.2-3
282b52e
- Rebuilt for Boost 1.73
282b52e
3cccca3
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.2-2
3cccca3
- Rebuilt for Python 3.9
3cccca3
c615be5
* Thu Apr 30 2020 Kamil Dudka <kdudka@redhat.com> 1.7.2-1
c615be5
- update to latest upstream release
c615be5
af514e6
* Tue Mar 31 2020 Kamil Dudka <kdudka@redhat.com> 1.7.1-1
af514e6
- update to latest upstream release
af514e6
beb1892
* Wed Feb 05 2020 Kamil Dudka <kdudka@redhat.com> 1.7.0-1
beb1892
- update to latest upstream release
beb1892
36be5f1
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-5
36be5f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
36be5f1
1fb7158
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.1-4
1fb7158
- Rebuilt for Python 3.8
1fb7158
eb6806b
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.1-3
eb6806b
- Rebuilt for Python 3.8
eb6806b
7059478
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
7059478
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7059478
12cdedf
* Thu May 02 2019 Kamil Dudka <kdudka@redhat.com> 1.6.1-1
12cdedf
- make pycsdiff build with Python 3.8 (#1705427)
12cdedf
- update to latest upstream release
12cdedf
741a902
* Mon Feb 04 2019 Kamil Dudka <kdudka@redhat.com> 1.6.0-1
741a902
- update to latest upstream release
741a902
94c592e
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
94c592e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
94c592e
783fb56
* Wed Jan 30 2019 Jonathan Wakely <jwakely@redhat.com> - 1.5.0-2
783fb56
- Rebuilt and patched for Boost 1.69
783fb56
1c988d4
* Thu Oct 18 2018 Kamil Dudka <kdudka@redhat.com> 1.5.0-1
1c988d4
- update to latest upstream release
1c988d4
7edef26
* Mon Oct 01 2018 Kamil Dudka <kdudka@redhat.com> 1.4.0-5
7edef26
- rebuild without the python2-csdiff subpackage (#1634690)
7edef26
d3b4490
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
d3b4490
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d3b4490
8b1f458
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-3
8b1f458
- Rebuilt for Python 3.7
8b1f458
73cbe58
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-2
73cbe58
- Rebuilt for Python 3.7
73cbe58
3c4259c
* Thu May 03 2018 Kamil Dudka <kdudka@redhat.com> 1.4.0-1
3c4259c
- update to latest upstream release
3c4259c
- make both python2 and python3 optional
3c4259c
b9a89b9
* Mon Feb 19 2018 Kamil Dudka <kdudka@redhat.com> 1.3.3-4
b9a89b9
- add explicit BR for the gcc-c++ compiler
b9a89b9
e37f0db
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
e37f0db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e37f0db
f703ba1
* Wed Jan 31 2018 Kamil Dudka <kdudka@redhat.com> 1.3.3-2
f703ba1
- rebuild for Boost 1.66
f703ba1
9ceeb1d
* Mon Jan 15 2018 Kamil Dudka <kdudka@redhat.com> 1.3.3-1
9ceeb1d
- update to latest upstream release
9ceeb1d
397fb6a
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-4
397fb6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
397fb6a
b594d4a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-3
b594d4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b594d4a
d1ed6b0
* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3.2-2
d1ed6b0
- Rebuilt for Boost 1.64
d1ed6b0
5a82519
* Wed Feb 15 2017 Kamil Dudka <kdudka@redhat.com> 1.3.2-1
5a82519
- update to latest upstream release
5a82519
- update project URL and source URL
5a82519
a79a3d1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-5
a79a3d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a79a3d1
0317c78
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3.1-4
0317c78
- Rebuilt for Boost 1.63
0317c78
6c1765b
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3.1-3
6c1765b
- Rebuilt for Boost 1.63
6c1765b
b3a1cb8
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.3.1-2
b3a1cb8
- Rebuild for Python 3.6
b3a1cb8
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