Refine the build configure
[platform/framework/native/certificate-selector.git] / packaging / apps.CertificateSelector.spec
1 Name:                   apps.CertificateSelector
2 Summary:                The app-control of the certificate manager
3 Version:                1.2.2.0
4 Release:                1
5 Group:                  Application Framework
6 Url:                    https://review.tizen.org/git/?p=platform/framework/native/certificate-selector.git;a=summary
7 License:                Apache-2.0
8 Source0:                %{name}-%{version}.tar.gz
9 Source1001:             %{name}.manifest
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(osp-appfw)
12 BuildRequires:  osp-appfw-internal-devel
13 BuildRequires:  pkgconfig(osp-uifw)
14 BuildRequires:  hash-signer
15
16 # smack domain requires
17 Requires(post): osp-security-service
18
19 # runtime requires
20 Requires:               chromium
21 Requires:               pkgmgr
22
23 %description
24 The app-control of the certificate manager
25
26 %prep
27 %setup -q
28 cp %{SOURCE1001} .
29
30 %build
31 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
32
33 %ifarch %{ix86}
34         ARCH=x86
35         CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_"
36         %if 0%{?simulator}
37                 CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_"
38         %endif
39 %else
40         ARCH=arm
41         CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_"
42 %endif
43
44 %if 0%{?tizen_build_binary_release_type_eng}
45         CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
46 %endif
47
48 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
49
50 make %{?_smp_mflags}
51
52 %install
53 %make_install
54
55 ###### for package signing step ######
56 PKG_ID=hyCsE05ySM
57 %define tizen_sign 1
58 %define tizen_sign_base /usr/apps/${PKG_ID}
59 %define tizen_sign_level platform
60 %define tizen_author_sign 1
61 %define tizen_dist_sign 1
62
63 %post
64 /bin/rm -fr /opt/apps/hyCsE05ySM
65 /usr/etc/package-manager/backend/tpk -i /usr/apps/hyCsE05ySM
66
67 %files
68 %manifest %{name}.manifest
69 %license LICENSE.Apache-2.0
70 %defattr(-,root,root,-)
71 /usr/apps/*