Add hal-backend-device-common.h for common macro used in HAL
[platform/hal/backend/device-common.git] / packaging / hal-backend-device-common.spec
1 Name:       hal-backend-device-common
2 Summary:    HAL backend device common
3 Version:    1
4 Release:    1
5 Group:      System/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    %{name}.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(libusbgx)
11 BuildRequires:  pkgconfig(hal-api-device)
12 BuildRequires:  pkgconfig(libsyscommon)
13 BuildRequires:  pkgconfig(dlog)
14
15 %description
16 Library for HAL backend device modules
17
18 %package devel
19 Summary:        Library for HAL backend device modules (devel)
20 Requires:       %{name} = %{version}-%{release}
21
22 %description devel
23 Library for HAL backend device modules (devel)
24
25 %prep
26 %setup -q
27 cp %{SOURCE1} .
28
29 %build
30 %cmake . -DHAL_LIB_DIR=%{_hal_libdir} \
31          -DHAL_INCLUDE_DIR=%{_hal_includedir} \
32          -DHAL_LICENSE_DIR=%{_hal_licensedir} \
33          -DENABLE_DLOG=on
34
35 make %{?jobs:-j%jobs}
36
37 %install
38 %make_install
39
40 %files
41 %manifest %{name}.manifest
42 %{_hal_licensedir}/%{name}/LICENSE.Apache-2.0
43 %{_hal_libdir}/libhal-backend-device-common.so
44
45 %files devel
46 %manifest %{name}.manifest
47 %{_hal_licensedir}/%{name}/LICENSE.Apache-2.0
48 %{_hal_includedir}/device/hal-backend-common*.h
49 %{_libdir}/pkgconfig/*.pc