o add INSTALL and DEINSTALL script

o call INSTALL script from post-install rule in Makefile
o remove duplicate messages from Makefile and packing list
THIS PORT IS NOW FROZEN
This commit is contained in:
marc 1999-04-08 15:37:27 +00:00
parent bdd669704b
commit 846a895fc0
4 changed files with 76 additions and 22 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 1999/02/20 01:49:12 marc Exp $
# $OpenBSD: Makefile,v 1.8 1999/04/08 15:37:27 marc Exp $
#
DISTNAME= bash-2.03
@ -31,15 +31,7 @@ post-install:
${WRKDIR}/doc/builtins.ps \
${WRKDIR}/doc/readline.ps \
${PREFIX}/share/doc/bash
@${ECHO} ""
@${ECHO} "*** Finished installing $(DISTNAME)"
@${ECHO} "*** To complete the install, you should notify the system"
@${ECHO} "*** that $(PREFIX)/bin/bash is a valid shell by adding it to"
@${ECHO} "*** the file /etc/shells."
@${ECHO} "***"
@${ECHO} "*** If you are unfamiliar with this file, consult the"
@${ECHO} "*** shells(5) manual page."
@${ECHO} ""
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL
.include <bsd.port.mk>

View File

@ -0,0 +1,21 @@
# $OpenBSD: DEINSTALL,v 1.1 1999/04/08 15:37:28 marc Exp $
#
# bash de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
if grep -q ${PREFIX}/bin/bash /etc/shells; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to edit"
echo "| /etc/shells and remove this line:"
echo "|"
echo "| ${PREFIX}/bin/bash"
echo "|"
echo "+---------------"
echo
fi
exit 0

53
shells/bash2/pkg/INSTALL Normal file
View File

@ -0,0 +1,53 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 1999/04/08 15:37:28 marc Exp $
#
# Pre/post-installation setup of bash
# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
{
echo
echo "+---------------"
echo "| For proper use of $1 you should notify the system"
echo "| that ${PREFIX}/bin/bash is a valid shell by adding it to the"
echo "| the file /etc/shells. If you are unfamiliar with this file"
echo "| consult the shells(5) manual page"
echo "+---------------"
echo
}
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
if grep -q ${PREFIX}/bin/bash /etc/shells; then
:
else
do_notice $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -15,15 +15,3 @@ share/doc/bash/bashref.ps
share/doc/bash/builtins.ps
share/doc/bash/readline.ps
@dirrm share/doc/bash
@exec echo ""
@exec echo "*** Finished bash installation."
@exec echo "*** To complete the install, you should notify the system"
@exec echo "*** that %D/bin/bash is a valid shell by adding it to"
@exec echo "*** the file /etc/shells."
@exec echo "***"
@exec echo "*** If you are unfamiliar with this file, consult the"
@exec echo "*** shells(5) manual page."
@exec echo ""
@unexec echo ""
@unexec echo "*** Don't forget to remove bash from /etc/shells"
@unexec echo ""