summaryrefslogtreecommitdiff
path: root/packaging/cmocka.spec
blob: ad66906ee7c56bc1e3dc1593b47256cece9a687a (plain)
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
Name:            cmocka
Summary:         Library for testing and mocking C code
Version:         1.1.1
Release:         0
License:         Apache-2.0
Group:           Development/Testing

Source0:         %{name}-%{version}.tar.gz
Source1001:      %{name}.manifest
BuildRequires:   cmake

%description
Framework for writing and using C mock functions on a variety of
platforms

%package devel
Summary:         Development package for cmocka
Group:           Development/Libraries
Requires:        %{name} = %{version}
BuildRequires:   pkg-config

%description devel
Standard header files for use when developing cmocka based apps

%prep
%setup -q
cp %{SOURCE1001} .
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_INSTALL_DIR=%{_libdir} ../

%build
cd build
make %{?jobs:-j%jobs}

%install
cd build
%make_install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%license COPYING
%defattr(-,root,root)
%{_libdir}/libcmocka.so.*

%files devel
%manifest %{name}.manifest
%defattr(-,root,root)
%{_includedir}/cmocka.h
%{_includedir}/cmocka_pbc.h
%{_libdir}/libcmocka.so
%{_libdir}/pkgconfig/cmocka.pc
%{_libdir}/cmake/cmocka/cmocka-config-version.cmake
%{_libdir}/cmake/cmocka/cmocka-config.cmake