o Use ${PREFIX}/share/examples/lftp for examples,

not ${PREFIX}/lib/lftp
o Use {INSTALL,DEINSTALL} for notification messages for config files
This commit is contained in:
heko 2001-10-07 19:01:56 +00:00
parent e5d3982d55
commit 9de53525be
4 changed files with 100 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2001/09/24 06:04:15 kevlo Exp $
# $OpenBSD: Makefile,v 1.22 2001/10/07 19:01:56 heko Exp $
COMMENT= "shell-like command line ftp client"
@ -6,6 +6,7 @@ DISTNAME= lftp-2.4.4
CATEGORIES= net
NEED_VERSION= 1.460
MASTER_SITES= ${MASTER_SITE_SUNSITE} \
ftp://ftp.yars.free.net/pub/software/unix/net/ftp/client/lftp/ \
http://ftp.yars.free.net/pub/software/unix/net/ftp/client/lftp/
MASTER_SITE_SUBDIR= system/network/file-transfer/
@ -26,7 +27,7 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
MODULES= gettext
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/lftp
${INSTALL_DATA} ${WRKSRC}/lftp.conf ${PREFIX}/lib/lftp/lftp.conf-sample
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lftp
${INSTALL_DATA} ${WRKSRC}/lftp.conf ${PREFIX}/share/examples/lftp/lftp.conf-sample
.include <bsd.port.mk>

25
net/lftp/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1 2001/10/07 19:01:56 heko Exp $
#
# lftp de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}
if [ -d $CONFIG_DIR ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| this step as root:"
echo "|"
echo "| rm -f $CONFIG_DIR/lftp.conf"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
fi
exit 0

68
net/lftp/pkg/INSTALL Normal file
View File

@ -0,0 +1,68 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2001/10/07 19:01:56 heko Exp $
#
# Pre/post-installation setup of lftp
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/lftp
do_notice()
{
echo
echo "+---------------"
echo "| The existing configuration file in $CONFIG_DIR/lftp.conf"
echo "| has NOT been changed. You may want to compare it to the"
echo "| current sample file in $SAMPLE_CONFIG_DIR/lftp.conf,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
do_install()
{
install -d -o root -g wheel -m 755 $CONFIG_DIR
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/lftp.conf $CONFIG_DIR/lftp.conf
echo
echo "+---------------"
echo "| The $1 configuration file has been installed into"
echo "| $CONFIG_DIR/lftp.conf. Please view this file and change the configuration"
echo "| to meet your needs."
echo "+---------------"
echo
}
# 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 [ ! -d $CONFIG_DIR ]; then
do_install $1
elif [ ! -f $CONFIG_DIR/lftp.conf ]; then
do_install $1
else
do_notice $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -1,9 +1,7 @@
@comment $OpenBSD: PLIST,v 1.7 2001/05/20 12:44:51 kevlo Exp $
@comment $OpenBSD: PLIST,v 1.8 2001/10/07 19:01:56 heko Exp $
bin/lftp
bin/lftpget
lib/lftp/lftp.conf-sample
@exec if [ -f /etc/lftp.conf ]; then echo "Update /etc/lftp.conf manually"; else cp %D/%F /etc/lftp.conf; fi
@unexec echo "Remove the /etc/lftp.conf file manually"
share/examples/lftp/lftp.conf-sample
man/man1/lftp.1
share/lftp/import-ncftp
share/lftp/import-netscape
@ -18,5 +16,5 @@ share/locale/pt_BR/LC_MESSAGES/lftp.mo
share/locale/ru/LC_MESSAGES/lftp.mo
share/locale/zh_CN/LC_MESSAGES/lftp.mo
share/locale/zh_TW/LC_MESSAGES/lftp.mo
@dirrm share/examples/lftp
@dirrm share/lftp
@dirrm lib/lftp