halapi: Check enum range for backend_abi_min_version
[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 Source2:    libhal-api.conf
14
15 Requires(post): /sbin/ldconfig
16 Requires(postun): /sbin/ldconfig
17 BuildRequires: cmake
18 BuildRequires: pkgconfig(dlog)
19 BuildRequires: pkgconfig(gio-2.0)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(gmock)
22
23 %description
24 %{name} interface
25
26 ### devel package #########
27 %package -n     %{devel_name}
28 Summary:        %{name} interface
29 Group:          Development/Libraries
30 Requires:       %{name} = %{version}-%{release}
31
32 %description -n %{devel_name}
33 %{name} Interface for product vendor developer
34
35 ### build and install #########
36 %prep
37 %setup -q
38
39 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir}
40
41 %build
42 cp %{SOURCE1} .
43 make %{?jobs:-j%jobs}
44
45 %check
46 (cd haltests && LD_LIBRARY_PATH=../ ctest -V)
47
48 %install
49 rm -rf %{buildroot}
50 %make_install
51
52 mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
53 mkdir -p %{buildroot}/hal
54 install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ld.so.conf.d/
55
56 %clean
57 rm -rf %{buildroot}
58
59 %post
60 /sbin/ldconfig
61
62 %postun
63 /sbin/ldconfig
64
65 ### contain files to package #########
66 %files  -n %{name}
67 %license LICENSE
68 %manifest %{name}.manifest
69 %defattr(-,root,root,-)
70 %{_libdir}/hal/*.so*
71 %{_sysconfdir}/ld.so.conf.d/libhal-api.conf
72 /hal/
73
74 %files  -n %{devel_name}
75 %defattr(-,root,root,-)
76 %{_includedir}/hal/*.h
77 %{_libdir}/pkgconfig/*.pc