hdajackretask: add .desktop and icon files
authorJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 08:55:15 +0000 (09:55 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 09:34:16 +0000 (10:34 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

.gitignore
hdajackretask/Makefile.am
hdajackretask/configure.ac
hdajackretask/desktop/Makefile.am [new file with mode: 0644]
hdajackretask/desktop/hdajackretask.desktop [new file with mode: 0644]
hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png [new file with mode: 0644]
hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png [new file with mode: 0644]
hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png [new file with mode: 0644]

index 120b234..c5debca 100644 (file)
@@ -123,6 +123,7 @@ hdajackretask/configure
 hdajackretask/Makefile
 hdajackretask/README.generated.h
 hdajackretask/hdajackretask
+hdajackretask/desktop/Makefile
 hdajacksensetest/Makefile
 hdajacksensetest/configure
 hdajacksensetest/hdajacksensetest
index e313159..a9f0a67 100644 (file)
@@ -1,3 +1,4 @@
+SUBDIRS = desktop
 EXTRA_DIST = gitcompile README
 AM_CFLAGS = @GTK3_CFLAGS@ -Wno-deprecated-declarations
 bin_PROGRAMS = hdajackretask
@@ -21,4 +22,3 @@ alsa-dist: distdir
        @mkdir -p ../distdir/hdajackretask
        @cp -RLpv $(distdir)/* ../distdir/hdajackretask
        @rm -rf $(distdir)
-
index 050c731..f836306 100644 (file)
@@ -8,4 +8,4 @@ AC_HEADER_STDC
 
 PKG_CHECK_MODULES(GTK3, gtk+-3.0)
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile desktop/Makefile)
diff --git a/hdajackretask/desktop/Makefile.am b/hdajackretask/desktop/Makefile.am
new file mode 100644 (file)
index 0000000..263d892
--- /dev/null
@@ -0,0 +1,36 @@
+APPNAME = hdajackretask
+
+desktopdir = $(datadir)/applications
+desktop_DATA = $(APPNAME).desktop
+
+public_icons = \
+       hicolor_apps_48x48_$(APPNAME).png \
+       hicolor_apps_128x128_$(APPNAME).png \
+       hicolor_apps_256x256_$(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/hdajackretask/desktop/hdajackretask.desktop b/hdajackretask/desktop/hdajackretask.desktop
new file mode 100644 (file)
index 0000000..f45ba06
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=HDAJackRetask
+GenericName=Retask the audio jacks for the HDA sound driver
+Exec=hdajackretask
+Terminal=false
+Type=Application
+Categories=AudioVideo;
+Version=0.9.4
diff --git a/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png
new file mode 100644 (file)
index 0000000..b95d433
Binary files /dev/null and b/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png differ
diff --git a/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png
new file mode 100644 (file)
index 0000000..686215f
Binary files /dev/null and b/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png differ
diff --git a/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png
new file mode 100644 (file)
index 0000000..875456c
Binary files /dev/null and b/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png differ