1
Description: Don't hardcode the path of the desktop file
2
The path of the desktop file depends on the prefix chosen
3
at installation time. Instead of hardcoding it, we substitute
5
Author: Raphaël Hertzog <hertzog@debian.org>
10
@@ -1252,7 +1252,7 @@ def reroll_autostart(should_autostart):
11
if u".config" in contents:
12
autostart_dir = os.path.join(home_dir, u".config", u"autostart")
13
autostart_link = os.path.join(autostart_dir, u"%s.desktop" % "dropbox") #BUILD_KEY.lower()
14
- desktop_file = u"/usr/local/share/applications/%s.desktop" % "dropbox" #BUILD_KEY.lower()
15
+ desktop_file = u"@DESKTOP_FILE_DIR@/%s.desktop" % "dropbox" #BUILD_KEY.lower()
17
if os.path.exists(desktop_file):
18
if not os.path.exists(autostart_dir):
21
@@ -6,11 +6,11 @@ EXTRA_DIST = dropbox.in serializeimages.
24
dropbox: dropbox.in serializeimages.py
25
- python serializeimages.py $(PACKAGE_VERSION) < dropbox.in > dropbox
26
+ python serializeimages.py $(PACKAGE_VERSION) $(datadir)/applications < dropbox.in > dropbox
29
dropbox.1: dropbox.txt.in dropbox docgen.py
30
python docgen.py $(PACKAGE_VERSION) < dropbox.txt.in > dropbox.txt
31
$(RST2MAN) dropbox.txt > dropbox.1
34
\ No newline at end of file
36
--- a/serializeimages.py
37
+++ b/serializeimages.py
38
@@ -10,5 +10,6 @@ sys.stdout.write(sys.stdin.read().replac
39
('@IMAGEDATA16@', "gtk.gdk.pixbuf_new_from_data(%r, gtk.gdk.COLORSPACE_RGB, %r, %r, %r, %r, %r)" % \
40
(pixbuf16.get_pixels(), pixbuf16.get_has_alpha(), pixbuf16.get_bits_per_sample(),
41
pixbuf16.get_width(), pixbuf16.get_height(), pixbuf16.get_rowstride())).replace\
42
- ('@PACKAGE_VERSION@', sys.argv[1]))
43
+ ('@PACKAGE_VERSION@', sys.argv[1]).replace\
44
+ ('@DESKTOP_FILE_DIR@', sys.argv[2]))