Add package signature files generation code in spec file
[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:                  TO_BE/FILLED_IN
6 License:                Apache License, Version 2.0
7 Source0:                %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(osp-appfw)
10 BuildRequires:  osp-appfw-internal-devel
11 BuildRequires:  pkgconfig(osp-uifw)
12 BuildRequires:  hash-signer
13
14 Requires:               chromium
15 Requires:               osp-security-service
16 Requires:               pkgmgr
17
18 %description
19 The app-control of the certificate manager
20
21 %prep
22 %setup -q
23
24 %build
25 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
26 %ifarch %{ix86}
27 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
28 %else
29 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_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
30 %endif
31
32 # Call make instruction with smp support
33 make %{?jobs:-j%jobs}
34
35 %install
36 rm -rf %{buildroot}
37 mkdir -p %{buildroot}/usr/share/license
38 cp %{_builddir}/%{name}-%{version}/LICENSE.Apache-2.0 %{buildroot}/usr/share/license/%{name}
39
40 %make_install
41 ###### for package signing step ######
42 PKG_ID=hyCsE05ySM
43 %define tizen_sign 1
44 %define tizen_sign_base /usr/apps/${PKG_ID}
45 %define tizen_sign_level platform
46 %define tizen_author_sign 1
47 %define tizen_dist_sign 1
48
49 %post
50 /bin/rm -fr /opt/apps/hyCsE05ySM
51 /usr/etc/package-manager/backend/tpk -i /usr/apps/hyCsE05ySM
52
53 %files
54 %defattr(-,root,root,-)
55 /usr/share/license/%{name}
56 /usr/apps/*