diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | config.mk | 1 | ||||
-rw-r--r-- | share/applications/Makefile | 24 | ||||
-rw-r--r-- | share/applications/feh.pre | 10 |
6 files changed, 53 insertions, 3 deletions
@@ -1,3 +1,4 @@ +/share/applications/*.desktop /src/deps.mk /src/*.o /src/*.inc @@ -1,6 +1,8 @@ git HEAD * Add --keep-zoom-vp option to keep zoom and offsets when switching images (patch by sdaau). Press 'k' to toggle it. + * Add --sort mtime option (patch by guns) + * Add a desktop file (installed to share/applications/feh.desktop) Mon, 24 Dec 2012 15:45:54 +0100 Daniel Friesel <derf+feh@finalrewind.org> @@ -1,6 +1,6 @@ include config.mk -all: build-src build-man +all: build-src build-man build-applications build-src: @${MAKE} -C src @@ -8,6 +8,9 @@ build-src: build-man: @${MAKE} -C man +build-applications: + @${MAKE} -C share/applications + test: all @PACKAGE=${PACKAGE} prove test @@ -16,7 +19,7 @@ test-x11: all prove test/feh-bg.i install: install-man install-doc install-bin install-font install-img -install: install-examples +install: install-examples install-applications install-man: @echo installing manuals to ${man_dir} @@ -57,12 +60,19 @@ install-examples: @cp examples/* ${example_dir} @chmod 644 ${example_dir}/* +install-applications: + @echo installing desktop file to ${desktop_dir} + @mkdir -p ${desktop_dir} + @cp share/applications/feh.desktop ${desktop_dir} + @chmod 644 ${desktop_dir}/feh.desktop + uninstall: rm -f ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1 rm -f ${man_dir}/man1/gen-cam-menu.1 rm -rf ${doc_dir} rm -f ${bin_dir}/feh ${bin_dir}/feh-cam ${bin_dir}/gen-cam-menu + rm -f ${desktop_dir}/feh.desktop rm -rf ${font_dir} rm -rf ${image_dir} @@ -86,6 +96,8 @@ disttest: dist clean: @${MAKE} -C src clean @${MAKE} -C man clean + @${MAKE} -C share/applications clean .PHONY: all test test-x11 install uninstall clean install-man install-doc \ - install-bin install-font install-img install-examples dist + install-bin install-font install-img install-examples \ + install-applications dist @@ -12,6 +12,7 @@ doc_dir = ${main_dir}/share/doc/feh image_dir = ${main_dir}/share/feh/images font_dir = ${main_dir}/share/feh/fonts example_dir = ${main_dir}/share/doc/feh/examples +desktop_dir = ${main_dir}/share/applications # default CFLAGS CFLAGS ?= -g -O2 diff --git a/share/applications/Makefile b/share/applications/Makefile new file mode 100644 index 0000000..5f4da44 --- /dev/null +++ b/share/applications/Makefile @@ -0,0 +1,24 @@ +include ../../config.mk + +SOURCES = ${shell echo *.pre} +TARGETS = ${SOURCES:.pre=.desktop} + +all: ${TARGETS} + +.pre.desktop: + sed \ + -e 's/\$$VERSION\$$/${VERSION}/g' \ + -e 's/\$$DATE\$$/'"$$(date '+%B %d, %Y')"/g \ + -e 's/\$$MAN_CURL\$$/${MAN_CURL}/' \ + -e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \ + -e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \ + -e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \ + -e 's:\$$IMAGEDIR\$$:${image_dir}:' \ + < ${@:.desktop=.pre} > $@ + +clean: + rm -f *.1 + +.SUFFIXES: .pre .desktop + +.PHONY: clean diff --git a/share/applications/feh.pre b/share/applications/feh.pre new file mode 100644 index 0000000..d7b22c7 --- /dev/null +++ b/share/applications/feh.pre @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Feh +Comment=Fast Imlib2-based Image Viewer +Exec=feh %f +Terminal=false +Type=Application +Icon=$IMAGEDIR$/logo.svg +Categories=Graphics;2DGraphics;Viewer; +MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap; +Name[en_US]=feh |