Skip to content

Commit

Permalink
Merge branch 'packaging' of https://github.com/terrycloth/ivy into te…
Browse files Browse the repository at this point in the history
…rrycloth-packaging
  • Loading branch information
lehitoskin committed Feb 14, 2017
2 parents 39ff2cb + 3a85665 commit 03335de
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
36 changes: 18 additions & 18 deletions Makefile.posix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DESTDIR = /usr/local
DOCDIR = $(DESTDIR)/share/doc/ivy-2.1.2
MANDIR = $(DESTDIR)/share/man/man1
DOCDIR = "$(DESTDIR)/share/doc/ivy-2.1.2"
MANDIR = "$(DESTDIR)/share/man/man1"

RACO = raco
RFLAGS = --vv --gui
Expand All @@ -15,26 +15,26 @@ MANPAGES = doc/ivy.1.bz2
all: ivy-bin

ivy-bin: $(SOURCES)
${RACO} exe $(RFLAGS) -o $(BINARY) $(MAIN)
"${RACO}" exe $(RFLAGS) -o "$(BINARY)" "$(MAIN)"

install: $(BINARY) ivy-image-viewer.desktop $(IMAGES) $(MANPAGES)
mkdir -pv $(DESTDIR)/bin
mkdir -pv $(DESTDIR)/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,scalable}/apps
mkdir -pv $(DESTDIR)/share/applications
mkdir -pv "$(DESTDIR)/bin"
mkdir -pv "$(DESTDIR)/share/icons/hicolor/"{16x16,32x32,48x48,64x64,128x128,256x256,512x512,scalable}/apps
mkdir -pv "$(DESTDIR)/share/applications"
mkdir -pv $(MANDIR)
mkdir -pv $(DOCDIR)
sed "s:# Icon=/PATH/TO/ICON.png:Icon=$(DESTDIR)/share/icons/hicolor/128x128/apps/ivy-logo-128px.png:" ivy-image-viewer.desktop >$(DESTDIR)/share/applications/ivy-image-viewer.desktop
sed -i "s:# Exec=/PATH/TO/EXECUTABLE:Exec=$(DESTDIR)/bin/ivy:" $(DESTDIR)/share/applications/ivy-image-viewer.desktop
chmod 0755 $(DESTDIR)/share/applications/ivy-image-viewer.desktop
install -m 0755 ivy $(DESTDIR)/bin
install -m 0644 img/ivy-logo-16px.png $(DESTDIR)/share/icons/hicolor/16x16/apps
install -m 0644 img/ivy-logo-32px.png $(DESTDIR)/share/icons/hicolor/32x32/apps
install -m 0644 img/ivy-logo-48px.png $(DESTDIR)/share/icons/hicolor/48x48/apps
install -m 0644 img/ivy-logo-64px.png $(DESTDIR)/share/icons/hicolor/64x64/apps
install -m 0644 img/ivy-logo-128px.png $(DESTDIR)/share/icons/hicolor/128x128/apps
install -m 0644 img/ivy-logo-256px.png $(DESTDIR)/share/icons/hicolor/256x256/apps
install -m 0644 img/ivy-logo-512px.png $(DESTDIR)/share/icons/hicolor/512x512/apps
install -m 0644 img/ivy-logo.svg $(DESTDIR)/share/icons/hicolor/scalable/apps
sed "s:# Icon = /PATH/TO/ICON.png:Icon = $(DESTDIR)/share/icons/hicolor/128x128/apps/ivy-logo-128px.png:" ivy-image-viewer.desktop > "$(DESTDIR)/share/applications/ivy-image-viewer.desktop"
sed -i "s:# Exec = /PATH/TO/EXECUTABLE:Exec = $(DESTDIR)/bin/ivy:" "$(DESTDIR)/share/applications/ivy-image-viewer.desktop"
chmod 0755 "$(DESTDIR)/share/applications/ivy-image-viewer.desktop"
install -m 0755 ivy "$(DESTDIR)/bin"
install -m 0644 img/ivy-logo-16px.png "$(DESTDIR)/share/icons/hicolor/16x16/apps"
install -m 0644 img/ivy-logo-32px.png "$(DESTDIR)/share/icons/hicolor/32x32/apps"
install -m 0644 img/ivy-logo-48px.png "$(DESTDIR)/share/icons/hicolor/48x48/apps"
install -m 0644 img/ivy-logo-64px.png "$(DESTDIR)/share/icons/hicolor/64x64/apps"
install -m 0644 img/ivy-logo-128px.png "$(DESTDIR)/share/icons/hicolor/128x128/apps"
install -m 0644 img/ivy-logo-256px.png "$(DESTDIR)/share/icons/hicolor/256x256/apps"
install -m 0644 img/ivy-logo-512px.png "$(DESTDIR)/share/icons/hicolor/512x512/apps"
install -m 0644 img/ivy-logo.svg "$(DESTDIR)/share/icons/hicolor/scalable/apps"
install -m 0644 doc/ivy.1.bz2 $(MANDIR)
install -m 0644 doc/ivy.md doc/ivy.html README.md $(DOCDIR)

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ sudo make install
You may change the DESTDIR variable to install ivy to an arbitrary location -
one that may not require super user privileges.

We provide a .desktop file, which will add Ivy to your desktop application menu.
If you installed to a nonstandard location, you may need to copy
`ivy-image-viewer.desktop` to `~/.local/share/applications/`, and edit the the
paths for the `Exec` and `Icon` lines. You may need to log out and log back in
before your app menu will notice the new entry.

Or on Windows:

``` bash
Expand Down
26 changes: 17 additions & 9 deletions ivy-image-viewer.desktop
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
[Desktop Entry]
Name=Ivy Image Viewer
Type=Application
Encoding=UTF-8
Comment=A taggable image browser written in Racket
Categories=Graphics;2DGraphics;RasterGraphics;Viewer;
# Use the full, absolute path.
# Icon=/PATH/TO/ICON.png
# Exec=/PATH/TO/EXECUTABLE
Terminal=false
Type = Application
Encoding = UTF-8
Version = 1.1

Name = Ivy
GenericName = image viewer
GenericName[en_US] = image viewer
Comment = image viewer, metadata editor, and collection manager
Comment[en_US] = image viewer, metadata editor, and collection manager

Categories = Graphics; 2DGraphics; VectorGraphics; RasterGraphics; Viewer;
Keywords = image; metadata; viewer;
MimeType = image/bmp; image/flif; image/gif; image/jpeg; image/png; image/svg+xml; image/x‑xbitmap; image/x‑xpixmap;
# Icon = /PATH/TO/ICON.png
# Exec = /PATH/TO/EXECUTABLE %u
Terminal = false
StartupNotify = true

0 comments on commit 03335de

Please sign in to comment.