Rename Eden to Focus
[platform/core/uifw/dali-toolkit.git] / packaging / dali-addon.spec
1 Name:       dali-addon
2 Summary:    DALi module for Node.JS
3 Version:    1.2.11
4 Release:    1
5 Group:      Development/Libraries
6 License:    Apache License, Version 2.0
7 URL:        https://review.tizen.org/gerrit/#/q/project:platform/core/uifw/dali-toolkit
8 Distribution: Tizen
9 Source0:    %{name}-%{version}.tar.gz
10
11 BuildRequires:  pkgconfig
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  cmake
14 BuildRequires:  pkgconfig(dali-core)
15 BuildRequires:  pkgconfig(dali-toolkit)
16 BuildRequires:  nodejs-devel
17
18 # DALi JS applications using dali-addon always run on dali-adaptor-uv.
19 BuildRequires:  pkgconfig(dali-adaptor-uv)
20
21 %description
22 DALi Node.JS addon
23
24
25 ##############################
26 # Define directory locations
27 # Currently the addon is part of toolkit repository
28 ##############################
29 # addonDir = node-addon directory inside BUILD directory
30 %define addonDir %{_builddir}/dali-addon-%{version}/node-addon
31
32 # addonBuildDir = node-addon build directory inside BUILD directory
33 %define addonBuildDir %{addonDir}/build/tizen
34
35 # installPath = the directory the node-addon is installed into
36 # we use /usr/lib/node so the developer can do var dali = require('dali');
37 %define installPath /usr/lib/node
38
39 # full install path, for GBS were are installing into a BUILDROOT
40 %define installDir %{buildroot}%{installPath}
41
42 ##############################
43 # Preparation
44 ##############################
45 %prep
46
47 # setup = cd build area, decompresses source, sets all file permisions to be owned by root ( q = quiet )
48 %setup -q
49
50 ##############################
51 # Build
52 ##############################
53 %build
54
55 echo "----------------Build directory = " %{addonBuildDir}
56 PREFIX="/usr"
57 CXXFLAGS+=" -std=c++11 -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
58 LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
59
60 cd "%{addonBuildDir}"
61 cmake -DCMAKE_INSTALL_PREFIX=%{installPath}  -DGBSBuild:BOOL=1 .
62 make
63
64 ##############################
65 # Installation
66 ##############################
67 %install
68 rm -rf %{buildroot}
69
70 cd "%{addonBuildDir}"
71 %make_install
72 cp -R %{addonDir}/examples %{installDir}/examples
73
74
75 %clean
76 rm -rf %{buildroot}
77
78 ##############################
79 # Post Install
80 ##############################
81 %post
82 exit 0
83
84
85 ##############################
86 # Post Uninstall
87 ##############################
88 %postun
89
90 ##############################
91 # Files in Binary Packages
92 ##############################
93 %files
94 %manifest dali-addon.manifest
95 %defattr(-,root,root,-)
96 %{installPath}
97
98