Added BINDIR and SYSCONFDIR variables to the Makefile

This commit is contained in:
CapCreeperGR 2024-05-06 14:56:29 +03:00
parent 8874e74488
commit 24bc0b6f16

View File

@ -1,16 +1,22 @@
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(SYSCONFDIR),)
SYSCONFDIR := $(PREFIX)/etc
endif
build:
mkdir -p build
go build -o build/stormfetch stormfetch
install: build/stormfetch config/
mkdir -p $(DESTDIR)$(PREFIX)"/bin/"
mkdir -p $(DESTDIR)$(PREFIX)"/etc/stormfetch/"
cp build/stormfetch $(DESTDIR)$(PREFIX)"/bin/stormfetch"
cp -r config/. $(DESTDIR)$(PREFIX)"/etc/stormfetch/"
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(SYSCONFDIR)"/stormfetch/"
cp build/stormfetch $(DESTDIR)$(BINDIR)"/stormfetch"
cp -r config/. $(DESTDIR)$(SYSCONFDIR)"/stormfetch/"
clean:
rm -r build/