Accepting request 458840 from network:utilities

1

OBS-URL: https://build.opensuse.org/request/show/458840
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wireshark?expand=0&rev=120
This commit is contained in:
Dominique Leuenberger 2017-02-19 00:04:22 +00:00 committed by Git OBS Bridge
commit c28cd294f5
2 changed files with 29 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 14 15:31:44 UTC 2017 - tchvatal@suse.com
- Disable gnutls on SLE11 as we are unable to meet the gnutls
requirements there
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 24 21:21:42 UTC 2017 - astieger@suse.com Tue Jan 24 21:21:42 UTC 2017 - astieger@suse.com

View File

@ -25,10 +25,12 @@
%define use_caps 0 %define use_caps 0
# Enable new Qt gui on new releases and build old GTK2 gui on old releases # Enable new Qt gui on new releases and build old GTK2 gui on old releases
%if 0%{?suse_version} > 1140 %if 0%{?suse_version} > 1140
%bcond_without gnutls
%bcond_without qt %bcond_without qt
%bcond_with gtk %bcond_with gtk
%bcond_without geoip %bcond_without geoip
%else %else
%bcond_with gnutls
%bcond_with qt %bcond_with qt
%bcond_without gtk %bcond_without gtk
%bcond_with geoip %bcond_with geoip
@ -56,7 +58,6 @@ BuildRequires: hicolor-icon-theme
BuildRequires: krb5-devel BuildRequires: krb5-devel
BuildRequires: libcares-devel BuildRequires: libcares-devel
BuildRequires: libgcrypt-devel >= 1.1.92 BuildRequires: libgcrypt-devel >= 1.1.92
BuildRequires: libgnutls-devel >= 2.12.0
BuildRequires: libpcap-devel BuildRequires: libpcap-devel
BuildRequires: libsmi-devel BuildRequires: libsmi-devel
BuildRequires: libtool BuildRequires: libtool
@ -74,6 +75,9 @@ Recommends: wireshark-ui = %{version}
Provides: ethereal = %{version} Provides: ethereal = %{version}
Obsoletes: ethereal < %{version} Obsoletes: ethereal < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with gnutls}
BuildRequires: libgnutls-devel >= 2.12.0
%endif
%if !0%{use_caps} %if !0%{use_caps}
Requires: xdg-utils Requires: xdg-utils
%else %else
@ -84,10 +88,6 @@ Requires(pre): permissions
BuildRequires: GeoIP-devel BuildRequires: GeoIP-devel
Recommends: GeoIP Recommends: GeoIP
%endif %endif
%if 0%{?suse_version} < 1140
# GNUTLS 3.0 has incompatible license, yet 3.1 is fine
BuildConflicts: libgnutls-devel >= 3.0.0
%endif
%if 0%{?suse_version} > 1310 %if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-3.0)
%endif %endif
@ -238,7 +238,11 @@ export PATH="%{_libdir}/qt5/bin:$PATH"
--with-qt=no \ --with-qt=no \
%endif %endif
--with-ssl \ --with-ssl \
%if %{with gnutls}
--with-gnutls=yes \ --with-gnutls=yes \
%else
--with-gnutls=no \
%endif
--with-gcrypt=yes \ --with-gcrypt=yes \
--with-plugins=%{_libdir}/%{name}/plugins/%{version} \ --with-plugins=%{_libdir}/%{name}/plugins/%{version} \
--with-pic=yes --with-pic=yes
@ -246,7 +250,7 @@ export PATH="%{_libdir}/qt5/bin:$PATH"
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
%install %install
make %{?_smp_mflags} DESTDIR=%{buildroot} install %make_install
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
rm -rf %{buildroot}%{_datadir}/%{name}/COPYING rm -rf %{buildroot}%{_datadir}/%{name}/COPYING
@ -263,11 +267,15 @@ ln -fs tshark %{buildroot}%{_bindir}/tethereal
install -d -m 0755 %{buildroot}%{_sysconfdir} install -d -m 0755 %{buildroot}%{_sysconfdir}
install -d -m 0755 %{buildroot}%{_mandir}/man1/ install -d -m 0755 %{buildroot}%{_mandir}/man1/
# install separate appdata files corresponding to .desktop files for AppStore integration # install separate appdata files corresponding to .desktop files for AppStore integration
%if %{with qt}
install -d -m0755 %{buildroot}%{_datadir}/appdata install -d -m0755 %{buildroot}%{_datadir}/appdata
install -m644 wireshark.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml install -m644 wireshark.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
sed -i -e "/<description>/i \ \ \ \ <name>Wireshark (QT) Network Analyzer<\/name>" \ sed -i -e "/<description>/i \ \ \ \ <name>Wireshark (QT) Network Analyzer<\/name>" \
-e "/<description>/i \ \ \ \ <summary>QT interface for wireshark network traffic analyzer<\/summary>" \ -e "/<description>/i \ \ \ \ <summary>QT interface for wireshark network traffic analyzer<\/summary>" \
%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
%else
rm -f %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
%endif
# -devel # -devel
install -d -m 0755 %{buildroot}%{_includedir}/wireshark install -d -m 0755 %{buildroot}%{_includedir}/wireshark
@ -293,7 +301,7 @@ install -m 644 wsutil/*.h "${IDIR}/wsutil"
%if %{with gtk} %if %{with gtk}
install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark-gtk.png install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark-gtk.png
install -D -m 0644 wireshark-gtk.desktop %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop install -D -m 0644 wireshark-gtk.desktop %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
%suse_update_desktop_file %{name}-gtk %suse_update_desktop_file -n %{name}-gtk
%else %else
# sometimes the gtk.desktop gets autoinstalled by make_install # sometimes the gtk.desktop gets autoinstalled by make_install
rm -f %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop rm -f %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
@ -303,6 +311,8 @@ rm -f %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark.png install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark.png
install -D -m 0644 wireshark.desktop %{buildroot}%{_datadir}/applications/wireshark.desktop install -D -m 0644 wireshark.desktop %{buildroot}%{_datadir}/applications/wireshark.desktop
%suse_update_desktop_file %{name} %suse_update_desktop_file %{name}
%else
rm -f %{buildroot}%{_datadir}/applications/wireshark.desktop
%endif %endif
%if %{use_caps} %if %{use_caps}
@ -310,13 +320,13 @@ install -D -m 0644 wireshark.desktop %{buildroot}%{_datadir}/applications/wiresh
getent group wireshark >/dev/null || groupadd -r wireshark getent group wireshark >/dev/null || groupadd -r wireshark
%verifyscript %verifyscript
%{verify_permissions -e %_bindir/dumpcap} %{verify_permissions -e %{_bindir}/dumpcap}
%endif %endif
%post %post
%if %{use_caps} %if %{use_caps}
%if 0%{?set_permissions:1} > 0 %if 0%{?set_permissions:1} > 0
%set_permissions %_bindir/dumpcap %set_permissions %{_bindir}/dumpcap
%else %else
%run_permissions %run_permissions
%endif %endif
@ -389,19 +399,18 @@ exit 0
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/wireshark-gtk %{_bindir}/wireshark-gtk
%{_bindir}/ethereal %{_bindir}/ethereal
%{_datadir}/appdata/wireshark-gtk.appdata.xml
%{_datadir}/applications/wireshark-gtk.desktop %{_datadir}/applications/wireshark-gtk.desktop
%{_datadir}/pixmaps/wireshark-gtk.png %{_datadir}/pixmaps/wireshark-gtk.png
%post ui-gtk %post ui-gtk
test -f /usr/bin/update-mime-database && /usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : test -f %{_bindir}/update-mime-database && %{_bindir}/update-mime-database %{_datadir}/mime > /dev/null || :
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || : test -f %{_bindir}/update-desktop-database && %{_bindir}/update-desktop-database > /dev/null || :
test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || : test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || :
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || : test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
%postun ui-gtk %postun ui-gtk
test -f /usr/bin/update-mime-database && /usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : test -f %{_bindir}/update-mime-database && %{_bindir}/update-mime-database %{_datadir}/mime > /dev/null || :
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || : test -f %{_bindir}/update-desktop-database && %{_bindir}/update-desktop-database > /dev/null || :
test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || : test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || :
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || : test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
%endif %endif