From ca567a8cb773d82e0153fa2f0e13c5c82270543c Mon Sep 17 00:00:00 2001 From: fosslinux Date: Sun, 3 Jan 2021 12:39:14 +1100 Subject: [PATCH] Add better install message --- Makefile.in | 65 ++++++++++++++++++++++++++++++++++++++++++++--------- configure | 22 ++++++++++++++---- 2 files changed, 72 insertions(+), 15 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7fd277f..725e5f0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -81,17 +81,60 @@ clean-shm: install: src/$(BINARY) @CLEAN_SHM@ install-man @INSTALL_ROOT@ @INSTALL_OSX@ @INSTALL_HAIKU@ @INSTALL_SYSTEMD@ @INSTALL_XINETD@ @INSTALL_INETD_MANUAL@ @INSTALL_INETD_UPDATE@ $(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR) $(INSTALL) -s -m 755 -t $(DESTDIR)$(SBINDIR) src/$(BINARY) - @echo - @echo "======================================================================" - @echo - @echo "If there were no errors shown above," - @echo "Gophernicus has now been succesfully installed. To try it out, launch" - @echo "your favorite gopher browser and navigate to your gopher root." - @echo - @echo "Gopher URL...: gopher://$$(hostname)/" - @echo - @echo "======================================================================" - @echo + @$(MAKE) -s install-msg + +install-msg: + echo + echo "======================================================================" + echo + echo "If there were no errors shown above," + echo "Gophernicus has now been succesfully installed." + echo + @INSTALL_MSG_INETD@ + @INSTALL_MSG_XINETD@ + @INSTALL_MSG_SYSTEMD@ + @INSTALL_MSG_OSX@ + @INSTALL_MSG_HAIKU@ + $(MAKE) install-msg-final + +install-msg-inetd: + echo "Please restart the inetd daemon to allow your gopher root to be" + echo "accessed." + echo "On systemd distributions:" + echo " systemctl restart inetd" + echo + +install-msg-xinetd: + echo "Please restart the xinetd daemon to allow your gopher root to be" + echo "accessed." + echo "On systemd distributions:" + echo " systemctl restart xinetd" + echo "You can configure arguments, including the hostname, in $(INETD)." + echo + +install-msg-systemd: + echo "Please enable and start gophernicus.socket using the commands:" + echo " systemctl enable gophernicus.socket" + echo " systemctl start gophernicus.socket" + echo "to allow your gopher root to be accessed." + echo "You can configure arguments, including the hostname, in" + echo "$(DEFAULT)/$(NAME) or $(SYSCONF)/$(NAME)." + echo + +install-msg-osx: + echo "Please reboot your computer to allow your gopher root to be accessed." + echo "You can configure arguments, including the hostname, in $(LAUNCHD)." + echo + +install-msg-haiku: + echo "Please reboot your computer to allow your gopher root to be accessed." + echo "You can configure arguments, including the hostname, in $(HAIKU_SRV)" + echo "under the gophernicus section." + echo + +install-msg-final: + echo "======================================================================" + echo install-man: $(INSTALL) -d -m 755 $(DESTDIR)$(MAN8DIR) diff --git a/configure b/configure index f73d5a4..85dd6b9 100755 --- a/configure +++ b/configure @@ -190,11 +190,13 @@ for listener in ${listeners}; do case "${listener}" in systemd) INSTALL_SYSTEMD="install-systemd" - UNINSTALL_SYSTEMD="uninstall-systemd" ;; + UNINSTALL_SYSTEMD="uninstall-systemd" + INSTALL_MSG_SYSTEMD='$(MAKE) install-msg-systemd' ;; xinetd) INSTALL_XINETD="install-xinetd" UNINSTALL_XINETD="uninstall-xinetd" - XINETD_CONF="/etc/xinetd.d/gophernicus" ;; + XINETD_CONF="/etc/xinetd.d/gophernicus" + INSTALL_MSG_XINETD='$(MAKE) install-msg-xinetd' ;; inetd) INSTALL_INETD="install-inetd" INETD_CONF="/etc/inetd.conf" @@ -208,9 +210,16 @@ for listener in ${listeners}; do INSTALL_INETD_UPDATE="install-inetd-update" UNINSTALL_INETD_UPDATE="uninstall-inetd-update" fi + INSTALL_MSG_INETD='$(MAKE) install-msg-inetd' ;; - mac) INSTALL_OSX="install-osx" UNINSTALL_OSX="uninstall-osx" ;; - haiku) INSTALL_HAIKU="install-haiku" UNINSTALL_HAIKU="uninstall-haiku" ;; + mac) + INSTALL_OSX="install-osx" + UNINSTALL_OSX="uninstall-osx" + INSTALL_MSG_OSX='$(MAKE) install-msg-osx' ;; + haiku) + INSTALL_HAIKU="install-haiku" + UNINSTALL_HAIKU="uninstall-haiku" + INSTALL_MSG_HAIKU='$(MAKE) install-msg-haiku' ;; *) printf "The listener %s is not offically supported; continuing anyway.\\n" "${listener}" ;; esac done @@ -308,6 +317,11 @@ sed -i -e "s:@INSTALL_INETD_UPDATE@:${INSTALL_INETD_UPDATE}:" Makefile sed -i -e "s:@INSTALL_XINETD@:${INSTALL_XINETD}:" Makefile sed -i -e "s:@INSTALL_SYSTEMD@:${INSTALL_SYSTEMD}:" Makefile sed -i -e "s:@INSTALL_HAIKU@:${INSTALL_HAIKU}:" Makefile +sed -i -e "s:@INSTALL_MSG_INETD@:${INSTALL_MSG_INETD}:" Makefile +sed -i -e "s:@INSTALL_MSG_XINETD@:${INSTALL_MSG_XINETD}:" Makefile +sed -i -e "s:@INSTALL_MSG_SYSTEMD@:${INSTALL_MSG_SYSTEMD}:" Makefile +sed -i -e "s:@INSTALL_MSG_OSX@:${INSTALL_MSG_OSX}:" Makefile +sed -i -e "s:@INSTALL_MSG_HAIKU@:${INSTALL_MSG_HAIKU}:" Makefile sed -i -e "s:@UNINSTALL_OSX@:${UNINSTALL_OSX}:" Makefile sed -i -e "s:@UNINSTALL_INETD_MANUAL@:${UNINSTALL_INETD_MANUAL}:" Makefile sed -i -e "s:@UNINSTALL_INETD_UPDATE@:${UNINSTALL_INETD_UPDATE}:" Makefile