From c83feacbce9c5b723d7a527ef101e3066dc743df Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Thu, 25 Apr 2024 14:23:23 +0200 Subject: [PATCH] cleanup build process --- Makefile | 15 ++++++++++++--- build.sh | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 307a983..03262d6 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ dist: clean tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz rm -rf st-$(VERSION) +terminfo: + tic -sx -o terminfo st.info + install: st mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin @@ -44,15 +47,21 @@ install: st mkdir -p $(DESTDIR)$(MANPREFIX)/man1 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 - mkdir -p $(DESTDIR)$(PREFIX)/share/terminfo - tic -sx -o $(DESTDIR)$(PREFIX)/share/terminfo st.info + mkdir -p $(DESTDIR)$(PREFIX)/share + cp -a terminfo $(DESTDIR)$(PREFIX)/share/terminfo # mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch # test -f ${DESTDIR}${PREFIX}/share/applications/st.desktop || cp -n st.desktop $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch - @echo Please see the README file regarding the terminfo entry of st. uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop # desktop-entry patch + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-256color + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-bs + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-bs-256color + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-meta + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-meta-256color + rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-mono .PHONY: all clean dist install uninstall diff --git a/build.sh b/build.sh index f114dbb..40456ec 100755 --- a/build.sh +++ b/build.sh @@ -4,8 +4,8 @@ cp -f config.mk Makefile patches.h st-flexipatch/ flexipatch-finalizer/flexipatch-finalizer.sh -r -d st-flexipatch -o st-final git -C st-flexipatch reset --hard HEAD && git -C st-flexipatch clean -fd for patch in patches/*.diff; do - patch -d st-final <"$patch" + patch -d st-final <"$patch" done cp -f config.h st-final/ cd st-final || exit 1 -make +make "$1"