Change plugin path to %{_libdir}/dpm/plugins
[platform/core/security/dpm-bluetooth.git] / packaging / dpm-bluetooth.spec
1 Name:    dpm-bluetooth
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 BLuetooth 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(bluetooth-api)
14 BuildRequires: pkgconfig(capi-network-bluetooth)
15 BuildRequires: pkgconfig(capi-system-info)
16 BuildRequires: pkgconfig(capi-base-common)
17
18
19 %description
20 The dpm-bluetooth package provides bluetooth policy module for device policy manager
21
22 %files
23 %manifest dpm-bluetooth.manifest
24 %defattr(644,root,root,755)
25 %attr(755,root,root) %{_libdir}/dpm/plugins/bluetooth
26 %attr(755,root,root) %{_libdir}/libdpm-bluetooth.so.%{version}
27 %{_libdir}/libdpm-bluetooth.so.0
28
29 %prep
30 %setup -q
31
32 %build
33 %{!?build_type:%define build_type "RELEASE"}
34
35 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
36         CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
37         CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
38 %endif
39
40 %cmake . -DVERSION=%{version} \
41          -DCMAKE_BUILD_TYPE=%{build_type} \
42          -DPLUGIN_INSTALL_DIR=%{_libdir}/dpm/plugins \
43          -DSCRIPT_INSTALL_DIR=%{_scriptdir} \
44          -DSYSTEMD_UNIT_INSTALL_DIR=%{_unitdir} \
45          -DDATA_INSTALL_DIR=%{TZ_SYS_DATA}/dpm \
46          -DDB_INSTALL_DIR=%{TZ_SYS_DB} \
47          -DRUN_INSTALL_DIR=%{TZ_SYS_RUN} \
48          -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
49          -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
50
51 make %{?jobs:-j%jobs}
52
53 %install
54 %make_install
55
56 %clean
57 rm -rf %{buildroot}
58
59 %post
60
61 %preun
62
63 %postun
64
65 ## Devel Package ##############################################################
66 %package -n libdpm-bluetooth-devel
67 Summary: Libraries and header files for device policy client development
68 Group: Development/Libraries
69 Requires: device-policy-manager = %{version}-%{release}
70
71 %description -n libdpm-bluetooth-devel
72 The libdpm-bluetooth-devel package includes the libraries and header files necessary for
73 developing the DPM client program.
74
75 %files -n libdpm-bluetooth-devel
76 %manifest dpm-bluetooth.manifest
77 %defattr(644,root,root,755)
78 %{_libdir}/libdpm-bluetooth.so
79 %{_libdir}/pkgconfig/dpm-bluetooth.pc
80 %{_includedir}/dpm