summaryrefslogtreecommitdiff
path: root/data/Makefile.am
blob: 5a3927035eb325ea6b9f7eb4f12feb8e315a36f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
EXTRA_DIST = $(PACKAGE_NAME).svg 

# Build a .desktop entry
if DESKTOP_ENTRY

CLEANFILES = $(PACKAGE_NAME).desktop

edit = sed \
	   -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
	   -e 's|@bindir[@]|$(bindir)|g' \
	   -e 's|@EXEEXT[@]|$(EXEEXT)|g'

$(PACKAGE_NAME).desktop: Makefile
	rm -f $@ $@.tmp
	srcdir=''; \
		   test -f ./$@.in || srcdir=$(srcdir)/; \
		   $(edit) $${srcdir}$@.in >$@.tmp
	chmod +x $@.tmp
	chmod a-w $@.tmp
	mv $@.tmp $@

$(PACKAGE_NAME).desktop: $(srcdir)/$(PACKAGE_NAME).desktop.in

desktopdir = $(datadir)/applications
icondir    = $(datadir)/pixmaps
desktop_DATA = $(PACKAGE_NAME).desktop
icon_DATA = $(PACKAGE_NAME).svg

endif