Don't do all the fd.o desktop integration stuff on OS X.

It doesn't need it, so don't install those files, or uninstall them, or
suggest running various unnecessary commands after the installation
finishes.

Change-Id: Ieecab22884723670f47f2fc7cc1ac827f48c1967
Reviewed-on: https://code.wireshark.org/review/5614
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2014-12-03 23:56:10 -08:00
parent 6e5d84f1e1
commit c02417f851
2 changed files with 22 additions and 0 deletions

View File

@ -1423,7 +1423,10 @@ patch-bzip2: distdir
# FreeBSD install command has a -T flag that takes an argument and
# that has completely different semantics.
#
# We neither need nor want any of this on OS X.
#
install-data-local:
if NOT_OS_X
mkdir -p $(DESTDIR)$(datadir)/mime/packages
install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
mkdir -p $(DESTDIR)$(datadir)/applications
@ -1441,8 +1444,10 @@ install-data-local:
done
mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
install -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
endif
uninstall-local:
if NOT_OS_X
rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
for size in 16 24 32 48 64 128 256; \
@ -1451,6 +1456,7 @@ uninstall-local:
rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
done
rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
endif
install-data-hook: update-databases-and-caches-install
uninstall-hook: update-databases-and-caches-uninstall
@ -1481,17 +1487,25 @@ uninstall-hook: update-databases-and-caches-uninstall
#
# The update-alternatives suggestions need work.
#
# We neither need nor want any of this on OS X.
#
update-databases-and-caches-common:
if NOT_OS_X
@echo "You may need to run \"ldconfig\" as root"
@echo "You may need to run \"update-desktop-database $(datadir)/applications\""
@echo "You may need to run \"update-mime-database $(datadir)/mime\""
@echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
endif
update-databases-and-caches-install: update-databases-and-caches-common
if NOT_OS_X
@echo "You may need to run \"update-alternatives --install $(bindir)/wireshark wireshark $(bindir)/wireshark-qt 50\""
endif
update-databases-and-caches-uninstall: update-databases-and-caches-common
if NOT_OS_X
@echo "You may need to run \"update-alternatives --remove wireshark $(bindir)/wireshark-qt\""
endif
# Used by svr4-package and osx-package
# We load top_stagedir with an absolute path so that libtool doesn't freak.

View File

@ -808,6 +808,14 @@ else
fi
AC_SUBST(HAVE_OSX_PACKAGING)
#
# Use this as a proxy for "is this OS X" (just in case somebody actually
# built and installed Darwin as an OS, perhaps with some X11-based GUI,
# don't look for Darwin).
#
AC_CHECK_PROG(have_sw_vers, sw_vers, "yes", "no")
AM_CONDITIONAL(NOT_OS_X, test "x$have_sw_vers" = "xno")
#
# Some compilers have to be told to fail when passed an unknown -W flag;
# make sure we do that.