Package version up to 0.1.0
[platform/hal/api/tdm.git] / packaging / hal-api-tdm.spec
1 %define module_name     tdm
2 %define name            hal-api-tdm
3 %define devel_name      hal-api-tdm-devel
4
5 ### main package #########
6 Name:       %{name}
7 Summary:    %{name} interface
8 Version:    0.1.0
9 Release:    1
10 Group:      Development/Libraries
11 License:    MIT
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(gmock)
21 BuildRequires: pkgconfig(hal-api-common)
22 BuildRequires: pkgconfig(libtbm)
23
24 %description
25 %{name} interface
26
27 ### devel package #########
28 %package -n     %{devel_name}
29 Summary:        %{name} interface
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description -n %{devel_name}
34 %{name} Interface for product vendor developer
35
36 ### build and install #########
37 %prep
38 %setup -q
39
40 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir}/ -DDEFAULT_LOG_DLOG=1
41
42 %build
43 cp %{SOURCE1} .
44 cp %{SOURCE2} .
45 make %{?jobs:-j%jobs}
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 %manifest %{name}.manifest
63 %license COPYING
64 %defattr(-,root,root,-)
65 %{_libdir}/hal/*.so*
66
67 %files  -n %{devel_name}
68 %defattr(-,root,root,-)
69 %manifest %{devel_name}.manifest
70 %{_includedir}/hal/*.h
71 %{_libdir}/pkgconfig/%{name}.pc