[RPM] Add virtual conf package
authorJihoon Lee <jhoon.it.lee@samsung.com>
Tue, 23 Mar 2021 04:27:13 +0000 (13:27 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 30 Mar 2021 04:26:23 +0000 (13:26 +0900)
Add virtual conf package to resolve build dependency issue as suggested
in https://github.com/nnstreamer/api/pull/21#issuecomment-804599118

With this patch, it is now possible to install devel package with
`/etc/nntrainer.ini` or the packager choose to use `test-devel` when
building.

See also nnstreamer/nntrainer#1034

**Evaluation Method**
Cross building with nntrainer package

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Cc: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
packaging/nnstreamer.spec

index 59f5ec3..690ad1b 100644 (file)
@@ -134,6 +134,7 @@ Source1001: nnstreamer.manifest
 ## Define requirements ##
 Requires: nnstreamer-core = %{version}-%{release}
 Requires: nnstreamer-configuration = %{version}-%{release}
+Recommends: nnstreamer-default-configuration = %{version}-%{release}
 
 ## Define build requirements ##
 BuildRequires: gstreamer-devel
@@ -282,10 +283,12 @@ Summary: NNStreamer core package
 NNStreamer is a set of gstreamer plugins to support general neural networks
 and their plugins in a gstreamer stream, this package is core package without configuration
 
-%package configuration
+%package default-configuration
 Summary: NNStreamer global configuration
-%description configuration
-NNStreamer's configuration setup for the end user.
+Provides: nnstreamer-configuration = %{version}-%{release}
+Conflicts: nnstreamer-test-devel
+%description default-configuration
+NNStreamer's global configuration setup for the end user.
 
 # for tensorflow
 %if 0%{?tensorflow_support}
@@ -393,7 +396,7 @@ NNStreamer's tensor_fliter subplugin of caffe2
 
 %package devel
 Summary:       Development package for custom tensor operator developers (tensor_filter/custom)
-Requires:      nnstreamer-core = %{version}-%{release}
+Requires:      nnstreamer = %{version}-%{release}
 Requires:      glib2-devel
 Requires:      gstreamer-devel
 %description devel
@@ -417,7 +420,8 @@ Static library package of nnstreamer-devel.
 %package test-devel
 Summary: Development package to provide testable environment of a subplugin (tensor_filter/custom)
 Requires: nnstreamer-devel = %{version}-%{release}
-Conflicts: nnstreamer-configuration
+Provides: nnstreamer-configuration = %{version}-%{release}
+Conflicts: nnstreamer-default-configuration
 %description test-devel
 Development package to provide testable environment of NNStreamer sub-plugin.
 This package enables testable environment of NNStreamer sub-plugin by making nnstreamer to recognize NNSTREAMER_CONF_PATH to steer a sub-plugin path to a custom path.
@@ -784,7 +788,7 @@ cp -r result %{buildroot}%{_datadir}/nnstreamer/unittest/
 %{gstlibdir}/libnnstreamer.so
 %{_libdir}/libnnstreamer.so
 
-%files configuration
+%files default-configuration
 %config %{_sysconfdir}/nnstreamer.ini
 
 # for tensorflow