efa0df8ba1b11a7f3d0f17e36f85720ff93c1a24
[framework/telephony/libslp-tapi.git] / packaging / libslp-tapi.spec
1 %define major 0
2 %define minor 6
3 %define patchlevel 70
4
5 Name:           libslp-tapi
6 Version:        %{major}.%{minor}.%{patchlevel}
7 Release:        2
8 License:        Apache
9 Summary:        Telephony dbus client library
10 Group:          System/Libraries
11 Source0:        libslp-tapi-%{version}.tar.gz
12 BuildRequires:  cmake
13 BuildRequires:  pkgconfig(dlog)
14 BuildRequires:  pkgconfig(glib-2.0)
15 %if %{_repository}=="mobile"
16 BuildRequires:  pkgconfig(gobject-2.0)
17 %endif
18 BuildRequires:  pkgconfig(security-server)
19 Requires(post): /sbin/ldconfig
20 Requires(postun): /sbin/ldconfig
21
22 %description
23 Telephony client API library
24
25 %package devel
26 Summary:        Telephony client API (devel)
27 Group:          Development/Libraries
28 Requires:       %{name} = %{version}
29
30 %description devel
31 Telephony client API library (devel)
32
33 %prep
34 %setup -q
35
36 %build
37 %if %{_repository}=="mobile"
38 cd mobile
39 %cmake .
40 make %{?jobs:-j%jobs}
41 %elseif %{_repository}=="wearable"
42 export LDFLAGS+=" -Wl,-z,nodelete "
43
44 %if 0%{?tizen_build_binary_release_type_eng}
45 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
46 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
47 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
48 %endif
49 %if 0%{?sec_build_binary_debug_enable}
50 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
51 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
52 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
53 %endif
54 cd wearable
55 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
56 %if 0%{?tizen_build_binary_release_type_eng}
57         -DTIZEN_ENGINEER_MODE=1 \
58 %endif
59
60 make %{?_smp_mflags}
61 %endif
62
63 %install
64 rm -rf %{buildroot}
65 %if %{_repository}=="wearable"
66 cd wearable
67 %elseif %{_repository}=="mobile"
68 cd mobile
69 %endif
70 %make_install
71
72 rm -rf %{buildroot}%{_includedir}/telephony/tapi/.gitignore
73 mkdir -p %{buildroot}%{_datadir}/license
74 %if %{_repository}=="mobile"
75 cp LICENSE %{buildroot}/usr/share/license/%{name}
76 %endif
77
78 %post -p /sbin/ldconfig
79
80 %postun -p /sbin/ldconfig
81
82
83 %files
84 %if %{_repository}=="wearable"
85 %manifest wearable/libslp-tapi.manifest
86 %elseif %{_repository}=="mobile"
87 %manifest mobile/libslp-tapi.manifest
88 %endif
89 %defattr(-,root,root,-)
90 %{_libdir}/*.so.*
91 %if %{_repository}=="wearable"
92 %if 0%{?tizen_build_binary_release_type_eng}
93 %{_bindir}/tapitest
94 %endif
95 %{_datadir}/license/libslp-tapi
96 %elseif %{_repository}=="mobile"
97 /usr/share/license/%{name}
98 %endif
99
100 %files devel
101 %defattr(-,root,root,-)
102 %{_includedir}/telephony-client/*.h
103 %{_libdir}/pkgconfig/*.pc
104 %{_libdir}/*.so