From b7fb1167e319ed2b1d1fd37f9844b8bc852ccb0d Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 28 Aug 2014 16:48:53 -0700 Subject: =?UTF-8?q?Qt=20=E2=86=92=20wireshark.=20GTK+=20=E2=86=92=20wiresh?= =?UTF-8?q?ark-gtk.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure the Qt UI is named "Wireshark" and its executable is named "wireshark" or "wireshark.exe". Make sure the GTK+ UI is named "Wireshark 1" or "Wireshark (GTK+)" depending on how much the target audience is likely to care about UI toolkits. Make sure the GTK+ executable is named "wireshark-gtk" or "wireshark-gtk.exe". It looks like moving to Qt 5.3 (g978faf3) broke the PortableApps package. It's likely even more broken now. Autotools out-of-tree builds also broke on Ubuntu 12.02 (automake 1.11.3) at some point. The first attempt to compile in ui/qt returns "error: source_file.cpp: No such file or directory". The second attempt works. Out-of-tree builds work fine on Ubuntu 14.04 (automake 1.14.1). Tested: - Nmake builds - NSIS packaging - CMake builds (Windows, OS X) - Autotools build and distcheck - RPM packaging To do: - Test Debian packaging - Fix PortableApps Change-Id: I66429870e05fd2d6fc901942477959ed6164fce2 Reviewed-on: https://code.wireshark.org/review/3919 Reviewed-by: Gerald Combs --- packaging/rpm/SPECS/wireshark.spec.in | 114 ++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 53 deletions(-) (limited to 'packaging/rpm') diff --git a/packaging/rpm/SPECS/wireshark.spec.in b/packaging/rpm/SPECS/wireshark.spec.in index 751f1fcb59..a397cd0b35 100644 --- a/packaging/rpm/SPECS/wireshark.spec.in +++ b/packaging/rpm/SPECS/wireshark.spec.in @@ -2,9 +2,9 @@ # @configure_input@ # configure options: @CONFIG_ARGS@ +%bcond_with qt %bcond_without gtk2 %bcond_with gtk3 -%bcond_with qt # Set these to 1 if you want to ensure your package includes support for them: %global with_adns 0 @@ -29,10 +29,10 @@ Version: @VERSION@ Release: 1 License: GPL+ Group: Applications/Internet -Source: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2 +Source: https://wireshark.org/download/src/%{name}-%{version}.tar.bz2 # Or this URL for automated builds: -#Source: http://wireshark.org/download/automated/src/%{name}-%{version}.tar.bz2 -URL: http://www.wireshark.org/ +#Source: https://wireshark.org/download/automated/src/%{name}-%{version}.tar.bz2 +URL: https://www.wireshark.org/ Packager: Gerald Combs # Some distributions create a wireshark-devel package; get rid of it Obsoletes: wireshark-devel @@ -114,7 +114,35 @@ features, including a rich display filter language and the ability to view the reconstructed stream of a TCP session. This package contains command-line utilities, plugins, and documentation for -Wireshark. A GTK+ and a Qt graphical user interface are packaged separately. +Wireshark. A Qt and GTK+ graphical user interface are packaged separately. + +%if %{with qt} +%package qt +Summary: Qt GUI for Wireshark +Group: Applications/Internet +%if 0%{?suse_version} +Requires: libqt4 >= @QT_MIN_VERSION@ +BuildRequires: libqt4-devel >= @QT_MIN_VERSION@ +%else +Requires: qt >= @QT_MIN_VERSION@ +BuildRequires: qt-devel >= @QT_MIN_VERSION@ +%endif +Requires: %{name} = %{version}-%{release} +Requires: xdg-utils +Requires: hicolor-icon-theme +BuildRequires: desktop-file-utils +Requires(post): desktop-file-utils +Requires(post): /usr/sbin/update-alternatives +Requires(postun): /usr/sbin/update-alternatives +BuildRequires: gcc-c++ +%if 0%{?suse_version} +# Need this for SuSE's suse_update_desktop_file macro +BuildRequires: update-desktop-files +%endif + +%description qt +Contains the Qt Wireshark GUI and desktop integration files. +%endif %if %{with gtk2} || %{with gtk3} %package gnome @@ -155,34 +183,6 @@ Requires: portaudio Contains the Gnome (GTK+) Wireshark GUI and desktop integration files. %endif -%if %{with qt} -%package qt -Summary: Qt GUI for Wireshark -Group: Applications/Internet -%if 0%{?suse_version} -Requires: libqt4 >= @QT_MIN_VERSION@ -BuildRequires: libqt4-devel >= @QT_MIN_VERSION@ -%else -Requires: qt >= @QT_MIN_VERSION@ -BuildRequires: qt-devel >= @QT_MIN_VERSION@ -%endif -Requires: %{name} = %{version}-%{release} -Requires: xdg-utils -Requires: hicolor-icon-theme -BuildRequires: desktop-file-utils -Requires(post): desktop-file-utils -Requires(post): /usr/sbin/update-alternatives -Requires(postun): /usr/sbin/update-alternatives -BuildRequires: gcc-c++ -%if 0%{?suse_version} -# Need this for SuSE's suse_update_desktop_file macro -BuildRequires: update-desktop-files -%endif - -%description qt -Contains the Qt Wireshark GUI and desktop integration files. -%endif - %prep %setup -q -n %{name}-%{version} @@ -205,9 +205,9 @@ Contains the Qt Wireshark GUI and desktop integration files. %if %{with_portaudio} --with-portaudio \ %endif + %{?_with_qt} \ %{?_with_gtk2} \ %{?_with_gtk3} \ - %{?_with_qt} \ --disable-warnings-as-errors # Remove rpath. It's prohibited in Fedora[1] and anyway we don't need it (and @@ -223,11 +223,15 @@ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -%if %{with gtk3} || %{with gtk2} +# %if %{with gtk3} || %{with gtk2} +# # Change the program name for 'alternatives' +# mv %{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark-gtk +# %endif +%if %{with qt} # Change the program name for 'alternatives' -mv %{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark-gtk +mv %{buildroot}%{_bindir}/wireshark %{buildroot}%{_bindir}/wireshark-qt %endif -%if %{with gtk2} || %{with gtk3} || %{with qt} +%if %{with qt} || %{with gtk2} || %{with gtk3} # Create the 'alternative' file touch %{buildroot}%{_bindir}/wireshark make DESTDIR=$RPM_BUILD_ROOT install_desktop_files @@ -261,39 +265,39 @@ fi %postun -p /sbin/ldconfig -%if %{with gtk2} || %{with gtk3} -%post gnome +%if %{with qt} +%post qt update-desktop-database &> /dev/null ||: update-mime-database /usr/share/mime &> /dev/null || : touch --no-create /usr/share/icons/hicolor &>/dev/null || : /usr/sbin/update-alternatives --install %{_bindir}/wireshark \ - %{name} %{_bindir}/wireshark-gtk 50 + %{name} %{_bindir}/wireshark-qt 50 -%postun gnome +%postun qt update-desktop-database &> /dev/null ||: update-mime-database /usr/share/mime &> /dev/null || : if [ $1 -eq 0 ] ; then touch --no-create /usr/share/icons/hicolor &>/dev/null || : gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : - /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-gtk + /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-qt fi %endif -%if %{with qt} -%post qt +%if %{with gtk2} || %{with gtk3} +%post gnome update-desktop-database &> /dev/null ||: update-mime-database /usr/share/mime &> /dev/null || : touch --no-create /usr/share/icons/hicolor &>/dev/null || : /usr/sbin/update-alternatives --install %{_bindir}/wireshark \ - %{name} %{_bindir}/wireshark-qt 10 + %{name} %{_bindir}/wireshark-gtk 10 -%postun qt +%postun gnome update-desktop-database &> /dev/null ||: update-mime-database /usr/share/mime &> /dev/null || : if [ $1 -eq 0 ] ; then touch --no-create /usr/share/icons/hicolor &>/dev/null || : gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : - /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-qt + /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-gtk fi %endif @@ -346,31 +350,35 @@ gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : %{_mandir}/man4/* %{_datadir}/wireshark -%if %{with gtk2} || %{with gtk3} -%files gnome +%if %{with qt} +%files qt %defattr(-,root,root) /usr/share/applications/wireshark.desktop /usr/share/icons/hicolor/*/apps/* /usr/share/icons/hicolor/*/mimetypes/* /usr/share/mime/packages/wireshark.xml -%{_bindir}/wireshark-gtk +%{_bindir}/wireshark-qt %{_mandir}/man1/wireshark.* %ghost %{_bindir}/wireshark %endif -%if %{with qt} -%files qt +%if %{with gtk2} || %{with gtk3} +%files gnome %defattr(-,root,root) /usr/share/applications/wireshark.desktop /usr/share/icons/hicolor/*/apps/* /usr/share/icons/hicolor/*/mimetypes/* /usr/share/mime/packages/wireshark.xml -%{_bindir}/wireshark-qt +%{_bindir}/wireshark-gtk %{_mandir}/man1/wireshark.* %ghost %{_bindir}/wireshark %endif %changelog +* Fri Aug 29 2014 Gerald Combs +- The Qt UI is now the default. Update logic and prioritization to + reflect this. + * Mon Aug 4 2014 Jeff Morriss - Fix RPM builds with a prefix other than /usr: The location of update-alternatives does not depend on Wireshark's installation prefix: -- cgit v1.2.3