diff --git a/csmock.spec b/csmock.spec index 718e6ea..8973f49 100644 --- a/csmock.spec +++ b/csmock.spec @@ -1,14 +1,15 @@ Name: csmock -Version: 1.0.7 +Version: 1.0.10 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 +Source0: https://git.fedorahosted.org/cgit/csmock.git/snapshot/%{name}-%{version}.tar.xz BuildRequires: help2man +BuildRequires: python Requires: cscppc Requires: csdiff @@ -18,11 +19,34 @@ Requires: rpm-build BuildArch: noarch - %description This package contains cov-mockbuild and cov-diffbuild tools that allow to scan SRPMs by Static Analysis tools in a fully automated way. +%package -n csmock-ng +Summary: Preview of a new major version of the csmock package +Requires: csmock + +%description -n csmock-ng +Hihgly experimental, currently suitable only for development of csmock itself. + +%package -n csmock-plugin-clang +Summary: csmock plug-in providing the support for Clang +Requires: csmock-ng + +%description -n csmock-plugin-clang +Hihgly experimental, currently suitable only for development of csmock itself. + +%package -n csmock-plugin-cppcheck +Summary: csmock plug-in providing the support for Cppcheck +Requires: cscppc +Requires: csmock-ng + +%description -n csmock-plugin-cppcheck +Hihgly experimental, currently suitable only for development of csmock itself. + +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + %prep %setup -q @@ -32,9 +56,12 @@ sed -i 's/mock-unbuffered/mock/' cov-mockbuild %build mkdir -p bin man -# ebmed RPM version into the scripts and remove uses of mock-unbuffered +# ebmed VERSION and PLUGIN_DIR version into the scripts install -p -m0755 cov-{diff,mock}build bin/ sed -e 's/rpm -qf .SELF/echo %{version}/' -i bin/cov-{diff,mock}build +sed -e 's/@VERSION@/%{name}-%{version}-%{release}/' \ + -e 's|@PLUGIN_DIR@|%{python_sitearch}/csmock/plugins|' \ + -i py/csmock help2man --no-info --section 1 --name \ "run static analysis of the given SRPM using mock" \ @@ -44,23 +71,37 @@ help2man --no-info --section 1 --name \ "run static analysis of the given the patches in the given SRPM using cov-mockbuild" \ bin/cov-diffbuild > man/cov-diffbuild.1 +help2man --no-info --section 1 --name \ + "run static analysis of the given SRPM using mock" \ + py/csmock > man/csmock.1 + %install install -m0755 -d \ "$RPM_BUILD_ROOT%{_bindir}" \ "$RPM_BUILD_ROOT%{_mandir}/man1" \ "$RPM_BUILD_ROOT%{_datadir}/csmock" \ - "$RPM_BUILD_ROOT%{_datadir}/csmock/bashrc" + "$RPM_BUILD_ROOT%{_datadir}/csmock/bashrc" \ + "$RPM_BUILD_ROOT%{_datadir}/csmock/scripts" \ + "$RPM_BUILD_ROOT%{python_sitearch}/" \ + "$RPM_BUILD_ROOT%{python_sitearch}/csmock" \ + "$RPM_BUILD_ROOT%{python_sitearch}/csmock/plugins" install -p -m0755 \ - cov-{diff,mock}build cov-dump-err rpmbuild-rawbuild \ + cov-{diff,mock}build cov-dump-err rpmbuild-rawbuild py/csmock \ "$RPM_BUILD_ROOT%{_bindir}" -install -p -m0644 man/cov-{diff,mock}build.1 "$RPM_BUILD_ROOT%{_mandir}/man1/" +install -p -m0644 man/{csmock,cov-{diff,mock}build}.1 "$RPM_BUILD_ROOT%{_mandir}/man1/" install -p -m0644 build.bashrc "$RPM_BUILD_ROOT%{_datadir}/csmock/bashrc/build" install -p -m0644 prep.bashrc "$RPM_BUILD_ROOT%{_datadir}/csmock/bashrc/prep" install -p -m0644 cov_checker_map.txt "$RPM_BUILD_ROOT%{_datadir}/csmock/cwe-map.csv" +install -p -m0644 py/plugins/*.py \ + "$RPM_BUILD_ROOT%{python_sitearch}/csmock/plugins" + +install -p -m0755 scripts/*.sh \ + "$RPM_BUILD_ROOT%{_datadir}/csmock/scripts" + %files %{_bindir}/cov-dump-err %{_bindir}/cov-diffbuild @@ -71,7 +112,23 @@ install -p -m0644 cov_checker_map.txt "$RPM_BUILD_ROOT%{_datadir}/csmock/cwe-map %{_datadir}/csmock %doc COPYING +%files -n csmock-ng +%{_bindir}/csmock +%{_datadir}/csmock/scripts/patch-rawbuild.sh +%{_mandir}/man1/csmock.1* +%{python_sitearch}/csmock/plugins/gcc.py* + +%files -n csmock-plugin-clang +%{_datadir}/csmock/scripts/fixups-clang.sh +%{python_sitearch}/csmock/plugins/clang.py* + +%files -n csmock-plugin-cppcheck +%{python_sitearch}/csmock/plugins/cppcheck.py* + %changelog +* Thu Jun 19 2014 Kamil Dudka 1.0.10-1 +- update to latest upstream bugfix release + * Wed Apr 16 2014 Kamil Dudka 1.0.7-1 - update to latest upstream diff --git a/sources b/sources index f69e9c9..0982895 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -887fb4abeadf8b5ec2cdcff00ad37a20 csmock-1.0.7.tar.xz +63a89a0ae2ab27a14b38fde69ffb9585 csmock-1.0.10.tar.xz