Fix plugin path
[platform/core/security/dpm-telephony.git] / packaging / dpm-telephony.spec
1 Name:    dpm-telephony
2 Version: 1.0.1
3 Release: 0
4 License: Apache-2.0
5 Source0: %{name}-%{version}.tar.gz
6 Summary: Tizen Device Policy Manager Telephony Policy Module
7 Group:   Security/Other
8 BuildRequires: gcc
9 BuildRequires: cmake
10 BuildRequires: gettext-tools
11 BuildRequires: pkgconfig(klay)
12 BuildRequires: pkgconfig(dpm-pil)
13 BuildRequires: pkgconfig(capi-system-info)
14 BuildRequires: pkgconfig(capi-base-common)
15
16 %description
17 The dpm-telephony package provides telephony policy module for device policy manager
18
19 %files
20 %manifest dpm-telephony.manifest
21 %defattr(644,root,root,755)
22 %attr(755,root,root) %{_libdir}/dpm/plugins/telephony
23 %attr(755,root,root) %{_libdir}/libdpm-telephony.so.%{version}
24 %{_libdir}/libdpm-telephony.so.0
25
26 %prep
27 %setup -q
28
29 %build
30 %{!?build_type:%define build_type "RELEASE"}
31
32 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
33         CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
34         CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
35 %endif
36
37 %cmake . -DVERSION=%{version} \
38          -DCMAKE_BUILD_TYPE=%{build_type} \
39          -DPLUGIN_INSTALL_DIR=%{_libdir}/dpm/plugins \
40          -DSCRIPT_INSTALL_DIR=%{_scriptdir} \
41          -DSYSTEMD_UNIT_INSTALL_DIR=%{_unitdir} \
42          -DDATA_INSTALL_DIR=%{TZ_SYS_DATA}/dpm \
43          -DDB_INSTALL_DIR=%{TZ_SYS_DB} \
44          -DRUN_INSTALL_DIR=%{TZ_SYS_RUN} \
45          -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
46          -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
47
48 make %{?jobs:-j%jobs}
49
50 %install
51 %make_install
52
53 %clean
54 rm -rf %{buildroot}
55
56 %post
57
58 %preun
59
60 %postun
61
62 ## Devel Package ##############################################################
63 %package -n libdpm-telephony-devel
64 Summary: Libraries and header files for device policy client development
65 Group: Development/Libraries
66 Requires: device-policy-manager = %{version}-%{release}
67
68 %description -n libdpm-telephony-devel
69 The libdpm-telephony-devel package includes the libraries and header files necessary for
70 developing the DPM client program.
71
72 %files -n libdpm-telephony-devel
73 %manifest dpm-telephony.manifest
74 %defattr(644,root,root,755)
75 %{_libdir}/libdpm-telephony.so
76 %{_libdir}/pkgconfig/dpm-telephony.pc
77 %{_includedir}/dpm