[Dist/Tizen] Add a script that generates tarball for source package
authorWook Song <wook16.song@samsung.com>
Thu, 24 Oct 2019 07:12:10 +0000 (16:12 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 24 Oct 2019 15:41:12 +0000 (00:41 +0900)
For the purpose of filtering out sources which should not be include in
Tizen packages, this patch adds a script for generating source tarball
at build time.

Signed-off-by: Wook Song <wook16.song@samsung.com>
packaging/generate-tarball.sh [new file with mode: 0644]
packaging/nnstreamer.spec

diff --git a/packaging/generate-tarball.sh b/packaging/generate-tarball.sh
new file mode 100644 (file)
index 0000000..6d405c8
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+NNS_PKG_NAME=$1
+VERSION=$2
+
+tar xzf ${NNS_PKG_NAME}-${VERSION}.tar.gz
+rm -f ${NNS_PKG_NAME}-$VERSION.tar.gz
+rm -rf ${NNS_PKG_NAME}-$VERSION/api/capi/include/platform
+tar czf ${NNS_PKG_NAME}-$VERSION.tar.gz ${NNS_PKG_NAME}-${VERSION}/*
index 8b3badd..dd0db47 100644 (file)
@@ -21,6 +21,7 @@ Group:                Applications/Multimedia
 Packager:      MyungJoo Ham <myungjoo.ham@samsung.com>
 License:       LGPL-2.1
 Source0:       nnstreamer-%{version}.tar.gz
+Source1:       generate-tarball.sh
 Source1001:    nnstreamer.manifest
 %if %{with tizen}
 Source1002:    capi-nnstreamer.manifest
@@ -244,7 +245,11 @@ Note that there is no .pc file for this package because nnstreamer.pc file may b
 %setup -q
 cp %{SOURCE1001} .
 %if %{with tizen}
+pushd %{_sourcedir}
+sh %{SOURCE1} %{name} %{version}
+popd
 cp %{SOURCE1002} .
+rm -rf ./api/capi/include/platform
 %endif
 cp %{SOURCE1001} ./nnstreamer-cpp.manifest