cleanup build process

This commit is contained in:
Luca Bilke 2024-04-25 14:23:23 +02:00
parent 5d407b2052
commit c83feacbce
No known key found for this signature in database
GPG Key ID: B753481DA0B6FA47
2 changed files with 14 additions and 5 deletions

View File

@ -37,6 +37,9 @@ dist: clean
tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
rm -rf st-$(VERSION) rm -rf st-$(VERSION)
terminfo:
tic -sx -o terminfo st.info
install: st install: st
mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f st $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin
@ -44,15 +47,21 @@ install: st
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
mkdir -p $(DESTDIR)$(PREFIX)/share/terminfo mkdir -p $(DESTDIR)$(PREFIX)/share
tic -sx -o $(DESTDIR)$(PREFIX)/share/terminfo st.info cp -a terminfo $(DESTDIR)$(PREFIX)/share/terminfo
# mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch # 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 # 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: uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(PREFIX)/bin/st
rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop # desktop-entry patch 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 .PHONY: all clean dist install uninstall

View File

@ -8,4 +8,4 @@ for patch in patches/*.diff; do
done done
cp -f config.h st-final/ cp -f config.h st-final/
cd st-final || exit 1 cd st-final || exit 1
make make "$1"