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