diff --git a/textproc/urlview/Makefile b/textproc/urlview/Makefile index fccd930aed5..c40fde07ee4 100644 --- a/textproc/urlview/Makefile +++ b/textproc/urlview/Makefile @@ -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 diff --git a/textproc/urlview/pkg/DEINSTALL b/textproc/urlview/pkg/DEINSTALL index 2594b88c74f..b7ccfe8d18f 100644 --- a/textproc/urlview/pkg/DEINSTALL +++ b/textproc/urlview/pkg/DEINSTALL @@ -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) - do_notice "$1" + if [ ${PKG_DELETE_EXTRA} != Yes -a -f ${CONFIG_FILE} ]; then + do_notice "$1" + fi ;; *) echo "usage: $0 distname DEINSTALL" >&2 diff --git a/textproc/urlview/pkg/INSTALL b/textproc/urlview/pkg/INSTALL index c64ba2a83aa..ea95b629568 100644 --- a/textproc/urlview/pkg/INSTALL +++ b/textproc/urlview/pkg/INSTALL @@ -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 ;; *) diff --git a/textproc/urlview/pkg/PLIST b/textproc/urlview/pkg/PLIST index 44a580794e4..0999479a7f9 100644 --- a/textproc/urlview/pkg/PLIST +++ b/textproc/urlview/pkg/PLIST @@ -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