[spec] Fix for vd_fork build
[platform/core/api/cordova-plugins.git] / packaging / cordova-api.spec
1 %define _manifestdir %{TZ_SYS_RW_PACKAGES}
2 %define _desktop_icondir %{TZ_SYS_SHARE}/icons/default/small
3
4 %define crosswalk_extensions tizen-extensions-crosswalk
5 %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
6 %define webapi_tools /usr/include/webapi-plugins/tools
7
8 Name:       cordova-api
9 Version:    0.18
10 Release:    0
11 License:    Apache-2.0 and BSD-3-Clause and MIT
12 Group:      Development/Libraries
13 Summary:    Cordova API using Tizen plugins
14 Source0:    %{name}-%{version}.tar.gz
15
16 BuildRequires: ninja
17 BuildRequires: python
18 BuildRequires: pkgconfig(webapi-plugins)
19 BuildRequires: pkgconfig(icu-i18n)
20 BuildRequires: pkgconfig(vconf)
21
22 %description
23 Cordova API using Tizen plugins.
24
25 %prep
26 %setup -q
27
28 %build
29
30 export GYP_GENERATORS='ninja'
31 GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{tizen_profile_name}"
32 GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=x11"
33 GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
34 GYP_OPTIONS="$GYP_OPTIONS -Dversion=%{version}"
35
36 %{webapi_tools}/gyp/gyp $GYP_OPTIONS src/cordova-api.gyp
37
38 ninja -C out/Default %{?_smp_mflags}
39
40 %install
41
42 # Extensions.
43 mkdir -p %{buildroot}%{crosswalk_extensions_path}
44 install -p -m 644 out/Default/libtizen*.so %{buildroot}%{crosswalk_extensions_path}
45
46 # execute desc_gentool
47 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path} %{webapi_tools}/desc_gentool \
48     %{crosswalk_extensions_path} \
49     %{buildroot}%{crosswalk_extensions_path} > cordova-api.json
50
51 # temporary plugins description for lazy loading
52 install -p -m 644 cordova-api.json %{buildroot}%{crosswalk_extensions_path}/cordova-api.json
53
54 %files
55 %{crosswalk_extensions_path}/libtizen*.so
56 %{crosswalk_extensions_path}/cordova-api.json
57 %manifest cordova-api.manifest
58 %license LICENSE LICENSE.BSD-3-Clause LICENSE.MIT NOTICE