Skip to content

Commit

Permalink
desktop file: Add prefix to path (bug 1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Mar 4, 2014
1 parent ad6523b commit b5d4999
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/gpo
Expand Up @@ -102,6 +102,8 @@ gpodder_script = sys.argv[0]
if os.path.islink(gpodder_script):
gpodder_script = os.readlink(gpodder_script)
gpodder_dir = os.path.join(os.path.dirname(gpodder_script), '..')
# TODO: Read parent directory links as well (/bin -> /usr/bin, like on Fedora, see Bug #1618)
# This would allow /usr/share/gpodder/ (not /share/gpodder/) to be found from /bin/gpodder
prefix = os.path.abspath(os.path.normpath(gpodder_dir))

src_dir = os.path.join(prefix, 'src')
Expand Down
5 changes: 4 additions & 1 deletion makefile
Expand Up @@ -26,6 +26,7 @@ GPODDER_SERVICE_FILE=share/dbus-1/services/org.gpodder.service
GPODDER_SERVICE_FILE_IN=$(addsuffix .in,$(GPODDER_SERVICE_FILE))

GPODDER_DESKTOP_FILE=share/applications/gpodder.desktop
GPODDER_DESKTOP_FILE_TMP=$(addsuffix .tmp,$(GPODDER_DESKTOP_FILE))
GPODDER_DESKTOP_FILE_IN=$(addsuffix .in,$(GPODDER_DESKTOP_FILE))
GPODDER_DESKTOP_FILE_H=$(addsuffix .h,$(GPODDER_DESKTOP_FILE_IN))

Expand Down Expand Up @@ -80,7 +81,9 @@ $(GPODDER_SERVICE_FILE): $(GPODDER_SERVICE_FILE_IN)
sed -e 's#__PREFIX__#$(PREFIX)#' $< >$@

$(GPODDER_DESKTOP_FILE): $(GPODDER_DESKTOP_FILE_IN) $(POFILES)
intltool-merge -d -u po $< $@
sed -e 's#__PREFIX__#$(PREFIX)#' $< >$(GPODDER_DESKTOP_FILE_TMP)
intltool-merge -d -u po $(GPODDER_DESKTOP_FILE_TMP) $@
rm -f $(GPODDER_DESKTOP_FILE_TMP)

$(GPODDER_DESKTOP_FILE_IN).h: $(GPODDER_DESKTOP_FILE_IN)
intltool-extract --quiet --type=gettext/ini $<
Expand Down
2 changes: 1 addition & 1 deletion share/applications/gpodder.desktop.in
Expand Up @@ -3,7 +3,7 @@ _Name=gPodder
_X-GNOME-FullName=gPodder Podcast Client
_GenericName=Podcast Client
_Comment=Subscribe to audio and video content from the web
Exec=gpodder
Exec=__PREFIX__/bin/gpodder
Icon=gpodder
Terminal=false
Type=Application
Expand Down

0 comments on commit b5d4999

Please sign in to comment.