summaryrefslogtreecommitdiff
path: root/data/Makefile.am
blob: b051ebb5367b998a23a3ae8a3c88e3fd47f7a45a (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
EXTRA_DIST = terminal-media-launcher.ico terminal-media-launcher.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