Skip to content

Commit

Permalink
spec: add separate packages for gtk and web shlibs
Browse files Browse the repository at this point in the history
Related to #181

Signed-off-by: Jakub Filak <jfilak@redhat.com>
  • Loading branch information
Jakub Filak committed Dec 11, 2015
1 parent ffe676d commit 842f3f2
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions libreport.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
%if 0%{?suse_version}
%bcond_with bugzilla
%bcond_with rhtsupport
%bcond_without opensuse

%define dbus_devel dbus-1-devel
%define nss_devel mozilla-nss-devel
Expand All @@ -13,6 +14,7 @@
%else
%bcond_without bugzilla
%bcond_without rhtsupport
%bcond_with opensuse

%define dbus_devel dbus-devel
%define nss_devel nss-devel
Expand Down Expand Up @@ -78,12 +80,21 @@ Requires: libreport = %{version}-%{release}
%description devel
Development libraries and headers for libreport

%if %{with opensuse}
%package web0
Provides: libreport-web = %{version}-%{release}
%else
%package web
%endif
Summary: Library providing network API for libreport
Group: System Environment/Libraries
Requires: libreport = %{version}-%{release}

%if %{with opensuse}
%description web0
%else
%description web
%endif
Library providing network API for libreport

%package web-devel
Expand Down Expand Up @@ -153,10 +164,22 @@ Requires: libreport-plugin-reportuploader = %{version}-%{release}
Requires: fros >= 1.0
Provides: report-gtk = 0:0.23-1
Obsoletes: report-gtk < 0:0.23-1
%if %{with opensuse}
Requires: libreport-gtk0 = %{version}-%{release}
%endif

%description gtk
Applications for reporting bugs using libreport backend

%if %{with opensuse}
%package gtk0
Summary: Shared library for libreport-gtk
Group: Development/Libraries/C and C++

%description gtk0
This package contains the shared library needed for libreport-gtk.
%endif

%package gtk-devel
Summary: Development libraries and headers for libreport
Group: Development/Libraries
Expand Down Expand Up @@ -448,14 +471,22 @@ if [ $1 -eq 0 ] ; then
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%if %{with opensuse}
%post gtk0 -p /sbin/ldconfig
%postun gtk0 -p /sbin/ldconfig
%endif

%posttrans gtk
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%if %{with opensuse}
%post web0 -p /sbin/ldconfig
%postun web0 -p /sbin/ldconfig
%else
%post web -p /sbin/ldconfig


%postun web -p /sbin/ldconfig
%endif


%files -f %{name}.lang
Expand Down Expand Up @@ -515,7 +546,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_libdir}/pkgconfig/libreport.pc
%dir %{_includedir}/libreport

%if %{with opensuse}
%files web0
%else
%files web
%endif
%defattr(-,root,root,-)
%{_libdir}/libreport-web.so.*

Expand Down Expand Up @@ -548,11 +583,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files gtk
%defattr(-,root,root,-)
%{_bindir}/report-gtk
%{_libdir}/libreport-gtk.so.*
%config(noreplace) %{_sysconfdir}/libreport/events.d/emergencyanalysis_event.conf
%{_mandir}/man5/emergencyanalysis_event.conf.5.*
%{_datadir}/%{name}/events/report_EmergencyAnalysis.xml
%{_mandir}/man1/report-gtk.1.gz
%if %{with opensuse}
%files gtk0
%defattr(-,root,root,-)
%endif
%{_libdir}/libreport-gtk.so.*

%files gtk-devel
%defattr(-,root,root,-)
Expand Down

0 comments on commit 842f3f2

Please sign in to comment.