diff --git a/Makefile b/Makefile index 1ede1854..c5021977 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,13 @@ LISP ?= sbcl ## We use --non-interactive with SBCL so that errors don't interrupt the CI. LISP_FLAGS ?= --no-userinit --non-interactive -NYXT_INTERNAL_QUICKLISP=true -NYXT_RENDERER=gi-gtk +NYXT_INTERNAL_QUICKLISP = true +NYXT_RENDERER = gi-gtk + +PREFIX = /usr/local +prefix = $(PREFIX) +BINDIR = $(PREFIX)/bin +DATADIR = $(PREFIX)/share .PHONY: help help: @@ -60,7 +65,25 @@ ifeq ($(UNAME), Darwin) all: nyxt app-bundle endif +.PHONY: install-assets +install-assets: + mkdir -p "$(DESTDIR)$(DATADIR)/applications/" + sed "s/VERSION/$$(git describe --tags)/" assets/nyxt.desktop > "$(DESTDIR)$(DATADIR)/applications/nyxt.desktop" + for i in 16 32 128 256 512; do \ + mkdir -p "$(DESTDIR)$(DATADIR)/icons/hicolor/$${i}x$${i}/apps/" ; \ + cp -f assets/nyxt_$${i}x$${i}.png "$(DESTDIR)$(DATADIR)/icons/hicolor/$${i}x$${i}/apps/nyxt.png" ; \ + done + +.PHONY: install-nyxt +install-nyxt: nyxt + mkdir -p "$(DESTDIR)$(BINDIR)" + cp -f $< "$(DESTDIR)$(BINDIR)/" + chmod 755 "$(DESTDIR)$(BINDIR)/"$< + .PHONY: install +ifeq ($(UNAME), Linux) +install: install-nyxt install-assets +endif ifeq ($(UNAME), Darwin) install: install-app-bundle else