]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression fix: upgrade existing icons
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Mar 2011 14:00:41 +0000 (03:00 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Mar 2011 14:00:41 +0000 (03:00 +1300)
This adds an automatic upgrade to move the old pre-3.2.0.5 icons into the
new icons area.
This also retains any local customizations that may have been done,
ie. new icons added outside Squid.

src/Makefile.am

index 7201d834d4677f03c98a0e481ed7c54c7b289127..c95b39ca49e2bbb4297fffbfae6c6a1595e41ebf 100644 (file)
@@ -913,7 +913,19 @@ man_MANS = squid.8
 EXTRA_DIST += squid.8.in
 CLEANFILES += squid.8
 
-install-data-local: install-sysconfDATA install-dataDATA
+## check for existing Squid icons (used to be $datadir/icons).
+## move them into the new icons location so we dont break anyones existing mime.conf
+mimeconf-Upgrade-Shuffle:
+       @if test -d $(DESTDIR)$(datadir)/icons; then \
+         mv $(DESTDIR)$(datadir)/icons/* $(DESTDIR)$(DEFAULT_ICON_DIR)/; \
+         $(RM) -r $(DESTDIR)$(datadir)/icons; \
+         echo "NOTICE: "; \
+         echo "NOTICE: The Squid icons have been upgraded. Please update your $(DESTDIR)$(DEFAULT_MIME_TABLE)." ; \
+         echo "NOTICE: $(DESTDIR)$(DEFAULT_MIME_TABLE).default contains the new icon configuration." ; \
+         echo "NOTICE: "; \
+       fi
+
+install-data-local: install-sysconfDATA install-dataDATA mimeconf-Upgrade-Shuffle
        @if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \
          echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_MIME_TABLE)" ; \
        else \