2017-08-20 11:52:26 +01:00
|
|
|
PREFIX ?= /usr
|
|
|
|
SYSCONFDIR ?= /etc
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
2017-07-10 12:32:45 +01:00
|
|
|
|
|
|
|
all:
|
|
|
|
@echo Run \'make install\' to install Neofetch.
|
|
|
|
|
|
|
|
install:
|
|
|
|
@echo 'Making directories...'
|
|
|
|
@mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
@mkdir -p $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro
|
2017-08-20 11:52:26 +01:00
|
|
|
@mkdir -p $(DESTDIR)$(MANDIR)/man1
|
2017-07-10 12:32:45 +01:00
|
|
|
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/neofetch
|
|
|
|
|
|
|
|
@echo 'Installing binaries...'
|
|
|
|
@sed "s|ASCIIDIR|$(PREFIX)/share/neofetch/ascii/distro|g;s|CONFDIR|$(SYSCONFDIR)/neofetch|g" < neofetch > $(DESTDIR)$(PREFIX)/bin/neofetch
|
|
|
|
@chmod 755 $(DESTDIR)$(PREFIX)/bin/neofetch
|
|
|
|
|
|
|
|
@echo 'Installing ASCII files, man page and config file...'
|
|
|
|
@cp -p ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro
|
2017-08-20 11:52:26 +01:00
|
|
|
@cp -p neofetch.1 $(DESTDIR)$(MANDIR)/man1
|
2017-07-10 12:32:45 +01:00
|
|
|
@cp -p config/config.conf $(DESTDIR)$(SYSCONFDIR)/neofetch/config.conf
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@echo 'Removing files...'
|
|
|
|
@rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch
|
2017-08-20 11:52:26 +01:00
|
|
|
@rm -rf $(DESTDIR)$(MANDIR)/man1/neofetch.1*
|
2017-07-10 12:32:45 +01:00
|
|
|
@rm -rf $(DESTDIR)$(PREFIX)/share/neofetch
|
|
|
|
@rm -rf $(DESTDIR)$(SYSCONFDIR)/neofetch
|