# $NetBSD: Makefile,v 1.20 2002/05/22 18:02:32 fredb Exp $ # DISTNAME= nut-0.45.5 PKGNAME= ups-nut-0.45.5 PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.exploits.org/nut/release/ MAINTAINER= lukem@netbsd.org HOMEPAGE= http://www.exploits.org/nut/ COMMENT= Network UPS Tools BUILD_DEPENDS+= autoconf>=2.13:../../devel/autoconf USE_BUILDLINK_ONLY= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${NUT_CONFDIR} \ --with-user=${NUT_USER} \ --with-group=${NUT_GROUP} \ --with-statepath=${NUT_STATEDIR} \ --with-modelpath=${LOCALBASE}/sbin/ups-drivers PKG_SYSCONFSUBDIR?= nut NUT_CONFDIR= ${PKG_SYSCONFDIR} NUT_DOCDIR= ${PREFIX}/share/doc/nut NUT_EGDIR= ${PREFIX}/share/examples/nut NUT_STATEDIR= /var/db/nut NUT_USER?= nut NUT_GROUP?= nut FILES_SUBST+= NUT_CONFDIR=${NUT_CONFDIR} FILES_SUBST+= NUT_STATEDIR=${NUT_STATEDIR} MESSAGE_SUBST+= NUT_CONFDIR=${NUT_CONFDIR} MESSAGE_SUBST+= NUT_EGDIR=${NUT_EGDIR} PKG_GROUPS= ${NUT_GROUP} PKG_USERS= ${NUT_USER}:${NUT_GROUP}::Network\\ UPS\\ Tools::${SH} CONF_FILES= ${NUT_EGDIR}/hosts.conf.sample ${NUT_CONFDIR}/hosts.conf CONF_FILES+= ${NUT_EGDIR}/multimon.conf.sample ${NUT_CONFDIR}/multimon.conf CONF_FILES+= ${NUT_EGDIR}/upsset.conf.sample ${NUT_CONFDIR}/upsset.conf CONF_FILES+= ${NUT_EGDIR}/upssched.conf.sample ${NUT_CONFDIR}/upssched.conf CONF_FILES+= ${NUT_EGDIR}/ups.conf.sample ${NUT_CONFDIR}/ups.conf CONF_FILES_PERMS= ${NUT_EGDIR}/upsmon.conf.sample \ ${NUT_CONFDIR}/upsmon.conf \ ${ROOT_USER} ${ROOT_GROUP} 0600 CONF_FILES_PERMS+= ${NUT_EGDIR}/upsd.conf.sample \ ${NUT_CONFDIR}/upsd.conf \ ${ROOT_USER} ${ROOT_GROUP} 0600 CONF_FILES_PERMS+= ${NUT_EGDIR}/upsd.users.sample \ ${NUT_CONFDIR}/upsd.users \ ${ROOT_USER} ${ROOT_GROUP} 0600 RCD_SCRIPTS= ups upsd upsdriver upslog upsmon OWN_DIRS= ${NUT_CONFDIR} OWN_DIRS_PERMS= ${NUT_STATEDIR} ${NUT_USER} ${NUT_GROUP} 0770 pre-configure: cd ${WRKSRC}; ${LOCALBASE}/bin/autoreconf --force pre-install: @${INSTALL_DATA_DIR} ${NUT_EGDIR} @for script in ${RCD_SCRIPTS}; do \ ${SED} ${FILES_SUBST_SED} ${FILESDIR}/$${script}.sh \ > ${WRKDIR}/$${script}; \ done post-install: for script in ${RCD_SCRIPTS}; do \ ${INSTALL_SCRIPT} ${WRKDIR}/$${script} \ ${PREFIX}/etc/rc.d/$${script}; \ done ${INSTALL_DATA_DIR} ${NUT_DOCDIR} ${NUT_DOCDIR}/cables ${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${NUT_DOCDIR}/cables ${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${NUT_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${NUT_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/docs/Changes.trust ${NUT_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/README ${NUT_DOCDIR} .include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk"