-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bcunit.spec
113 lines (88 loc) · 3.5 KB
/
bcunit.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
%define oname BCUnit
%define name %(echo %oname | tr [:upper:] {:lower:])
%define major 1
%define libname %mklibname %{name}
%define devname %mklibname %{name} -d
# exclude unwanted cmake requires
%global __provides_exclude_from ^%{_datadir}/cmake/.*/Find.*cmake$
%bcond_without ncurses
%bcond_with static
%bcond_without strict
Name: bcunit
Version: 5.3.83
Release: 1
License: GPLv2+
Summary: A Unit Testing Framework for C, based on (abandoned) CUnit
Group: System/Libraries
URL: https://github.com/BelledonneCommunications/bcunit
Source0: https://gitlab.linphone.org/BC/public/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2
Patch0: bcunit-5.3.5-cmake-fix_cmake_path.patch
BuildRequires: cmake
BuildRequires: ninja
%if %{with ncurses}
BuildRequires: pkgconfig(ncurses)
%endif
%description
BCUnit is a lightweight system for writing, administering, and running unit
tests in C. It provides C programmers a basic testing functionality with a
flexible variety of user interfaces.
BCUnit is built as a static library which is linked with the user's testing
code. It uses a simple framework for building test structures, and provides a
rich set of assertions for testing common data types. In addition, several
different interfaces are provided for running tests and reporting results.
These interfaces currently include:
- Automated: Non-interactive output to xml file
- Basic: Non-interactive flexible programming interface
- Console: Interactive console interface (ansi C)
- Curses: Interactive graphical interface (Unix)
It is based on the abandoned CUnit.
#---------------------------------------------------------------------------
%package -n %{libname}
Summary: C testing framework
Group: System/Libraries
%description -n %{libname}
BCUnit is a lightweight system for writing, administering, and running unit
tests in C. It provides C programmers a basic testing functionality with a
flexible variety of user interfaces.
BCUnit is built as a static library which is linked with the user's testing
code. It uses a simple framework for building test structures, and provides a
rich set of assertions for testing common data types. In addition, several
different interfaces are provided for running tests and reporting results.
These interfaces currently include:
- Automated: Non-interactive output to xml file
- Basic: Non-interactive flexible programming interface
- Console: Interactive console interface (ansi C)
- Curses: Interactive graphical interface (Unix)
It is based on the abandoned CUnit.
%files -n %{libname}
%{_libdir}/*.so.%{major}*
#---------------------------------------------------------------------------
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
Provides: lib%{name}-devel = %{version}-%{release}
%description -n %{devname}
This package contains development files for %{name}.
%files -n %{devname}
%{_libdir}/*.so
%if %{with static}
%{_libdir}/*.a
%endif
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{oname}
%{_datadir}/%{oname}
%{_datadir}/cmake/%{oname}
#---------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{name}-%{?commit:%{commit}}%{!?commit:%{version}}
%build
%cmake \
-DENABLE_STATIC:BOOL=%{?with_static:ON}%{?!with_static:OFF} \
-DENABLE_STRICT:BOOL=%{?with_strict:ON}%{?!with_strict:OFF} \
-DENABLE_CURSES:BOOL=%{?with_ncurses:ON}%{?!with_ncurses:OFF} \
-G Ninja
%ninja_build #-C build
%install
%ninja_install -C build