Add spec file for Tizen build
authorArron Wang <arron.wang@intel.com>
Wed, 24 Dec 2014 08:52:03 +0000 (16:52 +0800)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Wed, 21 Jan 2015 01:46:11 +0000 (01:46 +0000)
Change-Id: I9d70f69b174c1fedad12116c2dba75f84773e50b
Signed-off-by: sudarshan prasad <sudarshan.prasad@intel.com>
(cherry picked from commit 1e7452670814663e4c74500956ce5661bbcedfa8)
Reviewed-on: https://gerrit.iotivity.org/gerrit/174
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Readme.scons.txt
tools/tizen/iotivity.spec [new file with mode: 0644]

index d0e2458..2129efe 100644 (file)
@@ -125,6 +125,13 @@ processors, to specify the processor, add 'CPU=zzz' in the command line. If no
 'CPU' option exists, that means the board only support one kind of processor,
 it's unnecessary to specify it)
 
+4. Build Iotivity project for Tizen
+      $ cd <top directory of the project>
+      $ gbs build -A xxx --packaging-dir tools/tizen/
+(xxx can be i586 or armv7l, we provide the spec file required by gbs tool at
+toools/tizen directory. gbs is default build tool for Tizen platfrom, we can
+refer the following wiki to setup Tizen development environment:
+https://source.tizen.org/documentation/developer-guide/getting-started-guide)
 
 === Build IoTivity project on Windows ===
 
diff --git a/tools/tizen/iotivity.spec b/tools/tizen/iotivity.spec
new file mode 100644 (file)
index 0000000..7f4358c
--- /dev/null
@@ -0,0 +1,73 @@
+Name: iotivity
+Version: 0.9
+Release: 0
+Summary: IoTivity Base Stack & IoTivity Services
+Group: System Environment/Libraries
+License: Apache-2.0
+URL: https://www.iotivity.org/
+Source0: %{name}-%{version}.tar.bz2
+
+BuildRequires: gettext, expat-devel
+BuildRequires: python, libcurl-devel
+BuildRequires: scons
+BuildRequires: openssl-devel
+BuildRequires:  boost-devel
+Requires(postun): /sbin/ldconfig
+Requires(post): /sbin/ldconfig
+
+%description
+IoTivity Base (RICH & LITE) Stack & IoTivity Services
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: pkgconfig
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+%ifarch %arm
+export RPM_ARCH=arm
+%else
+export RPM_ARCH=x86
+%endif
+
+scons -j 4 TARGET_ARCH=$RPM_ARCH
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_includedir}
+mkdir -p %{buildroot}%{_libdir}
+mkdir -p %{buildroot}%{_sbindir}
+
+cp out/linux/*/release/lib*.so %{buildroot}%{_libdir}
+cp out/linux/*/release/lib*.a %{buildroot}%{_libdir}
+
+cp resource/csdk/stack/include/ocstack.h %{buildroot}%{_includedir}
+cp resource/include/*.h %{buildroot}%{_includedir}
+
+cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
+cp service/soft-sensor-manager/SDK/cpp/include/*.h %{buildroot}%{_includedir}
+
+
+%clean
+rm -rf %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/lib*.so
+%{_libdir}/lib*.a
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*.h