On Thu, Jul 17, 2014 at 11:56:24PM +0100, Stuart Henderson wrote: > On 2014/07/17 22:23, Fabian Raetz wrote: > > Hi, > > > > I would like to see a wireshark.desktop file and icons added. > > > > Initial inspiration based on the archlinux package. > > https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/wireshark > > > > Comments? > > For ease of future maintenance (for example if upstream move > files around in their source tree), I'd prefer to use the provided > install_desktop_files target rather than having all of this in > post-install. > > They install to wrong directories but these can simply be dealt with > by mv'ing into place in post-install using wildcards (which is easier > to maintain than patching Makefile.in). > Hey Stuart,
i cooked a new patch based on your feedback, but not without patching Makefile.in :( More Feedback welcome. Not related to this patch but i had some old libkrb libs lying around o0 and they got picked up by wireshark ... would it be a good idea to explicitly disable krb in the Makefile? Index: Makefile =================================================================== RCS file: /cvs/ports/net/wireshark/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- Makefile 14 Jul 2014 08:54:29 -0000 1.2 +++ Makefile 18 Jul 2014 19:07:28 -0000 @@ -4,6 +4,7 @@ COMMENT-main = graphical network protoco COMMENT-text = network protocol analyzer WVER = 1.10.8 +REVISION-main = 0 DISTNAME = wireshark-${WVER} PKGNAME-main = wireshark-${WVER} PKGNAME-text = tshark-${WVER} @@ -48,6 +49,9 @@ SUBST_VARS = WVER BUILD_DEPENDS += devel/xdg-utils RUN_DEPENDS += devel/xdg-utils +RUN_DEPENDS-main += devel/desktop-file-utils \ + misc/shared-mime-info \ + x11/gtk+2,-guic LIB_DEPENDS = LIB_DEPENDS-text = ${LIB_DEPENDS} \ @@ -79,7 +83,10 @@ CONFIGURE_ENV = CPPFLAGS="-DGDK_VERSION_ NO_TEST = Yes +INSTALL_TARGET = install install_desktop_files + post-install: @find ${PREFIX}/lib/wireshark -name '*.la' -print0 | xargs -r0 rm + mv ${WRKINST}/usr/share/{applications,icons,mime} ${PREFIX}/share .include <bsd.port.mk> Index: patches/patch-Makefile_in =================================================================== RCS file: patches/patch-Makefile_in diff -N patches/patch-Makefile_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-Makefile_in 18 Jul 2014 19:07:28 -0000 @@ -0,0 +1,30 @@ +$OpenBSD$ + +- install(1) has no -T option +- use $(srcdir) because of SEPARATE_BUILD + +--- Makefile.in.orig Thu Jun 12 23:08:29 2014 ++++ Makefile.in Fri Jul 18 19:38:46 2014 +@@ -4207,17 +4207,17 @@ patch-bzip2: distdir + # to install this stuff... + install_desktop_files: + mkdir -p $(DESTDIR)/usr/share/{mime/packages,applications} +- install -m 644 -T wireshark-mime-package.xml $(DESTDIR)/usr/share/mime/packages/wireshark.xml ++ install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)/usr/share/mime/packages/wireshark.xml + if test x$(DESKTOP_FILE_INSTALL) != x ; then \ +- $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)/usr/share/applications wireshark.desktop; \ ++ $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)/usr/share/applications $(srcdir)/wireshark.desktop; \ + else \ +- install -m 644 -T wireshark.desktop $(DESTDIR)/usr/share/applications/wireshark.desktop; \ ++ install -m 644 $(srcdir)/wireshark.desktop $(DESTDIR)/usr/share/applications/wireshark.desktop; \ + fi + for size in 16 24 32 48 64 128 256; \ + do \ + mkdir -p $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/{apps,mimetypes} ; \ +- install -m 644 image/wsicon$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \ +- install -m 644 -T image/WiresharkDoc-$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \ ++ install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \ ++ install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \ + done + @echo "Don't forget to run \"update-desktop-database\" and \"update-mime-database /usr/share/mime\"" + Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/net/wireshark/pkg/PLIST-main,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST-main --- pkg/PLIST-main 14 Jul 2014 08:44:51 -0000 1.1.1.1 +++ pkg/PLIST-main 18 Jul 2014 19:07:28 -0000 @@ -1,4 +1,52 @@ @comment $OpenBSD: PLIST-main,v 1.1.1.1 2014/07/14 08:44:51 landry Exp $ @bin bin/wireshark @man man/man1/wireshark.1 +share/applications/ +share/applications/wireshark.desktop share/doc/pkg-readmes/${FULLPKGNAME} +share/icons/ +share/icons/hicolor/ +share/icons/hicolor/128x128/ +share/icons/hicolor/128x128/apps/ +share/icons/hicolor/128x128/apps/wireshark.png +share/icons/hicolor/128x128/mimetypes/ +share/icons/hicolor/128x128/mimetypes/application-wireshark-doc.png +share/icons/hicolor/16x16/ +share/icons/hicolor/16x16/apps/ +share/icons/hicolor/16x16/apps/wireshark.png +share/icons/hicolor/16x16/mimetypes/ +share/icons/hicolor/16x16/mimetypes/application-wireshark-doc.png +share/icons/hicolor/24x24/ +share/icons/hicolor/24x24/apps/ +share/icons/hicolor/24x24/apps/wireshark.png +share/icons/hicolor/24x24/mimetypes/ +share/icons/hicolor/24x24/mimetypes/application-wireshark-doc.png +share/icons/hicolor/256x256/ +share/icons/hicolor/256x256/apps/ +share/icons/hicolor/256x256/apps/wireshark.png +share/icons/hicolor/256x256/mimetypes/ +share/icons/hicolor/256x256/mimetypes/application-wireshark-doc.png +share/icons/hicolor/32x32/ +share/icons/hicolor/32x32/apps/ +share/icons/hicolor/32x32/apps/wireshark.png +share/icons/hicolor/32x32/mimetypes/ +share/icons/hicolor/32x32/mimetypes/application-wireshark-doc.png +share/icons/hicolor/48x48/ +share/icons/hicolor/48x48/apps/ +share/icons/hicolor/48x48/apps/wireshark.png +share/icons/hicolor/48x48/mimetypes/ +share/icons/hicolor/48x48/mimetypes/application-wireshark-doc.png +share/icons/hicolor/64x64/ +share/icons/hicolor/64x64/apps/ +share/icons/hicolor/64x64/apps/wireshark.png +share/icons/hicolor/64x64/mimetypes/ +share/icons/hicolor/64x64/mimetypes/application-wireshark-doc.png +share/mime/ +share/mime/packages/ +share/mime/packages/wireshark.xml +@exec %D/bin/update-desktop-database +@unexec-delete %D/bin/update-desktop-database +@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor +@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor +@exec %D/bin/update-mime-database %D/share/mime +@unexec-delete %D/bin/update-mime-database %D/share/mime