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