packaging: Initial packaging on 0.9 for Tizen 98/34498/2
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Fri, 23 Jan 2015 13:43:34 +0000 (14:43 +0100)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 29 Jan 2015 10:57:52 +0000 (11:57 +0100)
This is a vanilla copy of upstream spec file from :
  tools/tizen/iotivity.spec

Change-Id: Ib45d37341fe326d42e9bdd8a81a6d479623fd8c0
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
packaging/iotivity.spec [new file with mode: 0644]

diff --git a/packaging/iotivity.spec b/packaging/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