Blob Blame History Raw
Name:       csmock
Version:    1.8.1
Release:    1%{?dist}
Summary:    A mock wrapper for Static Analysis tools

Group:      Development/Tools
License:    GPLv3+
URL:        https://git.fedorahosted.org/cgit/csmock.git
Source0:    https://git.fedorahosted.org/cgit/csmock.git/snapshot/csmock-%{version}.tar.xz

BuildRequires: GitPython
BuildRequires: cmake
BuildRequires: help2man
BuildRequires: python-devel
%if !(0%{?fedora} >= 19 || 0%{?rhel} >= 7)
BuildRequires: python-argparse
%endif

Requires: csmock-common
Requires: csmock-plugin-clang
Requires: csmock-plugin-cppcheck
Requires: csmock-plugin-pylint
Requires: csmock-plugin-shellcheck

BuildArch: noarch

%description
This is a metapackage pulling in csmock-common and basic csmock plug-ins.

%package -n csbuild
Summary: Tool for plugging static analyzers into the build process
Requires: GitPython
Requires: cscppc
Requires: csclng
Requires: csdiff >= 1.2.1
Requires: cswrap
Requires: csmock-common >= 1.8.0

%description -n csbuild
Tool for plugging static analyzers into the build process, free of mock.

%package -n csmock-common
Summary: Core of csmock (a mock wrapper for Static Analysis tools)
Requires: csdiff
Requires: cswrap
Requires: mock

%description -n csmock-common
This package contains the csmock tool that allows to scan SRPMs by Static
Analysis tools in a fully automated way.

%package -n csmock-plugin-clang
Summary: csmock plug-in providing the support for Clang
Requires: csclng
Requires: csmock-common >= 1.7.1

%description -n csmock-plugin-clang
This package contains the clang plug-in for csmock.

%package -n csmock-plugin-cppcheck
Summary: csmock plug-in providing the support for Cppcheck
Requires: cscppc >= 1.0.4
Requires: csmock-common

%description -n csmock-plugin-cppcheck
This package contains the cppcheck plug-in for csmock.

%package -n csmock-plugin-pylint
Summary: csmock plug-in providing the support for Pylint.
Requires: csmock-common >= 1.8.0

%description -n csmock-plugin-pylint
This package contains the pylint plug-in for csmock.

%package -n csmock-plugin-shellcheck
Summary: csmock plug-in providing the support for ShellCheck.
Requires: csmock-common >= 1.8.0

%description -n csmock-plugin-shellcheck
This package contains the shellcheck plug-in for csmock.

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

%prep
%setup -q

%build
mkdir csmock_build
cd csmock_build
%cmake '-DVERSION=%{name}-%{version}-%{release}' ..
make %{?_smp_mflags} VERBOSE=yes

%install
cd csmock_build
make install DESTDIR="$RPM_BUILD_ROOT"

# needed to create the csmock RPM
%files

%files -n csbuild
%{_bindir}/csbuild
%{_mandir}/man1/csbuild.1*
%{_datadir}/csbuild/scripts/run-scan.sh
%doc COPYING

%files -n csmock-common
%{_bindir}/csmock
%{_mandir}/man1/csmock.1*
%{_datadir}/csmock/cwe-map.csv
%{_datadir}/csmock/scripts/patch-rawbuild.sh
%{python2_sitelib}/csmock/__init__.py*
%{python2_sitelib}/csmock/common/__init__.py*
%{python2_sitelib}/csmock/common/cflags.py*
%{python2_sitelib}/csmock/common/util.py*
%{python2_sitelib}/csmock/plugins/gcc.py*
%doc COPYING README

%files -n csmock-plugin-clang
%{python2_sitelib}/csmock/plugins/clang.py*

%files -n csmock-plugin-cppcheck
%{python2_sitelib}/csmock/plugins/cppcheck.py*

%files -n csmock-plugin-pylint
%{_datadir}/csmock/scripts/run-pylint.sh
%{python2_sitelib}/csmock/plugins/pylint.py*

%files -n csmock-plugin-shellcheck
%{_datadir}/csmock/scripts/run-shellcheck.sh
%{python2_sitelib}/csmock/plugins/shellcheck.py*

%changelog
* Tue May 26 2015 Kamil Dudka <kdudka@redhat.com> 1.8.1-1
- update to latest upstream

* Wed Apr 01 2015 Kamil Dudka <kdudka@redhat.com> 1.8.0-1
- update to latest upstream

* Tue Mar 03 2015 Kamil Dudka <kdudka@redhat.com> 1.7.2-1
- update to latest upstream

* Mon Jan 19 2015 Kamil Dudka <kdudka@redhat.com> 1.6.1-1
- update to latest upstream

* Wed Dec 17 2014 Kamil Dudka <kdudka@redhat.com> 1.6.0-1
- update to latest upstream (introduces the csbuild subpackage)

* Thu Dec 11 2014 Michael Scherer <misc@zarb.org> 1.5.1-2
- fix the description of the csmock-plugin-shellcheck subpackage (#1173134)

* Thu Nov 06 2014 Kamil Dudka <kdudka@redhat.com> 1.5.1-1
- update to latest upstream

* Fri Sep 19 2014 Kamil Dudka <kdudka@redhat.com> 1.5.0-1
- update to latest upstream

* Fri Sep 05 2014 Kamil Dudka <kdudka@redhat.com> 1.4.1-1
- update to latest upstream

* Wed Sep 03 2014 Kamil Dudka <kdudka@redhat.com> 1.4.0-1
- update to latest upstream

* Wed Aug 20 2014 Kamil Dudka <kdudka@redhat.com> 1.3.2-1
- update to latest upstream

* Fri Aug 01 2014 Kamil Dudka <kdudka@redhat.com> 1.3.1-1
- update to latest upstream
- install plug-ins to %%{python2_sitelib} instead of %%{python_sitearch}

* Thu Jul 17 2014 Kamil Dudka <kdudka@redhat.com> 1.2.3-1
- update to latest upstream

* Fri Jul 04 2014 Kamil Dudka <kdudka@redhat.com> 1.2.2-1
- update to latest upstream

* Thu Jun 19 2014 Kamil Dudka <kdudka@redhat.com> 1.1.1-1
- update to latest upstream

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Apr 16 2014 Kamil Dudka <kdudka@redhat.com> 1.0.7-1
- update to latest upstream

* Tue Feb 25 2014 Kamil Dudka <kdudka@redhat.com> 1.0.3-2
- further spec file improvements per Fedora Review Request (#1066029)

* Mon Feb 24 2014 Kamil Dudka <kdudka@redhat.com> 1.0.3-1
- update to new upstream release
- abandon RHEL-5 compatibility per Fedora Review Request (#1066029)

* Wed Feb 19 2014 Kamil Dudka <kdudka@redhat.com> 1.0.2-1
- packaged for Fedora