[Pkg-ruby-extras-maintainers] r187 - in tools/ruby-pkg-tools/trunk: 1/class bin

Esteban Manchado Velázquez zoso at costa.debian.org
Wed Dec 28 13:13:22 UTC 2005


Author: zoso
Date: 2005-12-28 13:13:21 +0000 (Wed, 28 Dec 2005)
New Revision: 187

Added:
   tools/ruby-pkg-tools/trunk/bin/dh_rdoc
Modified:
   tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk
Log:
- Added DEB_RUBY_LIB_DOC_PACKAGES variable to ruby-setup-rb.mk, to hold the
  list of documentation packages
- Removed the DEB_INSTALL_DOCS_foo voodoo, as now we're generating
  documentation in a saner way
- Removed cruft target
- Added dh_rdoc script initial implementation
- Added dh_rdoc call hook for documentation packages


Modified: tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk
===================================================================
--- tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk	2005-12-20 20:12:06 UTC (rev 186)
+++ tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk	2005-12-28 13:13:21 UTC (rev 187)
@@ -48,11 +48,17 @@
 
 # Separate lib packages from the rest
 LIB_PACKAGE_FILTER = %-ruby $(patsubst %,\%-ruby%,$(DEB_RUBY_VERSIONS))
+LIB_DOC_PACKAGE_FILTER = %-ruby-doc
 DEB_RUBY_LIB_PACKAGES := $(strip $(filter $(LIB_PACKAGE_FILTER),$(DEB_ALL_PACKAGES)))
 DEB_RUBY_REAL_LIB_PACKAGES := $(strip $(filter-out %-ruby, $(DEB_RUBY_LIB_PACKAGES)))
 DEB_RUBY_DUMMY_LIB_PACKAGES := $(strip $(filter %-ruby, $(DEB_RUBY_LIB_PACKAGES)))
+DEB_RUBY_LIB_DOC_PACKAGES := $(strip $(filter $(LIB_DOC_PACKAGE_FILTER),$(DEB_ALL_PACKAGES)))
 DEB_RUBY_OTHER_PACKAGES := $(strip $(filter-out $(LIB_PACKAGE_FILTER),$(DEB_ALL_PACKAGES)))
 
+# Voodoo to add the "doc" directory to DEB_INSTALL_DOCS_foo, for every foo in
+# $(DEB_RUBY_LIB_DOC_PACKAGES)
+# $(foreach package,$(DEB_RUBY_LIB_DOC_PACKAGES),$(eval DEB_INSTALL_DOCS_$(package) += doc))
+
 cdbs_ruby_ver = $(filter-out %-,$(subst -ruby,- ,$(cdbs_curpkg)))
 
 push_cfg_file = if [ -f $(DEB_SRCDIR)/.config ]; then mv -f $(DEB_SRCDIR)/.config $(DEB_SRCDIR)/.config-$(1); fi
@@ -64,6 +70,9 @@
 	cd $(DEB_SRCDIR) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) setup $(DEB_RUBY_SETUP_ARGS)
 	$(call push_cfg_file,$(cdbs_curpkg))
 
+$(patsubst %,binary-install/%,$(DEB_RUBY_LIB_DOC_PACKAGES)) :: binary-install/% :
+	dh_rdoc -p$(cdbs_curpkg)
+
 clean::
 # Ignore errors from this rule.  In a tarball build, the file
 # may not exist.
@@ -77,8 +86,4 @@
 	cd $(DEB_SRCDIR) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) install --prefix=debian/$(cdbs_curpkg) $(DEB_RUBY_INSTALL_ARGS_ALL) $(DEB_RUBY_INSTALL_ARGS_$(cdbs_curpkg))
 	$(call push_cfg_file,$(cdbs_curpkg))
 
-$(patsubst %,install/%,$(DEB_RUBY_OTHER_PACKAGES)) :: install/% :
-	cd $(DEB_SRCDIR) && ruby $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && ruby $(DEB_RUBY_SETUP_CMD) install --prefix="debian/$(cdbs_curpkg)" $(DEB_RUBY_INSTALL_ARGS_ALL) $(DEB_RUBY_INSTALL_ARGS_$(cdbs_curpkg))
-	$(call push_cfg_file,$(cdbs_curpkg))
-
 endif

Added: tools/ruby-pkg-tools/trunk/bin/dh_rdoc
===================================================================
--- tools/ruby-pkg-tools/trunk/bin/dh_rdoc	2005-12-20 20:12:06 UTC (rev 186)
+++ tools/ruby-pkg-tools/trunk/bin/dh_rdoc	2005-12-28 13:13:21 UTC (rev 187)
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_rdoc - generates and installs Ruby documentation
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_rdoc> [S<I<debhelper options>>] [B<-d>] [S<I<library dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_rdoc is a debhelper program that is responsible for generating
+documentation, in both rdoc and RI formats.
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.6.2.1
+
+Ruby policy, unofficial proposed version
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+    my $doc_dir = tmpdir($package)."/usr/share/doc/$package/rdoc";
+    my $config  = pkgfile($package, 'rdoc');
+    my @dirs = ('lib');
+    if (-r $config) {
+        open F, $config;
+        @dirs = split(/\s/, <F>);
+        close F;
+    }
+    doit(qw(rdoc --all --inline-source --diagram --fileboxes --line-numbers --fmt=html -o), $doc_dir, @dirs);
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of ruby-pkg-tools.
+
+=head1 AUTHOR
+
+Esteban Manchado Velázquez <zoso at debian.org>
+
+=cut


Property changes on: tools/ruby-pkg-tools/trunk/bin/dh_rdoc
___________________________________________________________________
Name: svn:executable
   + *




More information about the pkg-ruby-extras-maintainers mailing list