From ecf4884564e570a96d21d9cb637a903311e73b02 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 15 Nov 2017 10:43:48 +0100 Subject: [PATCH] hdspconf: move .desktop and icon files to desktop, use modern destination for icons Signed-off-by: Jaroslav Kysela --- .gitignore | 1 + hdspconf/Makefile.am | 7 ++-- hdspconf/configure.ac | 2 +- hdspconf/desktop/Makefile.am | 34 ++++++++++++++++++ hdspconf/{ => desktop}/hdspconf.desktop | 0 .../hicolor_apps_48x48_hdspconf.png} | Bin hdspconf/pixmaps/Makefile.am | 5 +-- 7 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 hdspconf/desktop/Makefile.am rename hdspconf/{ => desktop}/hdspconf.desktop (100%) rename hdspconf/{pixmaps/hdspconf.png => desktop/hicolor_apps_48x48_hdspconf.png} (100%) diff --git a/.gitignore b/.gitignore index f765810..57c5d65 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ hdspconf/configure hdspconf/src/hdspconf hdspconf/src/Makefile hdspconf/pixmaps/Makefile +hdspconf/desktop/Makefile hdspmixer/Makefile hdspmixer/configure hdspmixer/src/hdspmixer diff --git a/hdspconf/Makefile.am b/hdspconf/Makefile.am index e4a4bd8..3fdfb34 100644 --- a/hdspconf/Makefile.am +++ b/hdspconf/Makefile.am @@ -1,8 +1,5 @@ -EXTRA_DIST = gitcompile hdspconf.desktop depcomp -SUBDIRS = src pixmaps - -desktopdir = $(DESKTOP_DIR) -desktop_DATA = hdspconf.desktop +EXTRA_DIST = gitcompile depcomp +SUBDIRS = src pixmaps desktop alsa-dist: distdir @rm -rf ../distdir/hdspconf diff --git a/hdspconf/configure.ac b/hdspconf/configure.ac index f0b0c95..e11d481 100644 --- a/hdspconf/configure.ac +++ b/hdspconf/configure.ac @@ -39,4 +39,4 @@ FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags` CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS" LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS" -AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile) +AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile desktop/Makefile) diff --git a/hdspconf/desktop/Makefile.am b/hdspconf/desktop/Makefile.am new file mode 100644 index 0000000..c143498 --- /dev/null +++ b/hdspconf/desktop/Makefile.am @@ -0,0 +1,34 @@ +APPNAME = hdspconf + +desktopdir = $(datadir)/applications +desktop_DATA = $(APPNAME).desktop + +public_icons = \ + hicolor_apps_48x48_$(APPNAME).png + +EXTRA_DIST = \ + $(public_icons) \ + $(desktop_DATA) + +install-icons: + for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ + $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done + +uninstall-icons: + -for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done + +install-data-local: install-icons + +uninstall-local: uninstall-icons diff --git a/hdspconf/hdspconf.desktop b/hdspconf/desktop/hdspconf.desktop similarity index 100% rename from hdspconf/hdspconf.desktop rename to hdspconf/desktop/hdspconf.desktop diff --git a/hdspconf/pixmaps/hdspconf.png b/hdspconf/desktop/hicolor_apps_48x48_hdspconf.png similarity index 100% rename from hdspconf/pixmaps/hdspconf.png rename to hdspconf/desktop/hicolor_apps_48x48_hdspconf.png diff --git a/hdspconf/pixmaps/Makefile.am b/hdspconf/pixmaps/Makefile.am index d8b3822..7278f3b 100644 --- a/hdspconf/pixmaps/Makefile.am +++ b/hdspconf/pixmaps/Makefile.am @@ -1,4 +1 @@ -pixmapdir = $(PIXMAP_DIR) -pixmap_DATA = hdspconf.png - -EXTRA_DIST = $(wildcard *.xpm) hdspconf.png +EXTRA_DIST = $(wildcard *.xpm) -- 2.47.1