spec: disable introspection option 10/274110/9
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 21 Apr 2022 11:08:52 +0000 (20:08 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Fri, 5 Aug 2022 08:37:13 +0000 (17:37 +0900)
- add introspection option and disable it as default

Change-Id: I9561c16cd40360ea718d32a43124aa1cce976c5d

packaging/gstreamer.spec

index 7d5894f..a285c98 100644 (file)
@@ -1,9 +1,11 @@
 %bcond_with x
 %bcond_with wayland
+
 %define gst_branch 1.0
 %define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch}
 %define _lib_girepository %{_libdir}/girepository-%{gst_branch}
 %define _enable_v4l2h264enc 0
+%define _enable_introspection 0
 
 #######################################################################
 ## how to build each plugin :
@@ -79,7 +81,7 @@ BuildRequires:  fdupes
 BuildRequires:  flex
 BuildRequires:  libtool
 BuildRequires:  pkgconfig(dlog)
-%if "%{tizen_profile_name}" != "tv"
+%if "%{_enable_introspection}" == "1"
 BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
 %endif
 BuildRequires:  pkgconfig(libxml-2.0)
@@ -154,8 +156,10 @@ BuildRequires:  pkgconfig(theoraenc) >= 1.1
 BuildRequires:  pkgconfig(vorbis) >= 1.0
 BuildRequires:  pkgconfig(vorbisenc) >= 1.0
 BuildRequires:  pkgconfig(zlib)
-%if "%{tizen_profile_name}" != "tv"
+%if "%{_enable_introspection}" == "1"
 BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.1
+%endif
+%if "%{tizen_profile_name}" != "tv"
 BuildRequires:  update-desktop-files
 %endif
 %if %{with wayland}
@@ -547,10 +551,10 @@ meson --auto-features=disabled --prefix=/usr --libdir=%{_libdir} --datadir=%{_da
   -D %{_core_opt}tools=enabled \
   %if "%{tizen_profile_name}" == "tv"
     -D %{_core_opt}tv-profile=true \
-    -D %{_core_opt}introspection=disabled \
-  %else
-    -D %{_core_opt}introspection=enabled \
   %endif # profile
+  %if "%{_enable_introspection}" == "1"
+    -D %{_core_opt}introspection=enabled \
+  %endif # introspection
 %endif # plugin
 %if "%{plugin}" == "all" || "%{plugin}" == "base"
   -D %{_base_opt}alsa=enabled \
@@ -585,11 +589,13 @@ meson --auto-features=disabled --prefix=/usr --libdir=%{_libdir} --datadir=%{_da
   %else
     -D %{_base_opt}adder=enabled \
     -D %{_base_opt}encoding=enabled \
-    -D %{_base_opt}introspection=enabled \
     %if 0%{?enable_gl:1}
       -D %{_base_opt}gl=enabled \
     %endif # gl
   %endif # profile
+  %if "%{_enable_introspection}" == "1"
+    -D %{_base_opt}introspection=enabled \
+  %endif # introspection
 %endif # base plugin
 %if "%{plugin}" == "all" || "%{plugin}" == "good"
   %if 0%{?ENABLE_AALIB}
@@ -793,13 +799,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libgstnet-%{gst_branch}.so.*
 %{_libdir}/libgstcheck-%{gst_branch}.so.*
 %{_libdir}/libgstreamer-%{gst_branch}.so.*
-%if "%{tizen_profile_name}" != "tv"
+%if "%{_enable_introspection}" == "1"
 %{_lib_girepository}/Gst-%{gst_branch}.typelib
 %{_lib_girepository}/GstBase-%{gst_branch}.typelib
 %{_lib_girepository}/GstController-%{gst_branch}.typelib
 %{_lib_girepository}/GstNet-%{gst_branch}.typelib
 %{_lib_girepository}/GstCheck-%{gst_branch}.typelib
-%endif
+%endif #introspection
 %{_datadir}/gdb/auto-load/usr/%{_lib}/libgstreamer-%{gst_branch}*-gdb.py
 %{_datadir}/gstreamer-%{gst_branch}/gdb/glib_gobject_helper.py
 %{_datadir}/gstreamer-%{gst_branch}/gdb/gst_gdb.py
@@ -833,13 +839,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/gstreamer-controller-%{gst_branch}.pc
 %{_libdir}/pkgconfig/gstreamer-net-%{gst_branch}.pc
 %{_libdir}/pkgconfig/gstreamer-check-%{gst_branch}.pc
-%if "%{tizen_profile_name}" != "tv"
+%if "%{_enable_introspection}" == "1"
 %{_datadir}/gir-%{gst_branch}/Gst-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstBase-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstController-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstNet-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstCheck-%{gst_branch}.gir
-%endif
+%endif #introspection
 
 %changelog
 
@@ -895,6 +901,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libgstvideo-%{gst_branch}.so.*
 %if "%{tizen_profile_name}" != "tv"
 %{_lib_gstreamer_dir}/libgstencoding.so
+%endif #profile
+%if "%{_enable_introspection}" == "1"
 %{_lib_girepository}/GstAllocators-%{gst_branch}.typelib
 %{_lib_girepository}/GstApp-%{gst_branch}.typelib
 %{_lib_girepository}/GstAudio-%{gst_branch}.typelib
@@ -904,7 +912,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_lib_girepository}/GstSdp-%{gst_branch}.typelib
 %{_lib_girepository}/GstTag-%{gst_branch}.typelib
 %{_lib_girepository}/GstVideo-%{gst_branch}.typelib
-%endif
+%endif #introspection
 %dir %{_datadir}/gst-plugins-base/
 %dir %{_datadir}/gst-plugins-base/%{gst_branch}/
 %{_datadir}/gst-plugins-base/%{gst_branch}/license-translations.dict
@@ -957,7 +965,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/gstreamer-sdp-%{gst_branch}.pc
 %{_libdir}/pkgconfig/gstreamer-tag-%{gst_branch}.pc
 %{_libdir}/pkgconfig/gstreamer-video-%{gst_branch}.pc
-%if "%{tizen_profile_name}" != "tv"
+%if "%{_enable_introspection}" == "1"
 %{_datadir}/gir-%{gst_branch}/GstAllocators-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstApp-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstAudio-%{gst_branch}.gir
@@ -967,7 +975,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/gir-%{gst_branch}/GstSdp-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstTag-%{gst_branch}.gir
 %{_datadir}/gir-%{gst_branch}/GstVideo-%{gst_branch}.gir
-%endif # profile
+%endif # introspection
 
 %endif # plugin