Update Makefile to be able to install hyfetch

This commit is contained in:
Bailey Kasin 2023-08-22 23:47:53 -07:00
parent b353cb7247
commit c8185944dc
No known key found for this signature in database
GPG key ID: AE53A329D7F3716E
4 changed files with 569 additions and 4 deletions

View file

@ -1,16 +1,35 @@
PREFIX = /usr
MANDIR = $(PREFIX)/share/man
all:
@echo Run \'make install\' to install Neofetch.
all: build install
build:
python setup.py build
install:
python setup.py install --prefix=${PREFIX}
install-doc:
@mkdir -p $(DESTDIR)$(MANDIR)/man1
@cp -p docs/hyfetch.1 $(DESTDIR)$(MANDIR)/man1
@cp -p docs/neowofetch.1 $(DESTDIR)$(MANDIR)/man1
uninstall:
@rm -rf $(DESTDIR)$(PREFIX)/bin/hyfetch
@rm -rf $(DESTDIR)$(PREFIX)/bin/neowofetch
@rm -rf $(DESTDIR)$(MANDIR)/man1/hyfetch.1*
@rm -rf $(DESTDIR)$(MANDIR)/man1/neowofetch.1*
clean:
rm -rf build/ HyFetch.egg-info
install-neofetch:
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@mkdir -p $(DESTDIR)$(MANDIR)/man1
@cp -p neofetch $(DESTDIR)$(PREFIX)/bin/neofetch
@cp -p neofetch.1 $(DESTDIR)$(MANDIR)/man1
@cp -p docs/neofetch.1 $(DESTDIR)$(MANDIR)/man1
@chmod 755 $(DESTDIR)$(PREFIX)/bin/neofetch
uninstall:
uninstall-neofetch:
@rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch
@rm -rf $(DESTDIR)$(MANDIR)/man1/neofetch.1*