Added install & uninstall; added desktop entry

master
Jef Roosens 2020-11-14 17:30:54 +01:00
parent fad6ca04a9
commit cbefc58bb0
4 changed files with 27 additions and 0 deletions

View File

@ -4,11 +4,31 @@ RELEASE_DIR := $(BUILD_DIR)/release
DEBUG_DIR := $(BUILD_DIR)/debug
BINARY := stj
CORES := $(shell nproc --all)
PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man
all: debug
.PHONY: all
# Installation & removal
install: release
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f build/release/stj $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/stj
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < data/stj.1 > $(DESTDIR)$(MANPREFIX)/man1/stj.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stj.1
tic -sx data/stj.info
cp -f data/stj.desktop $(DESTDIR)$(PREFIX)/share/applications
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/stj
rm -f $(DESTDIR)$(MANPREFIX)/man1/stj.1
rm -f $(DESTDIR)$(PREFIX)/share/applications/stj.desktop
# Full clean
clean:
@ [ ! -e '$(BINARY)' ] || rm '$(BINARY)'
@ rm -rf '$(BUILD_DIR)'

7
data/stj.desktop 100644
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=stj
Comment=Jef's build of the st terminal
Icon=utilities-terminal
Exec=stj
Categories=System;TerminalEmulator