fix for package building
This commit is contained in:
parent
9812567fef
commit
cb11d49518
@ -1,45 +1,51 @@
|
||||
# $OpenBSD: Makefile,v 1.5 1999/03/28 19:25:39 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 1999/03/31 23:25:50 brad Exp $
|
||||
|
||||
DISTNAME= mrtg-2.7.2
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/
|
||||
|
||||
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
|
||||
USE_PERL5= yes
|
||||
|
||||
SYSCONFDIR= /etc/mrtg
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --sysconfdir=${SYSCONFDIR} --with-gd-lib=${PREFIX}/lib \
|
||||
--with-gd-inc=${PREFIX}/include/gd
|
||||
CONFIGURE_ARGS= --with-gd-lib=${PREFIX}/lib --with-gd-inc=${PREFIX}/include/gd
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} /etc/mrtg
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/mrtg
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mrtg
|
||||
for file in ${WRKSRC}/doc/*; do \
|
||||
${INSTALL_DATA} $$file ${PREFIX}/share/doc/mrtg/; \
|
||||
${INSTALL_DATA} $$file ${PREFIX}/share/doc/mrtg; \
|
||||
done
|
||||
for file in ${WRKSRC}/images/*.gif; do \
|
||||
${INSTALL_DATA} $$file ${PREFIX}/share/mrtg/; \
|
||||
${INSTALL_DATA} $$file ${PREFIX}/share/mrtg; \
|
||||
done
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/sample-mrtg.cfg /etc/mrtg/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/run/rateup ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/cfgmaker ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/indexmaker ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/mrtg ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/BER.pm /usr/lib/perl5/site_perl/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/SNMP_Session.pm /usr/lib/perl5/site_perl/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/SNMP_util.pm /usr/lib/perl5/site_perl/
|
||||
|
||||
post-install:
|
||||
@${ECHO} "***"
|
||||
@${ECHO} "*** Finished installing mrtg."
|
||||
@${ECHO} "*** Please create a MRTG config file in /etc/mrtg, take a look at the sample"
|
||||
@${ECHO} "*** config in /etc/mrtg or use cfgmaker to automatically generate a config."
|
||||
@${ECHO} "***"
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/run/rateup ${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/cfgmaker ${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/indexmaker ${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/run/mrtg ${PREFIX}/bin
|
||||
${MKDIR} ${PREFIX}/lib/mrtg
|
||||
${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 ${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} ""
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -2,6 +2,14 @@ bin/rateup
|
||||
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
|
||||
@ -20,18 +28,9 @@ share/mrtg/mrtg-l.gif
|
||||
share/mrtg/mrtg-m.gif
|
||||
share/mrtg/mrtg-r.gif
|
||||
share/mrtg/mrtg-ti.gif
|
||||
@dirrm lib/mrtg
|
||||
@dirrm share/mrtg
|
||||
@dirrm share/doc/mrtg
|
||||
@exec echo "***"
|
||||
@exec echo "*** Finished installing mrtg."
|
||||
@exec echo "*** Please create a MRTG config file in /etc/mrtg, take a look at the sample"
|
||||
@exec echo "*** config in /etc/mrtg or use cfgmaker to automatically generate a config."
|
||||
@exec echo "***"
|
||||
@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
|
||||
@unexec echo "***"
|
||||
@unexec echo "*** Finished uninstalling mrtg."
|
||||
@unexec echo "*** Please remove the /etc/mrtg directory if you"
|
||||
@unexec echo "*** don't want to keep the mrtg configuration files."
|
||||
@unexec echo "***"
|
||||
|
Loading…
Reference in New Issue
Block a user