Added install & uninstall; added desktop entry
parent
fad6ca04a9
commit
cbefc58bb0
20
Makefile
20
Makefile
|
@ -4,11 +4,31 @@ RELEASE_DIR := $(BUILD_DIR)/release
|
||||||
DEBUG_DIR := $(BUILD_DIR)/debug
|
DEBUG_DIR := $(BUILD_DIR)/debug
|
||||||
BINARY := stj
|
BINARY := stj
|
||||||
CORES := $(shell nproc --all)
|
CORES := $(shell nproc --all)
|
||||||
|
PREFIX := /usr/local
|
||||||
|
MANPREFIX := $(PREFIX)/share/man
|
||||||
|
|
||||||
all: debug
|
all: debug
|
||||||
.PHONY: all
|
.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:
|
clean:
|
||||||
@ [ ! -e '$(BINARY)' ] || rm '$(BINARY)'
|
@ [ ! -e '$(BINARY)' ] || rm '$(BINARY)'
|
||||||
@ rm -rf '$(BUILD_DIR)'
|
@ rm -rf '$(BUILD_DIR)'
|
||||||
|
|
|
@ -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
|
Reference in New Issue