b3662f4bfb6ce11eba47e8762e762f85c4a33b2a
[platform/core/telephony/telephony-daemon.git] / packaging / telephony-daemon.spec
1 %define major 1
2 %define minor 3
3 %define patchlevel 41
4
5 Name:           telephony-daemon
6 Version:        %{major}.%{minor}.%{patchlevel}
7 Release:        1
8 License:        Apache-2.0
9 Summary:        Telephony Daemon
10 Group:          System/Telephony
11 Source0:        %{name}-%{version}.tar.gz
12 Requires:       security-config
13 BuildRequires:  cmake
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(glib-2.0)
16 BuildRequires:  pkgconfig(tcore)
17 BuildRequires:  pkgconfig(vconf)
18
19 %description
20 Description: Telephony Daemon
21
22 %prep
23 %setup -q
24
25 %build
26 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
27         -DLIB_INSTALL_DIR=%{_libdir} \
28         -DUNIT_INSTALL_DIR=%{_unitdir} \
29         -DVERSION=%{version} \
30         -DTIZEN_DEBUG_ENABLE=1 \
31 %if "%{profile}" == "tv"
32         -DTIZEN_PROFILE_TV=1 \
33 %endif
34 %if "%{profile}" == "ivi"
35         -DTIZEN_PROFILE_IVI=1 \
36 %endif
37
38 make %{?_smp_mflags}
39
40 %install
41
42 %make_install
43 %if "%{profile}" != "tv" && "%{profile}" != "ivi"
44 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
45 ln -s %{_unitdir}/telephony-daemon.service %{buildroot}%{_unitdir}/multi-user.target.wants/telephony-daemon.service
46 %endif
47
48 %post -p /sbin/ldconfig
49
50 %files
51 %manifest telephony-daemon.manifest
52 %defattr(644,root,root,-)
53 %caps(cap_dac_override,cap_net_admin=eip) %attr(755,root,root) %{_bindir}/telephony-daemon
54 %{_unitdir}/telephony-daemon.service
55 %if "%{profile}" != "tv" && "%{profile}" != "ivi"
56 %{_unitdir}/multi-user.target.wants/telephony-daemon.service
57 %endif
58 %{_datadir}/license/telephony-daemon