1 # $NetBSD: Makefile,v 1.7 2011/11/08 15:42:27 taca Exp $
4 DISTNAME= dnsdoctor-1.0.1
6 MASTER_SITES= http://www.dnsdoctor.org/download/
9 MAINTAINER= pkgsrc-users@NetBSD.org
10 HOMEPAGE= http://www.dnsdoctor.org/
11 COMMENT= DNS zones misconfigurations or inconsistencies diagnostic tool
14 DEPENDS+= ruby${RUBY_VER}-base>=${RUBY_VERSION}:../../lang/ruby${RUBY_VER}-base
16 WRKSRC= ${WRKDIR}/dnsdoctor
18 # Config name conflict, need many changes.
19 RUBY_VERSION_SUPPORTED= 18
22 DDOC_HTML_PATH?= /dnsdoctor
24 DDOCEGDIR= ${EGDIR}/dnsdoctor
25 # No we don't want to use PKG_SYSCONFSUBDIR
26 DDOCCONFDIR= ${PKG_SYSCONFDIR}/dnsdoctor
27 OWN_DIRS= ${PKG_SYSCONFDIR}/dnsdoctor
29 RUBY_ENCODING_ARG= -Ku
30 REPLACE_RUBY+= contrib/dig.rb dnsdoctor/zc.rb
32 DDOC_INSTALLER_RB_ARGS+= -DRUBY=${RUBY:Q}
33 DDOC_INSTALLER_RB_ARGS+= -DPREFIX=${PREFIX:Q}
34 DDOC_INSTALLER_RB_ARGS+= -DEGDIR=${PREFIX:Q}/${EGDIR:Q}
35 DDOC_INSTALLER_RB_ARGS+= -DETCDIR=${PKG_SYSCONFDIR:Q}
36 DDOC_INSTALLER_RB_ARGS+= -DHTML_PATH=${DDOC_HTML_PATH:Q}
38 CONF_FILES+= ${DDOCEGDIR}/afnic.profile ${DDOCCONFDIR}/afnic.profile
39 CONF_FILES+= ${DDOCEGDIR}/de.profile ${DDOCCONFDIR}/de.profile
40 CONF_FILES+= ${DDOCEGDIR}/default.profile ${DDOCCONFDIR}/default.profile
41 CONF_FILES+= ${DDOCEGDIR}/reverse.profile ${DDOCCONFDIR}/reverse.profile
42 CONF_FILES+= ${DDOCEGDIR}/rootservers ${DDOCCONFDIR}/rootservers
43 CONF_FILES+= ${DDOCEGDIR}/dnsdoctor.conf ${DDOCCONFDIR}/dnsdoctor.conf
45 MAKE_ENV+= DESTDIR=${DESTDIR}
49 ${RUBY} ./installer.rb ${DDOC_INSTALLER_RB_ARGS} configure configinfo
52 ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
53 ${RUBY} ${RUBY_ENCODING_ARG} ./installer.rb \
54 ${DDOC_INSTALLER_RB_ARGS} all
55 ${INSTALL_DATA} ${WRKSRC}/www/dnsdoctor.conf \
56 ${DESTDIR}${PREFIX}/${DDOCEGDIR}/httpd-dnsdoctor.conf
58 .include "../../lang/ruby/replace.mk"
59 .include "../../mk/bsd.pkg.mk"