echomixer: add .desktop and icon files
authorJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 10:05:11 +0000 (11:05 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 10:15:27 +0000 (11:15 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

echomixer/Makefile.am
echomixer/configure.ac
echomixer/desktop/Makefile.am [new file with mode: 0644]
echomixer/desktop/echomixer.desktop [new file with mode: 0644]
echomixer/desktop/hicolor_apps_48x48_echomixer.png [new file with mode: 0644]

index ee08822..beae8fc 100644 (file)
@@ -1,3 +1,4 @@
+SUBDIRS = desktop
 AM_CFLAGS = @ECHOMIXER_CFLAGS@
 bin_PROGRAMS = echomixer
 man_MANS = 
index 769c829..c360442 100644 (file)
@@ -7,4 +7,4 @@ AM_MAINTAINER_MODE([enable])
 
 PKG_CHECK_MODULES(ECHOMIXER, gtk+-2.0 alsa >= 1.0.0)
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile desktop/Makefile)
diff --git a/echomixer/desktop/Makefile.am b/echomixer/desktop/Makefile.am
new file mode 100644 (file)
index 0000000..3314702
--- /dev/null
@@ -0,0 +1,34 @@
+APPNAME = echomixer
+
+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/echomixer/desktop/echomixer.desktop b/echomixer/desktop/echomixer.desktop
new file mode 100644 (file)
index 0000000..80753f9
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Echomixer
+GenericName=Control Echo Digital Audio sound cards
+Comment=Mixer and GUI control utility for Echo Digital Audio sound cards
+Exec=echomixer
+Icon=echomixer
+Terminal=false
+Type=Application
+Categories=AudioVideo;
+Version=0.9.4
diff --git a/echomixer/desktop/hicolor_apps_48x48_echomixer.png b/echomixer/desktop/hicolor_apps_48x48_echomixer.png
new file mode 100644 (file)
index 0000000..48c4b92
Binary files /dev/null and b/echomixer/desktop/hicolor_apps_48x48_echomixer.png differ