[LIBREPORT PATCH] spec: build only workflow subpkg relevant for host's OS

Jakub Filak jfilak at redhat.com
Mon Jul 15 10:38:29 UTC 2013


Closes rhbz#921941

Signed-off-by: Jakub Filak <jfilak at redhat.com>
---
 libreport.spec.in | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/libreport.spec.in b/libreport.spec.in
index 539e5f1..8a26b24 100644
--- a/libreport.spec.in
+++ b/libreport.spec.in
@@ -251,6 +251,7 @@ Obsoletes: report-config-scp < 0:0.23-1
 %description plugin-reportuploader
 Plugin to report bugs into anonymous FTP site associated with ticketing system.
 
+%if 0%{?fedora}
 %package fedora
 Summary: Default configuration for reporting bugs via Fedora infrastructure
 Group: Applications/File
@@ -259,7 +260,9 @@ Group: Applications/File
 Default configuration for reporting bugs via Fedora infrastructure
 used to easy configure the reporting process for Fedora sytems. Just
 install this package and you're done.
+%endif
 
+%if 0%{?rhel}
 %package rhel
 Summary: Default configuration for reporting bugs via Red Hat infrastructure
 Group: Applications/File
@@ -268,6 +271,7 @@ Group: Applications/File
 Default configuration for reporting bugs via Red Hat infrastructure
 used to easy configure the reporting process for Red Hat sytems. Just
 install this package and you're done.
+%endif
 
 %if %{with bugzilla}
 %package anaconda
@@ -315,6 +319,22 @@ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/events/
 # After everything is installed, remove info dir
 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
 
+# Remove unwanted Fedora specific workflow configuration files
+%if 0%{!?fedora:1}
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_Fedora.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows.d/report_fedora.conf
+%endif
+
+# Remove unwanted RHEL specific workflow configuration files
+%if 0%{!?rhel:1}
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_RHELCCpp.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_RHELKerneloops.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_RHELPython.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_RHELvmcore.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows/workflow_RHELxorg.xml
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows.d/report_rhel.conf
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -483,11 +503,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf
 %config(noreplace) %{_sysconfdir}/libreport/workflows/workflow_Upload.xml
 
+%if 0%{?fedora}
 %files fedora
 %defattr(-,root,root,-)
 %config(noreplace) %{_sysconfdir}/libreport/workflows/workflow_Fedora.xml
 %config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_fedora.conf
+%endif
 
+%if 0%{?rhel}
 %files rhel
 %defattr(-,root,root,-)
 %config(noreplace) %{_sysconfdir}/libreport/workflows/workflow_RHELCCpp.xml
@@ -496,6 +519,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %config(noreplace) %{_sysconfdir}/libreport/workflows/workflow_RHELvmcore.xml
 %config(noreplace) %{_sysconfdir}/libreport/workflows/workflow_RHELxorg.xml
 %config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel.conf
+%endif
 
 %if %{with bugzilla}
 %files anaconda
-- 
1.8.3.1



More information about the Crash-catcher mailing list