Debian packaging: Simplify /usr/bin/conkeror
[conkeror.git] / Makefile
bloba31ca5ac5c3c5c935950b2a851009ec4e22e2ce0
1 # conkeror: a programmable web browser based on Mozilla XULRunner
3 CFLAGS ?= -O2 -g
4 PREFIX ?= /usr/local
5 MANPREFIX ?= $(PREFIX)/share/man
6 SHELL ?= /bin/sh
8 tagged_files != find . -name '*.js'
9 BUILDDIR != pwd
10 VERSION != grep '^Version=' application.ini | cut -d '=' -f 2
12 dirs = branding chrome components content defaults help locale modules search-engines style
13 files = application.ini chrome.manifest content-policy.manifest Info.plist
14 contrib = contrib/art contrib/list-xulrunner-versions contrib/modules contrib/run-conkeror contrib/xrev
15 docs = COPYING CREDITS contrib/config
17 all: conkeror conkeror-bin conkeror-spawn-helper
19 clean:
20 $(RM) conkeror conkeror-bin conkeror-spawn-helper conkeror-$(VERSION).tar.gz TAGS
21 $(RM) -r conkeror-$(VERSION)
23 conkeror: conkeror.in
24 sed 's:@datadir@:$(BUILDDIR):g' $? > $@
25 chmod +x $@
27 conkeror-bin: conkeror.in
28 sed 's:@datadir@:$(PREFIX)/share/conkeror:g' $? > $@
30 conkeror-spawn-helper: conkeror-spawn-helper.c
32 conkeror-$(VERSION).tar.gz:
33 mkdir conkeror-$(VERSION)
34 cp -a $(dirs) $(files) \
35 conkeror.in conkeror-spawn-helper.c COPYING CREDITS contrib README Makefile tests \
36 conkeror-$(VERSION)
37 tar czf conkeror-$(VERSION).tar.gz conkeror-$(VERSION)
38 $(RM) -r conkeror-$(VERSION)
40 dist: conkeror-$(VERSION).tar.gz
42 etags: TAGS
44 install: all $(dirs) $(files) $(contrib) $(docs)
45 install -D -m644 contrib/man/conkeror.1 \
46 "$(DESTDIR)/$(MANPREFIX)/man1/conkeror.1"
47 install -D -m644 contrib/conkeror.desktop \
48 "$(DESTDIR)/$(PREFIX)/share/applications/conkeror.desktop"
49 install -D -m755 conkeror-bin "$(DESTDIR)/$(PREFIX)/bin/conkeror"
50 install -D -m755 conkeror-spawn-helper \
51 "$(DESTDIR)/$(PREFIX)/bin/conkeror-spawn-helper"
52 mkdir -p "$(DESTDIR)/$(PREFIX)/share/conkeror/contrib"
53 cp -a $(dirs) $(files) "$(DESTDIR)/$(PREFIX)/share/conkeror"
54 cp -a $(contrib) "$(DESTDIR)/$(PREFIX)/share/conkeror/contrib"
55 mkdir -p "$(DESTDIR)/$(PREFIX)/share/doc/conkeror"
56 cp -a $(docs) "$(DESTDIR)/$(PREFIX)/share/doc/conkeror"
58 # Don't use this. Learn to use your distribution's packaging tools.
59 uninstall:
60 $(RM) "$(DESTDIR)/$(MANPREFIX)/man1/conkeror.1"
61 $(RM) "$(DESTDIR)/$(PREFIX)/share/applications/conkeror.desktop"
62 $(RM) "$(DESTDIR)/$(PREFIX)/bin/conkeror"
63 $(RM) "$(DESTDIR)/$(PREFIX)/bin/conkeror-spawn-helper"
64 $(RM) -r "$(DESTDIR)/$(PREFIX)/share/conkeror/"
65 $(RM) -r "$(DESTDIR)/$(PREFIX)/share/doc/conkeror/"
67 TAGS:
68 @etags $(tagged_files)
70 .PHONY: clean dist etags install uninstall