- upgrade to mrtg 2.7.4b

- add INSTALL and DEINSTALL scripts
This commit is contained in:
brad 1999-04-27 19:25:27 +00:00
parent 9d0765eadc
commit a8123dcc21
5 changed files with 109 additions and 28 deletions

View File

@ -1,18 +1,16 @@
# $OpenBSD: Makefile,v 1.8 1999/04/22 15:53:26 brad Exp $
# $OpenBSD: Makefile,v 1.9 1999/04/27 19:25:27 brad Exp $
DISTNAME= mrtg-2.7.3b
DISTNAME= mrtg-2.7.4b
CATEGORIES= net
MASTER_SITES= http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/
HOMEPAGE= http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
NEED_VERSION= 1.73
MAINTAINER= brad@openbsd.org
HOMEPAGE= http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
BUILD_DEPENDS= ${PREFIX}/lib/libgd.a:${PORTSDIR}/graphics/gd
USE_PERL5= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-gd-lib=${PREFIX}/lib --with-gd-inc=${PREFIX}/include/gd
@ -33,19 +31,9 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/run/BER.pm ${PREFIX}/lib/mrtg
${INSTALL_SCRIPT} ${WRKSRC}/run/SNMP_Session.pm ${PREFIX}/lib/mrtg
${INSTALL_SCRIPT} ${WRKSRC}/run/SNMP_util.pm ${PREFIX}/lib/mrtg
cp ${PREFIX}/lib/mrtg/BER.pm /usr/lib/perl5/site_perl
cp ${PREFIX}/lib/mrtg/SNMP_Session.pm /usr/lib/perl5/site_perl
cp ${PREFIX}/lib/mrtg/SNMP_util.pm /usr/lib/perl5/site_perl
${INSTALL_DATA} ${WRKSRC}/doc/sample-mrtg.cfg ${PREFIX}/lib/mrtg/mrtg.cfg.sample
@${ECHO} ""
@${ECHO} "*** The latest sample config file"
@${ECHO} "*** can be found in ${PREFIX}/lib/mrtg"
@if [ -f /etc/mrtg.cfg ]; then \
${ECHO} "*** Your /etc/mrtg.cfg has NOT been changed"; \
else \
cp ${PREFIX}/lib/mrtg/mrtg.cfg.sample /etc/mrtg.cfg; \
${ECHO} "*** mrtg.cfg has been copied into /etc"; \
fi
@${ECHO} ""
post-install:
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (mrtg-2.7.3b.tar.gz) = d5a342c28347f231a70054347bd5fc42
RMD160 (mrtg-2.7.3b.tar.gz) = 4ee194dbf348e04cf09369a97d78bc466af725ee
SHA1 (mrtg-2.7.3b.tar.gz) = 7fd3c21ffbfdba3adeb802b121fc0c88688372a4
MD5 (mrtg-2.7.4b.tar.gz) = 2f30710aa9668097e4a93820cdbd3df4
RMD160 (mrtg-2.7.4b.tar.gz) = 8c745ed74d4139f3a86442742d39248cfca900f4
SHA1 (mrtg-2.7.4b.tar.gz) = b7cfae3e86b09283a2c3fd9252771ac6f8390ffa

28
net/mrtg/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,28 @@
# $OpenBSD: DEINSTALL,v 1.1 1999/04/27 19:25:27 brad Exp $
#
# mrtg de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/mrtg.cfg
rm -f /usr/lib/perl5/site_perl/BER.pm
rm -f /usr/lib/perl5/site_perl/SNMP_Session.pm
rm -f /usr/lib/perl5/site_perl/SNMP_util.pm
if [ -f ${CONFIG_FILE} ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| this step as root:"
echo "|"
echo "| rm -f ${CONFIG_FILE}"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
fi
exit 0

72
net/mrtg/pkg/INSTALL Normal file
View File

@ -0,0 +1,72 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 1999/04/27 19:25:27 brad Exp $
#
# Pre/post-installation setup of mrtg
# 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_FILE=/etc/mrtg.cfg
cp ${PREFIX}/lib/mrtg/BER.pm /usr/lib/perl5/site_perl
cp ${PREFIX}/lib/mrtg/SNMP_Session.pm /usr/lib/perl5/site_perl
cp ${PREFIX}/lib/mrtg/SNMP_util.pm /usr/lib/perl5/site_perl
# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
{
echo
echo "+---------------"
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, ${PREFIX}/lib/mrtg/mrtg.cfg.sample,"
echo "| and update your configuration as needed."
echo "+---------------"
echo
}
# Function: install the system mrtg.cfg from the sample
#
do_install()
{
cp ${PREFIX}/lib/mrtg/mrtg.cfg.sample ${CONFIG_FILE}
echo
echo "+---------------"
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
}
# 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 [ -f $CONFIG_FILE ]; then
do_notice $1
else
do_install $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -3,13 +3,9 @@ bin/cfgmaker
bin/indexmaker
bin/mrtg
lib/mrtg/BER.pm
@exec cp %D/%F /usr/lib/perl5/site_perl
lib/mrtg/SNMP_Session.pm
@exec cp %D/%F /usr/lib/perl5/site_perl
lib/mrtg/SNMP_util.pm
@exec cp %D/%F /usr/lib/perl5/site_perl
lib/mrtg/mrtg.cfg.sample
@exec if [ ! -f /etc/mrtg.cfg ]; then cp %D/%F /etc/mrtg.cfg; fi
share/doc/mrtg/config.html
share/doc/mrtg/config.pod
share/doc/mrtg/config.txt
@ -31,6 +27,3 @@ share/mrtg/mrtg-ti.gif
@dirrm lib/mrtg
@dirrm share/mrtg
@dirrm share/doc/mrtg
@unexec rm -f /usr/lib/perl5/site_perl/BER.pm
@unexec rm -f /usr/lib/perl5/site_perl/SNMP_Session.pm
@unexec rm -f /usr/lib/perl5/site_perl/SNMP_util.pm