2017-11-21 10:35:11 +01:00
|
|
|
PYTHON = python3
|
2018-08-03 17:16:26 +02:00
|
|
|
PREFIX ?= /usr/local
|
2017-11-21 10:35:11 +01:00
|
|
|
ICONSIZES = 16 24 32 48 64 128 256 512
|
2018-08-03 17:16:26 +02:00
|
|
|
DATAROOTDIR = $(PREFIX)/share
|
|
|
|
DATADIR ?= $(DATAROOTDIR)
|
2018-08-04 05:53:38 +02:00
|
|
|
MANDIR ?= $(DATAROOTDIR)/man
|
2017-11-21 10:35:11 +01:00
|
|
|
|
2018-04-16 13:44:22 +02:00
|
|
|
SETUPTOOLSOPTIONS =
|
|
|
|
ifdef DESTDIR
|
|
|
|
SETUPTOOLSOPTS = --root="$(DESTDIR)"
|
|
|
|
endif
|
|
|
|
|
2017-11-21 10:35:11 +01:00
|
|
|
.PHONY: install
|
|
|
|
|
|
|
|
doc/qutebrowser.1.html:
|
|
|
|
a2x -f manpage doc/qutebrowser.1.asciidoc
|
|
|
|
|
|
|
|
install: doc/qutebrowser.1.html
|
2018-04-16 13:44:22 +02:00
|
|
|
$(PYTHON) setup.py install --prefix="$(PREFIX)" --optimize=1 $(SETUPTOOLSOPTS)
|
2018-05-19 13:57:26 +02:00
|
|
|
install -Dm644 misc/qutebrowser.appdata.xml \
|
2018-08-03 17:16:26 +02:00
|
|
|
"$(DESTDIR)$(DATADIR)/metainfo/qutebrowser.appdata.xml"
|
2017-11-21 10:35:11 +01:00
|
|
|
install -Dm644 doc/qutebrowser.1 \
|
2018-08-03 17:16:26 +02:00
|
|
|
"$(DESTDIR)$(MANDIR)/man1/qutebrowser.1"
|
2017-11-21 10:35:11 +01:00
|
|
|
install -Dm644 misc/qutebrowser.desktop \
|
2018-08-03 17:16:26 +02:00
|
|
|
"$(DESTDIR)$(DATADIR)/applications/qutebrowser.desktop"
|
2017-11-21 10:35:11 +01:00
|
|
|
$(foreach i,$(ICONSIZES),install -Dm644 "icons/qutebrowser-$(i)x$(i).png" \
|
2018-08-03 17:16:26 +02:00
|
|
|
"$(DESTDIR)$(DATADIR)/icons/hicolor/$(i)x$(i)/apps/qutebrowser.png";)
|
2017-11-21 10:35:11 +01:00
|
|
|
install -Dm644 icons/qutebrowser.svg \
|
2018-08-03 17:16:26 +02:00
|
|
|
"$(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/qutebrowser.svg"
|
|
|
|
install -Dm755 -t "$(DESTDIR)$(DATADIR)/qutebrowser/userscripts/" \
|
2017-11-21 10:35:11 +01:00
|
|
|
$(wildcard misc/userscripts/*)
|
2018-08-03 17:16:26 +02:00
|
|
|
install -Dm755 -t "$(DESTDIR)$(DATADIR)/qutebrowser/scripts/" \
|
2017-11-21 10:35:11 +01:00
|
|
|
$(filter-out scripts/__init__.py scripts/__pycache__ scripts/dev \
|
2018-01-15 22:42:12 +01:00
|
|
|
scripts/testbrowser scripts/asciidoc2html.py scripts/setupcommon.py \
|
2017-11-21 10:35:11 +01:00
|
|
|
scripts/link_pyqt.py,$(wildcard scripts/*))
|