From f8be798264ea651b2b143bdfe1c8fb6b0432447a Mon Sep 17 00:00:00 2001 From: Wook Song Date: Thu, 24 Oct 2019 16:12:10 +0900 Subject: [PATCH] [Dist/Tizen] Add a script that generates tarball for source package 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 --- packaging/generate-tarball.sh | 11 +++++++++++ packaging/nnstreamer.spec | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 packaging/generate-tarball.sh diff --git a/packaging/generate-tarball.sh b/packaging/generate-tarball.sh new file mode 100644 index 0000000..6d405c8 --- /dev/null +++ b/packaging/generate-tarball.sh @@ -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}/* diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index 8b3badd..dd0db47 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -21,6 +21,7 @@ Group: Applications/Multimedia Packager: MyungJoo Ham 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 -- 2.7.4