- add @extra support

- INSTALL,DEINSTALL cleanup
- s,/etc,${SYSCONFDIR},g in the man page as well..
okay sturm@.
This commit is contained in:
xsa 2004-04-13 20:23:59 +00:00
parent b68ea6f595
commit b3fee3cc36
4 changed files with 26 additions and 22 deletions

View File

@ -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" COMMENT= "curses-based URL ripper"
@ -32,6 +32,7 @@ CONFIGURE_ENV= LIBS=-lcurses
pre-build: pre-build:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/urlview.c @perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/urlview.c
@perl -pi -e "s,/etc,${SYSCONFDIR},g" ${WRKSRC}/urlview.man
post-install: post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/urlview ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/urlview

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/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 # De-installation setup of urlview
@ -8,7 +8,7 @@
set -e set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local} 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 # 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 "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:" echo "| these steps as root:"
echo "|" echo "|"
echo "| rm -f ${CONFIG_DIR}/urlview.conf" echo "| rm -f ${CONFIG_FILE}"
echo "|" echo "|"
echo "| Do not do this if you plan on re-installing $1" echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time." echo "| at some future time."
@ -38,7 +38,9 @@ fi
# #
case $2 in case $2 in
DEINSTALL) DEINSTALL)
do_notice "$1" if [ ${PKG_DELETE_EXTRA} != Yes -a -f ${CONFIG_FILE} ]; then
do_notice "$1"
fi
;; ;;
*) *)
echo "usage: $0 distname DEINSTALL" >&2 echo "usage: $0 distname DEINSTALL" >&2

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/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 # Pre/post-installation setup of urlview
@ -9,20 +9,21 @@ set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local} PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR} 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 # Function: install configuration files
# #
do_install_conf() do_install_conf()
{ {
install -d -o root -g wheel ${CONFIG_DIR} install -d -o root -g wheel ${CONFIG_DIR}
install -m 0644 -o root -g wheel ${SAMPLE_CONFIG_DIR}/sample.urlview \ install -m 0644 -o root -g wheel ${SAMPLE_CONFIG_FILE} ${CONFIG_FILE}
${CONFIG_DIR}/urlview.conf
echo echo
echo "+---------------" echo "+---------------"
echo "| The $1 configuration files have been installed in ${CONFIG_DIR}." echo "| The $1 configuration file ${CONFIG_FILE},"
echo "| Please view these files and change the configuration to meet" echo "| has been installed. Please view this file and change"
echo "| your needs." echo "| the configuration to meet your needs."
echo "+---------------" echo "+---------------"
echo echo
} }
@ -33,10 +34,10 @@ do_notice_conf()
{ {
echo echo
echo "+---------------" echo "+---------------"
echo "| The existing $1 configuration files in ${CONFIG_DIR} have NOT" echo "| The existing $1 configuration file, ${CONFIG_FILE}"
echo "| been changed. You may want to compare them to the current samples" echo "| has NOT been changed. You may want to compare it to the"
echo "| in ${SAMPLE_CONFIG_DIR}, and update your configuration files" echo "| current sample file, ${SAMPLE_CONFIG_FILE},"
echo "| as needed." echo "| and update your configuration as needed."
echo "+---------------" echo "+---------------"
echo echo
} }
@ -55,12 +56,10 @@ case $2 in
: nothing to pre-install for this port : nothing to pre-install for this port
;; ;;
POST-INSTALL) POST-INSTALL)
if [ ! -d ${CONFIG_DIR} ]; then if [ -f ${CONFIG_FILE} ]; then
do_install_conf "$1"
elif [ ! -f ${CONFIG_DIR}/urlview.conf ]; then
do_install_conf "$1"
else
do_notice_conf "$1" do_notice_conf "$1"
else
do_install_conf "$1"
fi fi
;; ;;
*) *)

View File

@ -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 bin/urlview
man/man1/urlview.1 man/man1/urlview.1
share/examples/urlview/sample.urlview share/examples/urlview/sample.urlview
share/examples/urlview/url_handler.sh share/examples/urlview/url_handler.sh
@dirrm share/examples/urlview @dirrm share/examples/urlview
@cwd ${SYSCONFDIR}
@extra urlview.conf