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),) ifeq ($(PREFIX),)
PREFIX := /usr/local PREFIX := /usr/local
endif endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(SYSCONFDIR),)
SYSCONFDIR := $(PREFIX)/etc
endif
build: build:
mkdir -p build mkdir -p build
go build -o build/stormfetch stormfetch go build -o build/stormfetch stormfetch
install: build/stormfetch config/ install: build/stormfetch config/
mkdir -p $(DESTDIR)$(PREFIX)"/bin/" mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(PREFIX)"/etc/stormfetch/" mkdir -p $(DESTDIR)$(SYSCONFDIR)"/stormfetch/"
cp build/stormfetch $(DESTDIR)$(PREFIX)"/bin/stormfetch" cp build/stormfetch $(DESTDIR)$(BINDIR)"/stormfetch"
cp -r config/. $(DESTDIR)$(PREFIX)"/etc/stormfetch/" cp -r config/. $(DESTDIR)$(SYSCONFDIR)"/stormfetch/"
clean: clean:
rm -r build/ rm -r build/