123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- # $OpenBSD: Makefile,v 1.41 2017/05/30 21:05:44 sthen Exp $
- COMMENT = auto-discovering network management/monitoring system
- GH_ACCOUNT = librenms
- GH_PROJECT = librenms
- # used below
- GH_TAGNAME = 1.28
- EPOCH = 0
- CATEGORIES = net www
- HOMEPAGE = http://www.librenms.org/
- MAINTAINER = Stuart Henderson <sthen@openbsd.org>
- # GPLv3+
- PERMIT_PACKAGE_CDROM = Yes
- MODULES = lang/php \
- lang/python
- MODPY_BUILDDEP = No
- RUN_DEPENDS = databases/py-mysql \
- lang/php/${MODPHP_VERSION},-curl \
- lang/php/${MODPHP_VERSION},-gd \
- lang/php/${MODPHP_VERSION},-mcrypt \
- lang/php/${MODPHP_VERSION},-mysql \
- lang/php/${MODPHP_VERSION},-mysqli \
- lang/php/${MODPHP_VERSION},-snmp \
- net/fping \
- net/mtr \
- net/net-snmp \
- net/nmap \
- net/pear-Net-IPv4 \
- net/pear-Net-IPv6 \
- net/rrdtool \
- shells/bash \
- sysutils/ipmitool
- NO_BUILD = Yes
- NO_TEST = Yes
- PKG_ARCH = *
- PREFIX = /var/www
- INSTDIR = ${PREFIX}/librenms
- SUBST_VARS = INSTDIR MODPHP_BIN
- R = s,^\#!( )?(/usr/bin/env |/bin/)bash,\#!${LOCALBASE}/bin/bash,;
- R += s,^\#!( )?/usr/bin/(env )?python.*,\#!${MODPY_BIN},;
- R += s,^\#!( )?/usr/bin/(env )?php,\#!${MODPHP_BIN},;
- R += s,/opt/librenms,/var/www/librenms,g;
- R += s,/var/www/librenms,${TRUEPREFIX}/librenms,g;
- R += s,/usr/local,${LOCALBASE},g
- post-extract:
- find ${WRKSRC} -type f -print0 | xargs -r0 perl -pi -e '$R'
- do-install:
- ${INSTALL_DATA_DIR} ${INSTDIR}
- cd ${WRKSRC}; pax -rw . ${INSTDIR}
- find ${INSTDIR} -name '*.orig' -print0 | xargs -r0 rm
- mkdir -p ${INSTDIR}/{rrd,logs}
- cd ${INSTDIR}; sed -i 's,%PHP%,${MODPHP_BIN},' daily.sh poller-wrapper.py validate.php; \
- sed -i 's,%LNMS_VERSION%,${GH_TAGNAME},' html/pages/about.inc.php
- cp /usr/share/snmp/mibs/OPENBSD-* ${INSTDIR}/mibs/
- rm -r ${INSTDIR}/tests
- .include <bsd.port.mk>
|