[Dist/Tizen] Add rpm spec and manifest files to support GBS
authorParichay Kapoor <pk.kapoor@samsung.com>
Fri, 15 Nov 2019 06:22:27 +0000 (15:22 +0900)
committerYongjoo Ahn <yongjoo1.ahn@samsung.com>
Fri, 2 Dec 2022 07:37:24 +0000 (16:37 +0900)
This PR provides tizen packages, flatbuffers and flatbuffers-devel.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
packaging/flatbuffers.manifest [new file with mode: 0644]
packaging/flatbuffers.spec [new file with mode: 0644]

diff --git a/packaging/flatbuffers.manifest b/packaging/flatbuffers.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/flatbuffers.spec b/packaging/flatbuffers.spec
new file mode 100644 (file)
index 0000000..609e67d
--- /dev/null
@@ -0,0 +1,66 @@
+Name:            flatbuffers
+Summary:       cross platform serialization library
+Version:       1.11.0
+Release:       1%{?dist}
+Group:         Development/Libraries
+Packager:      Parichay Kapoor <pk.kapoor@samsung.com>
+License:       Apache-2.0
+Source0:       %{name}-%{version}.tar.gz
+Source1:       %{name}.manifest
+
+BuildRequires: cmake
+BuildRequires: gcc-c++
+
+%description
+FlatBuffers is a cross platform serialization library architected for maximum
+memory efficiency. It allows you to directly access serialized data without
+parsing/unpacking it first, while still having great forwards/backwards
+compatibility.
+
+%package devel
+Summary:       Development package to use flatbuffers
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+%description devel
+This package provides headers and other miscellaneous files required to use flatbuffers.
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+%{cmake} \
+    -DFLATBUFFERS_INSTALL=ON \
+    -DFLATBUFFERS_BUILD_SHAREDLIB=ON \
+    -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
+    -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
+    -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
+    -DCMAKE_INSTALL_BINDIR=%{_bindir} \
+    -DFB_CMAKE_DIR=%{_libdir}/cmake \
+    -DCMAKE_BUILD_TYPE=Release .
+%{__make} %{?_smp_mflags}
+
+%check
+make test
+
+%install
+%{__make} DESTDIR=%{?buildroot:%{buildroot}} install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%license LICENSE.txt
+%{_libdir}/libflatbuffers.so*
+
+%files devel
+%{_bindir}/flatc
+%{_includedir}/flatbuffers
+%{_libdir}/libflatbuffers.a
+%{_libdir}/cmake/flatbuffers/*
+
+%changelog
+* Fri Nov 15 2019 Parichay kapoor <pk.kapoor@samsung.com>
+- Release of 1.11.0