| 1 | # New ports collection makefile for: dbAlerter | |
|---|---|---|
| 2 | # Date created: 05-01-2010 | |
| 3 | # Whom: Alan Snelson <Alan@Wave2.org> | |
| 4 | # | |
| 5 | # $FreeBSD$ | |
| 6 | # | |
| 7 | ||
| 8 | PORTNAME= dbalerter | |
| 9 | PORTVERSION= 0.4 | |
| 10 | CATEGORIES= databases | |
| 11 | MASTER_SITES= http://media.dbrecorder.org/ | |
| 12 | ||
| 13 | MAINTAINER= Alan@Wave2.org | |
| 14 | COMMENT= Standalone database monitor daemon | |
| 15 | ||
| 16 | WRKSRC= ${WRKDIR}/${DISTNAME}/daemon/ | |
| 17 | BUILD_DEPENDS= py*-MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb\ | |
| 18 | py*-xmpppy>=0.4.0:${PORTSDIR}/net-im/py-xmpppy | |
| 19 | ||
| 20 | USE_PYTHON= yes | |
| 21 | USE_PYDISTUTILS= easy_install | |
| 22 | PYDISTUTILS_PKGNAME= dbAlerter | |
| 23 | PYEASYINSTALL_UNINSTALLARGS= --no-deps -q -m -S ${PYTHON_SITELIBDIR} ${PYDISTUTILS_PKGNAME}==${PYDISTUTILS_PKGVERSION} | |
| 24 | ||
| 25 | .include <bsd.port.pre.mk> | |
| 26 | ||
| 27 | post-install: | |
| 28 | @${MKDIR} ${ETCDIR} | |
| 29 | @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/dbalerter.conf ${ETCDIR}/dbalerter.conf.sample | |
| 30 | @if [ ! -f ${ETCDIR}/dbalerter.conf ]; then \ | |
| 31 | ${CP} -p ${ETCDIR}/dbalerter.conf.sample ${ETCDIR}/dbalerter.conf; \ | |
| 32 | fi | |
| 33 | ||
| 34 | .include <bsd.port.post.mk> |
| 1 | Standalone database monitoring daemon. | |
|---|---|---|
| 2 | ||
| 3 | dbAlerter was written to provide timely notification of common | |
| 4 | database server issues (initially MySQL). | |
| 5 | ||
| 6 | Why another monitor? Well not every environment can be monitored | |
| 7 | easily or needs to be - think personal / hosted servers. | |
| 8 | ||
| 9 | The dbAlerter daemon runs alongside your database software and has | |
| 10 | access to local log files and resources that are often unavailable | |
| 11 | to external monitoring software. | |
| 12 | ||
| 13 | WWW: http://www.dbalerter.org/ |
| 1 | %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% | |
|---|---|---|
| 2 | @unexec if cmp -s %D/%%ETCDIR%%/dbalerter.conf.sample %D/%%ETCDIR%%/dbalerter.conf; then rm -f %D/%%ETCDIR%%/dbalerter.conf; fi | |
| 3 | %%ETCDIR%%/dbalerter.conf.sample | |
| 4 | @exec if [ ! -f %D/%%ETCDIR%%/dbalerter.conf ] ; then cp -p %D/%F %B/dbalerter.conf; fi | |
| 5 | @dirrmtry %%ETCDIR%% |