Merge "Fix for StepParse - additional conditions checking for watch category in manif...
[platform/core/appfw/wgt-backend.git] / packaging / wgt-backend.spec
1 Name:           wgt-backend
2 Summary:        Application installer backend for WGT
3 Version:        0.1
4 Release:        1
5 Group:          Application Framework/Package Management
6 License:        Apache-2.0
7 Source0:        %{name}-%{version}.tar.gz
8
9 Source1000:     wgt-backend.manifest
10 Source1001:     wgt-backend-tests.manifest
11
12 BuildRequires:  boost-devel
13 BuildRequires:  cmake
14 BuildRequires:  gtest-devel
15 BuildRequires:  pkgconfig(app-installers)
16 BuildRequires:  pkgconfig(manifest-parser)
17 BuildRequires:  pkgconfig(wgt-manifest-handlers)
18 BuildRequires:  pkgconfig(pkgmgr-installer)
19 BuildRequires:  pkgconfig(libwebappenc)
20 BuildRequires:  pkgconfig(tpk-installer)
21
22 %description
23 This is a package that installs the WGT backend of pkgmgr.
24
25 %package tests
26 Summary: Unit tests for wgt-backend
27 Requires: %{name} = %{version}
28
29 %description tests
30 Unit tests for wgt-backend
31
32 %prep
33 %setup -q
34
35 cp %{SOURCE1000} .
36 cp %{SOURCE1001} .
37
38 %build
39 #Variable for setting symlink to runtime
40 runtime_path=%{_bindir}/xwalk-launcher
41 %if "%{profile}" == "mobile" || "%{profile}" == "wearable" || "%{profile}" == "tv"
42 runtime_path=%{_bindir}/wrt
43 %endif
44 %cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} -DWRT_LAUNCHER=${runtime_path}
45 make %{?_smp_mflags}
46
47 %install
48 %make_install
49 mkdir -p %{buildroot}/etc/package-manager/backend
50 ln -s %{_bindir}/wgt-backend %{buildroot}%{_sysconfdir}/package-manager/backend/wgt
51
52 %post tests
53 /usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-backend-ut/smoke-test
54 /usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-backend-ut/smoke-test-helper
55
56 %files
57 %manifest wgt-backend.manifest
58 %license LICENSE
59 %{_sysconfdir}/package-manager/backend/wgt
60 %{_bindir}/wgt-backend
61 %{_datadir}/wgt-backend/default.png
62
63 %files tests
64 %manifest wgt-backend-tests.manifest
65 %{_bindir}/wgt-backend-ut/*
66 %{_datadir}/wgt-backend-ut/*
67
68 %changelog
69 * Thu Dec 18 2015 Pawel Sikorski <p.sikorski@samsung.com> 0.1-1
70 - initial files creation