Fix lib name for wgt-manifest-handlers
[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(wgt-manifest-handlers)
21 BuildRequires:  pkgconfig(pkgmgr-installer)
22 BuildRequires:  pkgconfig(libwebappenc)
23 BuildRequires:  pkgconfig(tpk-installer)
24
25 %description
26 This is a package that installs the WGT backend of pkgmgr.
27
28 %package tests
29 Summary: Unit tests for wgt-backend
30 Requires: %{name} = %{version}
31
32 %description tests
33 Unit tests for wgt-backend
34
35 %prep
36 %setup -q
37
38 cp %{SOURCE1000} .
39 cp %{SOURCE1001} .
40
41 %build
42 #Variable for setting symlink to runtime
43 runtime_path=%{_bindir}/xwalk-launcher
44 %if "%{profile}" == "mobile" || "%{profile}" == "wearable" || "%{profile}" == "tv"
45 runtime_path=%{_bindir}/wrt
46 %endif
47 %cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} -DWRT_LAUNCHER=${runtime_path}
48 make %{?_smp_mflags}
49
50 %install
51 %make_install
52 mkdir -p %{buildroot}/etc/package-manager/backend
53 ln -s %{_bindir}/wgt-backend %{buildroot}%{_sysconfdir}/package-manager/backend/wgt
54
55 %files
56 %manifest wgt-backend.manifest
57 %license LICENSE
58 %{_sysconfdir}/package-manager/backend/wgt
59 %{_bindir}/wgt-backend
60
61 %files tests
62 %manifest wgt-backend-tests.manifest
63 %{_bindir}/wgt-backend-ut/*
64 %{_datadir}/wgt-backend-ut/*
65
66 %changelog
67 * Thu Dec 18 2015 Pawel Sikorski <p.sikorski@samsung.com> 0.1-1
68 - initial files creation