Revert "[3.0] Make only dali-toolkit.spec file be used because of gbs build error" 07/83207/1
authortaeyoon <taeyoon0.lee@samsung.com>
Tue, 9 Aug 2016 11:29:52 +0000 (20:29 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Tue, 9 Aug 2016 11:30:07 +0000 (20:30 +0900)
This reverts commit da9a8f3816c9e0f94a48a49be2b06805b90c799d.

Change-Id: I61b9e51492a572e910e349c8ad94f2ff850762dd

packaging/dali-addon.spec [new file with mode: 0644]

diff --git a/packaging/dali-addon.spec b/packaging/dali-addon.spec
new file mode 100644 (file)
index 0000000..22bfeae
--- /dev/null
@@ -0,0 +1,98 @@
+Name:       dali-addon
+Summary:    DALi module for Node.JS
+Version:    0.0.1
+Release:    1
+Group:      Development/Libraries
+License:    Apache License, Version 2.0
+URL:        https://review.tizen.org/gerrit/#/q/project:platform/core/uifw/dali-toolkit
+Distribution: Tizen
+Source0:    %{name}-%{version}.tar.gz
+
+BuildRequires:  pkgconfig
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(dali-core)
+BuildRequires:  pkgconfig(dali-toolkit)
+BuildRequires:  nodejs-devel
+
+# DALi JS applications using dali-addon always run on dali-adaptor-uv.
+BuildRequires:  pkgconfig(dali-adaptor-uv)
+
+%description
+DALi Node.JS addon
+
+
+##############################
+# Define directory locations
+# Currently the addon is part of toolkit repository
+##############################
+# addonDir = node-addon directory inside BUILD directory
+%define addonDir %{_builddir}/dali-addon-%{version}/node-addon
+
+# addonBuildDir = node-addon build directory inside BUILD directory
+%define addonBuildDir %{addonDir}/build/tizen
+
+# installPath = the directory the node-addon is installed into
+# we use /usr/lib/node so the developer can do var dali = require('dali');
+%define installPath /usr/lib/node
+
+# full install path, for GBS were are installing into a BUILDROOT
+%define installDir %{buildroot}%{installPath}
+
+##############################
+# Preparation
+##############################
+%prep
+
+# setup = cd build area, decompresses source, sets all file permisions to be owned by root ( q = quiet )
+%setup -q
+
+##############################
+# Build
+##############################
+%build
+
+echo "----------------Build directory = " %{addonBuildDir}
+PREFIX="/usr"
+CXXFLAGS+=" -std=c++11 -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
+LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
+
+cd "%{addonBuildDir}"
+cmake -DCMAKE_INSTALL_PREFIX=%{installPath}  -DGBSBuild:BOOL=1 .
+make
+
+##############################
+# Installation
+##############################
+%install
+rm -rf %{buildroot}
+
+cd "%{addonBuildDir}"
+%make_install
+cp -R %{addonDir}/examples %{installDir}/examples
+
+
+%clean
+rm -rf %{buildroot}
+
+##############################
+# Post Install
+##############################
+%post
+exit 0
+
+
+##############################
+# Post Uninstall
+##############################
+%postun
+
+##############################
+# Files in Binary Packages
+##############################
+%files
+%manifest dali-addon.manifest
+%defattr(-,root,root,-)
+%{installPath}
+
+