- change ucd-snmp dependency from DEPENDS to BUILD_DEPENDS
- mkdir -> ${INSTALL_DATA_DIR} - install docs in share/doc/zebra and the examples in share/examples/zebra - ${FOO} -> $FOO in DEINSTALL/INSTALL - better INSTALL script, don't pointlessly install the samples in share/examples/zebra and then into /etc/zebra as well. tell the end user that they're installed in share/examples/zebra and let them deal with it.
This commit is contained in:
parent
a13b0d6f8e
commit
5a745305bf
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2000/08/23 16:06:03 peter Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2000/08/25 01:18:20 brad Exp $
|
||||
# KAME Id: Makefile,v 1.5 1999/09/13 16:27:41 itojun Exp
|
||||
|
||||
#
|
||||
@ -6,6 +6,7 @@
|
||||
#
|
||||
DISTNAME= zebra-0.88
|
||||
CATEGORIES= net
|
||||
NEED_VERSION= 1.320
|
||||
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/
|
||||
|
||||
HOMEPAGE= http://www.zebra.org/
|
||||
@ -17,6 +18,14 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
# you might need debugging, it's a developer release !
|
||||
#CFLAGS+= -g
|
||||
|
||||
SYSCONFDIR= /etc/zebra
|
||||
SUBST_VARS= SYSCONFDIR
|
||||
|
||||
CONFIGURE_STYLE= gnu
|
||||
|
||||
#
|
||||
# The snmp flavor doesn't quite work. The configue test for libsnmp.a
|
||||
# fails because the first test for it fails by not looking in
|
||||
@ -30,19 +39,15 @@ FLAVOR?=
|
||||
# CONFIGURE_ARGS+= --enable-vtysh
|
||||
|
||||
.if ${FLAVOR:L:Msnmp}
|
||||
DEPENDS+= net/ucd-snmp
|
||||
BUILD_DEPENDS= ${LOCALBASE}/lib/libsnmp.a::net/ucd-snmp
|
||||
CONFIGURE_ARGS+= --enable-snmp
|
||||
.endif
|
||||
|
||||
# you might need debugging, it's a developer release !
|
||||
#CFLAGS+= -g
|
||||
|
||||
SYSCONFDIR= /etc/zebra
|
||||
CONFIGURE_STYLE= gnu
|
||||
|
||||
post-install:
|
||||
mkdir -p ${WRKINST}/usr/local/share/zebra
|
||||
cp ${WRKINST}/etc/zebra/* ${WRKINST}/usr/local/share/zebra
|
||||
chmod 0644 ${WRKINST}/usr/local/share/zebra/*
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zebra
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/zebra
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/zebra
|
||||
${INSTALL_DATA} ${WRKSRC}/bgpd/README.mbgp ${PREFIX}/share/doc/zebra
|
||||
${INSTALL_DATA} ${WRKINST}/etc/zebra/* ${PREFIX}/share/examples/zebra
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.1 2000/08/23 16:05:42 peter Exp $
|
||||
# $OpenBSD: DEINSTALL,v 1.2 2000/08/25 01:18:21 brad Exp $
|
||||
#
|
||||
# zebra deinstallation
|
||||
|
||||
@ -7,15 +7,15 @@
|
||||
#
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
CONFIG_DIR=/etc/zebra
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
|
||||
if [ -d ${CONFIG_DIR} ]; then
|
||||
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 -rf ${CONFIG_DIR}"
|
||||
echo "| rm -rf $CONFIG_DIR"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
|
@ -1,19 +1,39 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.1 2000/08/23 16:05:42 peter Exp $
|
||||
# $OpenBSD: INSTALL,v 1.2 2000/08/25 01:18:21 brad Exp $
|
||||
#
|
||||
# Pre/post-installation setup of zebra
|
||||
|
||||
SAMPLES="bgpd.conf.sample bgpd.conf.sample2 ripd.conf.sample
|
||||
ripngd.conf.sample zebra.conf.sample ospfd.conf.sample
|
||||
ospf6d.conf.sample README.mbgp"
|
||||
|
||||
# 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=/etc/zebra
|
||||
SAMPLE_CONFIG_DIR=${PREFIX}/share/zebra
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/zebra
|
||||
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration files in $CONFIG_DIR,"
|
||||
echo "| have NOT been changed. You may want to compare them to the"
|
||||
echo "| current sample files in $SAMPLE_CONFIG_DIR,"
|
||||
echo "| and update your configuration as needed."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
do_notice_conf()
|
||||
{
|
||||
install -d -o root -g wheel -m 755 $CONFIG_DIR
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Sample $1 configuration files have been installed in"
|
||||
echo "| $SAMPLE_CONFIG_DIR. Please rename and install these files"
|
||||
echo "| into $CONFIG_DIR. Change the configuration to meet your needs."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# verify proper execution
|
||||
#
|
||||
@ -22,20 +42,6 @@ if [ $# -ne 2 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Function: tell the user what s/he needs to do to use the port just installed
|
||||
#
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Sample $1 configuration files have been installed in"
|
||||
echo "| ${CONFIG_DIR}. Please review and rename these files and change"
|
||||
echo "| the configuration to meet your needs."
|
||||
echo "+---------------"
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
@ -43,13 +49,11 @@ case $2 in
|
||||
: nothing to pre-install for this port
|
||||
;;
|
||||
POST-INSTALL)
|
||||
install -d -o root -g bin -m 755 /etc/zebra
|
||||
for file in ${SAMPLES}; do
|
||||
install -o root -g bin -m 444 \
|
||||
${PREFIX}/share/zebra/${file} \
|
||||
${CONFIG_DIR}
|
||||
done
|
||||
do_notice $1
|
||||
if [ ! -d $CONFIG_DIR ]; then
|
||||
do_notice_conf $1
|
||||
else
|
||||
do_notice $1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.7 2000/08/24 21:49:44 brad Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.8 2000/08/25 01:18:21 brad Exp $
|
||||
sbin/bgpd
|
||||
sbin/ospfd
|
||||
sbin/ospf6d
|
||||
@ -15,12 +15,14 @@ man/man8/ospfd.8
|
||||
man/man8/ripd.8
|
||||
man/man8/ripngd.8
|
||||
man/man8/zebra.8
|
||||
share/zebra/bgpd.conf.sample
|
||||
share/zebra/bgpd.conf.sample2
|
||||
share/zebra/ripd.conf.sample
|
||||
share/zebra/ripngd.conf.sample
|
||||
share/zebra/zebra.conf.sample
|
||||
share/zebra/ospfd.conf.sample
|
||||
share/zebra/ospf6d.conf.sample
|
||||
share/zebra/README.mbgp
|
||||
@dirrm share/zebra
|
||||
share/doc/zebra/README
|
||||
share/doc/zebra/README.mbgp
|
||||
share/examples/zebra/bgpd.conf.sample
|
||||
share/examples/zebra/bgpd.conf.sample2
|
||||
share/examples/zebra/ripd.conf.sample
|
||||
share/examples/zebra/ripngd.conf.sample
|
||||
share/examples/zebra/zebra.conf.sample
|
||||
share/examples/zebra/ospfd.conf.sample
|
||||
share/examples/zebra/ospf6d.conf.sample
|
||||
@dirrm share/doc/zebra
|
||||
@dirrm share/examples/zebra
|
||||
|
Loading…
Reference in New Issue
Block a user