| 1 |
# Mini-HOWTO: |
| 2 |
# |
| 3 |
# 1. Update gitcommit, gitncommits and gitversion in this file with |
| 4 |
# data from "git describe --tags". (See below). |
| 5 |
# |
| 6 |
# 2. Fetch the latest source archive from github: |
| 7 |
# |
| 8 |
# curl -Lo ~/rpmbuild/SOURCES/cgreen-master.zip https://github.com/cgreen-devs/cgreen/archive/master.zip |
| 9 |
# |
| 10 |
# 3. Build the source and binary RPMs: |
| 11 |
# |
| 12 |
# mock $(rpmbuild -bs cgreen.spec | cut -d" " -f2) |
| 13 |
# |
| 14 |
# You could also provide your own source archive if that's what you're |
| 15 |
# looking for. Make sure to adjust Source0: and the %prep phase |
| 16 |
# accordingly. |
| 17 |
|
| 18 |
|
| 19 |
# $ git describe --tags |
| 20 |
# 1.0.0-387-g8130aa7 |
| 21 |
# | | +--v |
| 22 |
%define gitcommit g8130aa7 |
| 23 |
# | +----------v |
| 24 |
%define gitncommits 387 |
| 25 |
# +--------------v |
| 26 |
%define gitversion 1.0.0 |
| 27 |
|
| 28 |
Summary: Cgreen is a modern unit test and mocking framework for C and C++. |
| 29 |
Name: cgreen |
| 30 |
Version: %{gitversion} |
| 31 |
Release: %{gitncommits}.%{gitcommit} |
| 32 |
License: ISC |
| 33 |
URL: https://github.com/cgreen-devs/cgreen |
| 34 |
Source0: %{name}-master.zip |
| 35 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
| 36 |
BuildRequires: cmake |
| 37 |
|
| 38 |
%description |
| 39 |
A modern, portable, cross-language unit testing and mocking framework for C and C++ |
| 40 |
|
| 41 |
%prep |
| 42 |
%setup -q -n cgreen-master |
| 43 |
|
| 44 |
%build |
| 45 |
%cmake . |
| 46 |
|
| 47 |
%install |
| 48 |
rm -rf $RPM_BUILD_ROOT |
| 49 |
|
| 50 |
# Don't put things into /usr/lib/cmake on 64-bit systems |
| 51 |
%if "%{?_lib}" == "lib64" |
| 52 |
sed -i -e "s@/lib/cmake/cgreen@/lib64/cmake/cgreen@g" cmake_install.cmake |
| 53 |
%endif |
| 54 |
|
| 55 |
%make_install |
| 56 |
|
| 57 |
|
| 58 |
%clean |
| 59 |
rm -rf $RPM_BUILD_ROOT |
| 60 |
|
| 61 |
%files |
| 62 |
%defattr(-,root,root,-) |
| 63 |
%{_bindir}/cgreen-runner |
| 64 |
%dir %{_includedir}/cgreen |
| 65 |
%{_includedir}/cgreen/assertions.h |
| 66 |
%{_includedir}/cgreen/boxed_double.h |
| 67 |
%{_includedir}/cgreen/breadcrumb.h |
| 68 |
%{_includedir}/cgreen/cdash_reporter.h |
| 69 |
%{_includedir}/cgreen/cgreen.h |
| 70 |
%{_includedir}/cgreen/cgreen_value.h |
| 71 |
%{_includedir}/cgreen/constraint.h |
| 72 |
%{_includedir}/cgreen/constraint_syntax_helpers.h |
| 73 |
%{_includedir}/cgreen/cpp_assertions.h |
| 74 |
%{_includedir}/cgreen/cpp_constraint.h |
| 75 |
%{_includedir}/cgreen/cute_reporter.h |
| 76 |
%{_includedir}/cgreen/internal/assertions_internal.h |
| 77 |
%{_includedir}/cgreen/internal/c_assertions.h |
| 78 |
%{_includedir}/cgreen/internal/cgreen_pipe.h |
| 79 |
%{_includedir}/cgreen/internal/cgreen_time.h |
| 80 |
%{_includedir}/cgreen/internal/cpp_assertions.h |
| 81 |
%{_includedir}/cgreen/internal/function_macro.h |
| 82 |
%{_includedir}/cgreen/internal/mock_table.h |
| 83 |
%{_includedir}/cgreen/internal/mocks_internal.h |
| 84 |
%{_includedir}/cgreen/internal/runner_platform.h |
| 85 |
%{_includedir}/cgreen/internal/stringify_token.h |
| 86 |
%{_includedir}/cgreen/internal/suite_internal.h |
| 87 |
%{_includedir}/cgreen/internal/unit_implementation.h |
| 88 |
%{_includedir}/cgreen/legacy.h |
| 89 |
%{_includedir}/cgreen/mocks.h |
| 90 |
%{_includedir}/cgreen/reporter.h |
| 91 |
%{_includedir}/cgreen/runner.h |
| 92 |
%{_includedir}/cgreen/string_comparison.h |
| 93 |
%{_includedir}/cgreen/suite.h |
| 94 |
%{_includedir}/cgreen/text_reporter.h |
| 95 |
%{_includedir}/cgreen/unit.h |
| 96 |
%{_includedir}/cgreen/vector.h |
| 97 |
|
| 98 |
%dir %{_libdir}/cmake/cgreen |
| 99 |
%{_libdir}/cmake/cgreen/cgreen-config-version.cmake |
| 100 |
%{_libdir}/cmake/cgreen/cgreen-config.cmake |
| 101 |
|
| 102 |
%{_libdir}/libcgreen.so |
| 103 |
%{_libdir}/libcgreen.so.1 |
| 104 |
%{_libdir}/libcgreen.so.1.1.0 |
| 105 |
%{_mandir}/man1/cgreen-runner.1.gz |
| 106 |
%{_mandir}/man5/cgreen.5.gz |
| 107 |
|
| 108 |
|
| 109 |
%changelog |
| 110 |
* Tue Feb 6 2018 Karl Mikaelsson <[email protected]> - 1.0.0-387.g8130aa7 |
| 111 |
- Initial build of git master. |
| 112 |
|