Add dpm auth policy
[platform/core/security/dpm-auth.git] / packaging / dpm-auth.spec
1 Name:    dpm-auth
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 Authentication 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(auth-fw-admin)
14 BuildRequires: pkgconfig(capi-system-info)
15 BuildRequires: pkgconfig(capi-base-common)
16
17 %description
18 The dpm-auth package provides authentication policy module for device policy manager
19
20 %files
21 %manifest dpm-auth.manifest
22 %defattr(644,root,root,755)
23 %attr(755,root,root) /opt/data/dpm/plugins/auth
24 %attr(755,root,root) %{_libdir}/libdpm-auth.so.%{version}
25 %{_libdir}/libdpm-auth.so.0
26
27 %prep
28 %setup -q
29
30 %build
31 %{!?build_type:%define build_type "RELEASE"}
32
33 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
34         CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
35         CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
36 %endif
37
38 %cmake . -DVERSION=%{version} \
39          -DCMAKE_BUILD_TYPE=%{build_type} \
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-auth-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-auth-devel
69 The libdpm-auth-devel package includes the libraries and header files necessary for
70 developing the DPM client program.
71
72 %files -n libdpm-auth-devel
73 %manifest dpm-auth.manifest
74 %defattr(644,root,root,755)
75 %{_libdir}/libdpm-auth.so
76 %{_libdir}/pkgconfig/dpm-auth.pc
77 %{_includedir}/dpm