new installation procedure

This commit is contained in:
Tilman Kranz
2023-12-10 14:00:07 +01:00
parent 5d7c97c22e
commit cad9979d7b
2 changed files with 33 additions and 6 deletions

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
NAME=photos2pdf
DESTDIR=
PREFIX=/usr
INSTALL=install
BINDIR=$(PREFIX)/bin
LIBDIR=/var/lib/$(NAME)
TEMPLATEDIR=$(LIBDIR)/template
.PHONY: all install-bin install-template install
all:
@echo "Use \"sudo $(MAKE) install\" to install $(NAME)"
install-bin:
$(INSTALL) -d -m 0755 "$(BINDIR)"
$(INSTALL) -m 0755 "$(NAME)" "$(BINDIR)/$(NAME)"
install-template:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
$(INSTALL) -d -m 0755 "$(DESTDIR)$(TEMPLATEDIR)"
tar cf - -C template . | (cd "$(DESTDIR)$(TEMPLATEDIR)" && tar xf -)
install: install-bin install-template