Merge ode app and ode-gui app
[platform/core/security/ode.git] / packaging / ode.spec
1 Name:    ode
2 Version: 0.0.1
3 Release: 0
4 License: Apache-2.0
5 Source0: file://%{name}-%{version}.tar.gz
6 Summary: Tizen device encryption and secure erase manager
7 Group:   Security/Service
8 Requires: systemd
9 BuildRequires: gcc
10 BuildRequires: cmake
11 BuildRequires: gettext-tools
12 BuildRequires: pkgconfig(klay)
13 BuildRequires: pkgconfig(glib-2.0)
14 BuildRequires: pkgconfig(aul)
15 BuildRequires: pkgconfig(bundle)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(key-manager)
18 BuildRequires: pkgconfig(cynara-client)
19 BuildRequires: pkgconfig(cynara-session)
20 BuildRequires: pkgconfig(openssl)
21
22 %description
23 The ode package provides a daemon which is responsible for encrypting/decryption storages and secure erasing.
24
25 %files
26 %manifest ode.manifest
27 %defattr(644,root,root,755)
28 %attr(755,root,root) %{_bindir}/oded
29 %{_unitdir}/ode.service
30 %{_unitdir}/multi-user.target.wants/ode.service
31 %attr(700,root,root) %{_sbindir}/ode-admin-cli
32
33 %prep
34 %setup -q
35
36 %build
37 %{!?build_type:%define build_type "RELEASE"}
38
39 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
40         CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
41         CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
42 %endif
43
44 %cmake . -DVERSION=%{version} \
45          -DCMAKE_BUILD_TYPE=%{build_type} \
46          -DRUN_DIR=%{TZ_SYS_RUN} \
47          -DBIN_DIR=%{TZ_SYS_BIN} \
48          -DSYSTEMD_UNIT_DIR=%{_unitdir} \
49          -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
50          -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}"
51
52 make %{?jobs:-j%jobs}
53
54 %install
55 %make_install
56 mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
57 ln -s ../ode.service %{buildroot}/%{_unitdir}/multi-user.target.wants/ode.service
58
59 %find_lang secure-erase
60
61 %clean
62 rm -rf %{buildroot}
63
64 %postun
65
66 ## ODE Client Package ########################################################
67 %package -n libode
68 Summary: Library for Tizen device encryption and secure erase
69 Group: Security/Libraries
70 BuildRequires: pkgconfig(libtzplatform-config)
71 Requires: %{name} = %{version}-%{release}
72 Requires(post): /sbin/ldconfig
73 Requires(postun): /sbin/ldconfig
74
75 %description -n libode
76 The libode package contains the libraries needed to encrypt/decrypt storages and secure erasing.
77
78 %post -n libode -p /sbin/ldconfig
79
80 %postun -n libode -p /sbin/ldconfig
81
82 %files -n libode
83 %manifest ode.manifest
84 %defattr(644,root,root,755)
85 %attr(755,root,root) %{_libdir}/libode.so.%{version}
86 %{_libdir}/libode.so.0
87
88 ## Devel Package ##############################################################
89 %package -n libode-devel
90 Summary: Libraries and header files for device encryption client development
91 Group: Development/Libraries
92 Requires: libode = %{version}-%{release}
93
94 %description -n libode-devel
95 The libode-devel package includes the libraries and header files necessary for
96 developing device encryption client program.
97
98 %files -n libode-devel
99 %manifest ode.manifest
100 %defattr(644,root,root,755)
101 %{_libdir}/libode.so
102 %{_includedir}/ode
103 %{_libdir}/pkgconfig/ode.pc
104
105 ## Unittest Package ###########################################################
106 %package -n unit-tests
107 Summary: Unit tests to verify components of device encryption
108 Group: Security/Testing
109 Requires: libode = %{version}-%{release}
110
111 %description -n unit-tests
112 The libode-devel package includes the libraries and header files necessary for
113 developing device encryption client program.
114
115 %files -n unit-tests
116 %manifest ode.manifest
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_bindir}/ode-engine-unit-tests
119
120 ## ODE App package ################################################
121 %package -n org.tizen.ode
122 Summary: Tizen ODE User Interface
123 Group: Security/Other
124 BuildRequires: pkgconfig(glib-2.0)
125 BuildRequires: pkgconfig(elementary)
126 BuildRequires: pkgconfig(dlog)
127 BuildRequires: pkgconfig(efl-extension)
128 BuildRequires: pkgconfig(libxml-2.0)
129 BuildRequires: pkgconfig(evas)
130 BuildRequires: pkgconfig(vconf)
131 BuildRequires: pkgconfig(capi-appfw-app-control)
132 BuildRequires: pkgconfig(capi-appfw-application)
133 BuildRequires: pkgconfig(capi-system-runtime-info)
134 BuildRequires: pkgconfig(capi-system-device)
135 BuildRequires: pkgconfig(capi-system-system-settings)
136 BuildRequires: pkgconfig(capi-ui-efl-util)
137
138 %description -n org.tizen.ode
139 Tizen ODE User Interface for device policy management
140
141 %define odeapp_home %{TZ_SYS_RO_APP}/org.tizen.ode
142
143 %post -n org.tizen.ode
144 ln -sf %{odeapp_home}/bin/org.tizen.ode /usr/bin/ode
145
146 %files -n org.tizen.ode
147 %defattr(-,root,root,-)
148 %{odeapp_home}/bin/*
149 %{odeapp_home}/res/*
150 %{TZ_SYS_RO_PACKAGES}/org.tizen.ode.xml
151
152 ## Secure Erase Interface Package ################################
153 %package -n org.tizen.secure-erase
154 Summary: Tizen ODE Secure Erase Interface
155 Group: Security/Other
156 BuildRequires: pkgconfig(vconf)
157 BuildRequires: pkgconfig(aul)
158 BuildRequires: pkgconfig(evas)
159 BuildRequires: pkgconfig(appsvc)
160 BuildRequires: pkgconfig(efl-extension)
161 BuildRequires: pkgconfig(elementary)
162 BuildRequires: pkgconfig(capi-ui-efl-util)
163 BuildRequires: pkgconfig(capi-appfw-application)
164 BuildRequires: pkgconfig(capi-system-system-settings)
165 BuildRequires: pkgconfig(notification)
166
167 %description -n org.tizen.secure-erase
168 The org.tizen.secure-erase package provides a interface of Tizen ODE Secure Erase
169
170 %define secure_erase_home %{TZ_SYS_RO_APP}/org.tizen.secure-erase
171
172 %files -n org.tizen.secure-erase -f secure-erase.lang
173 %defattr(-,root,root,-)
174 %manifest tools/apps/secure-erase/org.tizen.secure-erase.manifest
175 %{secure_erase_home}/bin/*
176 /usr/share/icons/default/small/org.tizen.secure-erase.png
177 %{TZ_SYS_RO_PACKAGES}/org.tizen.secure-erase.xml