Fixup fromcvs/togit conversion
[pkgsrcv2.git] / net / dnsdoctor / Makefile
1 # $NetBSD: Makefile,v 1.7 2011/11/08 15:42:27 taca Exp $
2 #
3
4 DISTNAME=       dnsdoctor-1.0.1
5 CATEGORIES=     net
6 MASTER_SITES=   http://www.dnsdoctor.org/download/
7 EXTRACT_SUFX=   .tgz
8
9 MAINTAINER=     pkgsrc-users@NetBSD.org
10 HOMEPAGE=       http://www.dnsdoctor.org/
11 COMMENT=        DNS zones misconfigurations or inconsistencies diagnostic tool
12 LICENSE=        gnu-gpl-v2
13
14 DEPENDS+=       ruby${RUBY_VER}-base>=${RUBY_VERSION}:../../lang/ruby${RUBY_VER}-base
15
16 WRKSRC=         ${WRKDIR}/dnsdoctor
17
18 # Config name conflict, need many changes.
19 RUBY_VERSION_SUPPORTED= 18
20 NO_BUILD=       yes
21
22 DDOC_HTML_PATH?=        /dnsdoctor
23 EGDIR=                  share/examples
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
28
29 RUBY_ENCODING_ARG=      -Ku
30 REPLACE_RUBY+=          contrib/dig.rb dnsdoctor/zc.rb
31
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}
37
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
44
45 MAKE_ENV+=              DESTDIR=${DESTDIR}
46
47 do-configure:
48         cd ${WRKSRC} && \
49         ${RUBY} ./installer.rb  ${DDOC_INSTALLER_RB_ARGS} configure configinfo
50
51 do-install:
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
57
58 .include "../../lang/ruby/replace.mk"
59 .include "../../mk/bsd.pkg.mk"