summaryrefslogtreecommitdiff
path: root/net/dnsdoctor
diff options
context:
space:
mode:
authortaca <taca>2010-09-10 07:34:34 +0000
committertaca <taca>2010-09-10 07:34:34 +0000
commit47287feb23834fcde504b12785f4a38d11008419 (patch)
tree23376a1fdeabb62dd521b55d49eabfd1aa2ef0ad /net/dnsdoctor
parentea843044363bf359b609cf8da2accfd2b6dfe6d2 (diff)
downloadpkgsrc-47287feb23834fcde504b12785f4a38d11008419.tar.gz
* Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk.
* Add LICENSE. * Ajust new ruby package's framework. * Add PKG_DESTDIR_SUPPORT. * Add "-Ku" option on shbang line to specify scripts' character encoding explicitly. (Hopefully, it work on ruby19).
Diffstat (limited to 'net/dnsdoctor')
-rw-r--r--net/dnsdoctor/Makefile35
-rw-r--r--net/dnsdoctor/distinfo4
-rw-r--r--net/dnsdoctor/patches/patch-aa34
3 files changed, 54 insertions, 19 deletions
diff --git a/net/dnsdoctor/Makefile b/net/dnsdoctor/Makefile
index 9601cae02a1..6ae10a57942 100644
--- a/net/dnsdoctor/Makefile
+++ b/net/dnsdoctor/Makefile
@@ -1,16 +1,19 @@
-# $NetBSD: Makefile,v 1.4 2010/09/07 17:20:26 taca Exp $
+# $NetBSD: Makefile,v 1.5 2010/09/10 07:34:34 taca Exp $
#
-DISTNAME= dnsdoctor-1.0.1
-CATEGORIES= net
-MASTER_SITES= http://www.dnsdoctor.org/download/src/
-EXTRACT_SUFX= .tgz
+DISTNAME= dnsdoctor-1.0.1
+CATEGORIES= net
+MASTER_SITES= http://www.dnsdoctor.org/download/src/
+EXTRACT_SUFX= .tgz
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.dnsdoctor.org/
-COMMENT= DNS zones misconfigurations or inconsistencies diagnostic tool
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.dnsdoctor.org/
+COMMENT= DNS zones misconfigurations or inconsistencies diagnostic tool
+LICENSE= gnu-gpl-v2
-DEPENDS+= ruby${RUBY_VER}-base>=${RUBY_REQD}:../../lang/ruby${RUBY_VER}-base
+DEPENDS+= ruby${RUBY_VER}-base>=${RUBY_REQD}:../../lang/ruby${RUBY_VER}-base
+
+PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/dnsdoctor
@@ -25,6 +28,9 @@ DDOCEGDIR= ${EGDIR}/dnsdoctor
DDOCCONFDIR= ${PKG_SYSCONFDIR}/dnsdoctor
OWN_DIRS= ${PKG_SYSCONFDIR}/dnsdoctor
+RUBY_ENCODING_ARG= -Ku
+REPLACE_RUBY+= contrib/dig.rb dnsdoctor/zc.rb
+
DDOC_INSTALLER_RB_ARGS+= -DRUBY=${RUBY:Q}
DDOC_INSTALLER_RB_ARGS+= -DPREFIX=${PREFIX:Q}
DDOC_INSTALLER_RB_ARGS+= -DEGDIR=${PREFIX:Q}/${EGDIR:Q}
@@ -38,15 +44,18 @@ CONF_FILES+= ${DDOCEGDIR}/reverse.profile ${DDOCCONFDIR}/reverse.profile
CONF_FILES+= ${DDOCEGDIR}/rootservers ${DDOCCONFDIR}/rootservers
CONF_FILES+= ${DDOCEGDIR}/dnsdoctor.conf ${DDOCCONFDIR}/dnsdoctor.conf
+MAKE_ENV+= DESTDIR=${DESTDIR}
+
do-configure:
cd ${WRKSRC} && \
${RUBY} ./installer.rb ${DDOC_INSTALLER_RB_ARGS} configure configinfo
do-install:
- cd ${WRKSRC} && \
- ${RUBY} ./installer.rb ${DDOC_INSTALLER_RB_ARGS} all
+ ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${RUBY} ${RUBY_ENCODING_ARG} ./installer.rb \
+ ${DDOC_INSTALLER_RB_ARGS} all
${INSTALL_DATA} ${WRKSRC}/www/dnsdoctor.conf \
- ${PREFIX}/${DDOCEGDIR}/httpd-dnsdoctor.conf
+ ${DESTDIR}${PREFIX}/${DDOCEGDIR}/httpd-dnsdoctor.conf
-.include "../../lang/ruby/rubyversion.mk"
+.include "../../lang/ruby/replace.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/dnsdoctor/distinfo b/net/dnsdoctor/distinfo
index b94d39cec95..470bc17b99d 100644
--- a/net/dnsdoctor/distinfo
+++ b/net/dnsdoctor/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2007/01/28 15:22:54 taca Exp $
+$NetBSD: distinfo,v 1.3 2010/09/10 07:34:35 taca Exp $
SHA1 (dnsdoctor-1.0.1.tgz) = 56a5d19d691c54d0fc701a655d1803980cbc1fb5
RMD160 (dnsdoctor-1.0.1.tgz) = 9e3d3f577b05558ef543cb7e864e6b0a0b4e098a
Size (dnsdoctor-1.0.1.tgz) = 353555 bytes
-SHA1 (patch-aa) = 493ae7976c03dc613144e7f412e2911057b01525
+SHA1 (patch-aa) = 8dab55ecede9f1275a486ab169bcce061d0a48bb
diff --git a/net/dnsdoctor/patches/patch-aa b/net/dnsdoctor/patches/patch-aa
index e3246b078fc..93128cf595c 100644
--- a/net/dnsdoctor/patches/patch-aa
+++ b/net/dnsdoctor/patches/patch-aa
@@ -1,8 +1,15 @@
-$NetBSD: patch-aa,v 1.1.1.1 2006/01/29 10:00:07 seb Exp $
+$NetBSD: patch-aa,v 1.2 2010/09/10 07:34:35 taca Exp $
--- installer.rb.orig 2004-09-08 12:14:43.000000000 +0000
+++ installer.rb
-@@ -71,6 +71,7 @@ class Installer
+@@ -65,12 +65,13 @@ class Installer
+ ENV['PROGNAME' ] ||= 'dnsdoctor'
+ ENV['HTML_PATH' ] ||= "/#{ENV['PROGNAME']}"
+ ENV['ETCDIST' ] ||= ''
+- ENV['CHROOT' ] ||= ''
++ ENV['CHROOT' ] ||= ENV['DESTDIR']
+
+ ENV['LIBEXEC' ] ||= "#{ENV['PREFIX']}/libexec"
ENV['BINDIR' ] ||= "#{ENV['PREFIX']}/bin"
ENV['MANDIR' ] ||= "#{ENV['PREFIX']}/man"
ENV['DOCDIR' ] ||= "#{ENV['PREFIX']}/share/doc"
@@ -24,7 +31,17 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/01/29 10:00:07 seb Exp $
@ch_confdir = "#{ENV['CHROOT']}#{@confdir}"
@ch_dnsdoctor = "#{ENV['CHROOT']}#{@dnsdoctor}"
@ch_wwwdir = "#{ENV['CHROOT']}#{@wwwdir}"
-@@ -181,10 +184,10 @@ class Installer
+@@ -141,8 +144,7 @@ class Installer
+ def patch_common
+ puts "==> Patching core components"
+ dnsdoctor_content = File.readlines(@ch_dnsdoctor)
+- [ [ /^\#!.*ruby/, "#!#{ENV['RUBY']}" ],
+- [ 'DDOC_INSTALL_PATH', "\\1\"#{@installdir}\"" ],
++ [ [ 'DDOC_INSTALL_PATH', "\\1\"#{@installdir}\"" ],
+ [ 'DDOC_CONFIG_DIR', "\\1\"#{ENV['ETCDIR']}/#{ENV['PROGNAME']}\""],
+ [ 'DDOC_LOCALIZATION_DIR', "\\1\"#{@installdir}/locale\"" ],
+ [ 'DDOC_TEST_DIR', "\\1\"#{@installdir}/test\"" ],
+@@ -181,10 +183,10 @@ class Installer
puts
puts "==> Installing default configuration file"
@@ -39,7 +56,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/01/29 10:00:07 seb Exp $
puts
end
-@@ -217,6 +220,7 @@ class Installer
+@@ -217,6 +219,7 @@ class Installer
puts "==> Installing HTML pages"
mkdir_p @ch_wwwdir, :verbose => @verbose
Dir["www/*"].each { |entry|
@@ -47,3 +64,12 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/01/29 10:00:07 seb Exp $
cp_r entry, @ch_wwwdir, :verbose => @verbose
}
puts
+@@ -323,7 +326,7 @@ info = false
+ # Sanity check
+ #
+ rubyver = `#{ENV['RUBY']} --version`
+-m = /^ruby\s+(\d+)\.(\d+)\.(\d+)\s+/.match(rubyver)
++m = /^ruby\s+(\d+)\.(\d+)\.([p0-9]+)\s+/.match(rubyver)
+ if m.nil?
+ $stderr.puts "ERROR: Invalid interpreter: #{ENV['RUBY']}"
+ exit EXIT_ERROR