- add @extra support
- INSTALL,DEINSTALL cleanup - s,/etc,${SYSCONFDIR},g in the man page as well.. okay sturm@.
This commit is contained in:
parent
b68ea6f595
commit
b3fee3cc36
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2003/11/15 15:12:55 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2004/04/13 20:23:59 xsa Exp $
|
||||
|
||||
COMMENT= "curses-based URL ripper"
|
||||
|
||||
@ -32,6 +32,7 @@ CONFIGURE_ENV= LIBS=-lcurses
|
||||
|
||||
pre-build:
|
||||
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/urlview.c
|
||||
@perl -pi -e "s,/etc,${SYSCONFDIR},g" ${WRKSRC}/urlview.man
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/urlview
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.1.1.1 2000/08/13 00:06:21 naddy Exp $
|
||||
# $OpenBSD: DEINSTALL,v 1.2 2004/04/13 20:23:59 xsa Exp $
|
||||
#
|
||||
# De-installation setup of urlview
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
CONFIG_FILE=${SYSCONFDIR}/urlview.conf
|
||||
|
||||
# Function: tell the user what they need to do to delete the port completely
|
||||
#
|
||||
@ -19,7 +19,7 @@ do_notice()
|
||||
echo "| To completely deinstall the $1 package you need to perform"
|
||||
echo "| these steps as root:"
|
||||
echo "|"
|
||||
echo "| rm -f ${CONFIG_DIR}/urlview.conf"
|
||||
echo "| rm -f ${CONFIG_FILE}"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
@ -38,7 +38,9 @@ fi
|
||||
#
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
if [ ${PKG_DELETE_EXTRA} != Yes -a -f ${CONFIG_FILE} ]; then
|
||||
do_notice "$1"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.2 2001/07/04 14:58:19 lebel Exp $
|
||||
# $OpenBSD: INSTALL,v 1.3 2004/04/13 20:23:59 xsa Exp $
|
||||
#
|
||||
# Pre/post-installation setup of urlview
|
||||
|
||||
@ -9,20 +9,21 @@ set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/urlview
|
||||
CONFIG_FILE=${SYSCONFDIR}/urlview.conf
|
||||
SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/urlview
|
||||
SAMPLE_CONFIG_FILE=${SAMPLE_CONFIG_DIR}/sample.urlview
|
||||
|
||||
# Function: install configuration files
|
||||
#
|
||||
do_install_conf()
|
||||
{
|
||||
install -d -o root -g wheel ${CONFIG_DIR}
|
||||
install -m 0644 -o root -g wheel ${SAMPLE_CONFIG_DIR}/sample.urlview \
|
||||
${CONFIG_DIR}/urlview.conf
|
||||
install -m 0644 -o root -g wheel ${SAMPLE_CONFIG_FILE} ${CONFIG_FILE}
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The $1 configuration files have been installed in ${CONFIG_DIR}."
|
||||
echo "| Please view these files and change the configuration to meet"
|
||||
echo "| your needs."
|
||||
echo "| The $1 configuration file ${CONFIG_FILE},"
|
||||
echo "| has been installed. Please view this file and change"
|
||||
echo "| the configuration to meet your needs."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
@ -33,10 +34,10 @@ do_notice_conf()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration files in ${CONFIG_DIR} have NOT"
|
||||
echo "| been changed. You may want to compare them to the current samples"
|
||||
echo "| in ${SAMPLE_CONFIG_DIR}, and update your configuration files"
|
||||
echo "| as needed."
|
||||
echo "| The existing $1 configuration file, ${CONFIG_FILE}"
|
||||
echo "| has NOT been changed. You may want to compare it to the"
|
||||
echo "| current sample file, ${SAMPLE_CONFIG_FILE},"
|
||||
echo "| and update your configuration as needed."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
@ -55,12 +56,10 @@ case $2 in
|
||||
: nothing to pre-install for this port
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ ! -d ${CONFIG_DIR} ]; then
|
||||
do_install_conf "$1"
|
||||
elif [ ! -f ${CONFIG_DIR}/urlview.conf ]; then
|
||||
do_install_conf "$1"
|
||||
else
|
||||
if [ -f ${CONFIG_FILE} ]; then
|
||||
do_notice_conf "$1"
|
||||
else
|
||||
do_install_conf "$1"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
@ -1,6 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/08/13 00:06:21 naddy Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2004/04/13 20:23:59 xsa Exp $
|
||||
bin/urlview
|
||||
man/man1/urlview.1
|
||||
share/examples/urlview/sample.urlview
|
||||
share/examples/urlview/url_handler.sh
|
||||
@dirrm share/examples/urlview
|
||||
@cwd ${SYSCONFDIR}
|
||||
@extra urlview.conf
|
||||
|
Loading…
Reference in New Issue
Block a user