Add hal-api-common uniitest skeleton
[platform/hal/api/common.git] / packaging / hal-api-common.spec
1 %define name            hal-api-common
2 %define devel_name      hal-api-common-devel
3
4 ### main package #########
5 Name:       %{name}
6 Summary:    %{name} interface
7 Version:    0.0.1
8 Release:    1
9 Group:      Development/Libraries
10 License:    Apache-2.0
11 Source0:    %{name}-%{version}.tar.gz
12 Source1:    %{name}.manifest
13
14 Requires(post): /sbin/ldconfig
15 Requires(postun): /sbin/ldconfig
16 BuildRequires: cmake
17 BuildRequires: pkgconfig(dlog)
18 BuildRequires: pkgconfig(gio-2.0)
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: pkgconfig(gmock)
21
22 %description
23 %{name} interface
24
25 ### devel package #########
26 %package -n     %{devel_name}
27 Summary:        %{name} interface
28 Group:          Development/Libraries
29 Requires:       %{name} = %{version}-%{release}
30
31 %description -n %{devel_name}
32 %{name} Interface for product vendor developer
33
34 ### build and install #########
35 %prep
36 %setup -q
37
38 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir}/
39
40 %build
41 cp %{SOURCE1} .
42 make %{?jobs:-j%jobs}
43
44 %check
45 (cd haltests && LD_LIBRARY_PATH=../ ctest -V)
46
47 %install
48 rm -rf %{buildroot}
49 %make_install
50
51 %clean
52 rm -rf %{buildroot}
53
54 %post
55 /sbin/ldconfig
56
57 %postun
58 /sbin/ldconfig
59
60 ### contain files to package #########
61 %files  -n %{name}
62 %license LICENSE
63 %manifest %{name}.manifest
64 %defattr(-,root,root,-)
65 %{_libdir}/hal/*.so*
66
67 %files  -n %{devel_name}
68 %defattr(-,root,root,-)
69 %{_includedir}/hal/*.h
70 %{_libdir}/pkgconfig/*.pc