[Pkg-mono-svn-commits] rev 3795 - monodoc/trunk/debian
David Paleino
hanska-guest at alioth.debian.org
Sun Nov 23 14:12:00 UTC 2008
Author: hanska-guest
Date: 2008-11-23 14:12:00 +0000 (Sun, 23 Nov 2008)
New Revision: 3795
Removed:
monodoc/trunk/debian/dh_installmonodoc
monodoc/trunk/debian/postinst-monodoc
monodoc/trunk/debian/postrm-monodoc
monodoc/trunk/debian/update-monodoc
Modified:
monodoc/trunk/debian/changelog
monodoc/trunk/debian/control
monodoc/trunk/debian/copyright
monodoc/trunk/debian/monodoc-base.dirs
monodoc/trunk/debian/monodoc-base.install
monodoc/trunk/debian/monodoc-base.manpages
monodoc/trunk/debian/rules
Log:
Dumping "Monodoc Integration Framework" to /dev/null :(
Modified: monodoc/trunk/debian/changelog
===================================================================
--- monodoc/trunk/debian/changelog 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/changelog 2008-11-23 14:12:00 UTC (rev 3795)
@@ -19,25 +19,8 @@
- Include new mono-tools.{tree,source,zip} docs
[ David Paleino ]
- * Monodoc Integration Framework:
- + dh_installmonodoc
- - debian/dh_installmonodoc added
- - debian/monodoc-base.dirs added
- - debian/monodoc-base.install updated
- - debian/monodoc-base.manpages updated
- - debian/postinst-monodoc added
- - debian/postrm-monodoc added
- - debian/rules updated
- + update-monodoc
- - debian/control updated: needed dependency on libxml-libxml-perl on
- monodoc-base
- - debian/rules updated
- - debian/monodoc-base.manpages updated
- - debian/monodoc-base.dirs updated
- - debian/monodoc-base.install updated
- - debian/update-monodoc added
- * debian/copyright updated
- * Now using our Monodoc Integration Framework!
+ * debian/monodoc-base.dirs added
+ * debian/rules updated
* Group Policy:
- implement get-orig-source target in debian/rules
Modified: monodoc/trunk/debian/control
===================================================================
--- monodoc/trunk/debian/control 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/control 2008-11-23 14:12:00 UTC (rev 3795)
@@ -31,7 +31,7 @@
Package: monodoc-base
Architecture: all
-Depends: ${cli:Depends}, libxml-libxml-perl
+Depends: ${cli:Depends}
Description: shared MonoDoc binaries
The MonoDoc Project is the documentation framework of the Mono project which
provides detailed API documentation for all Mono components and the Mono CLI
Modified: monodoc/trunk/debian/copyright
===================================================================
--- monodoc/trunk/debian/copyright 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/copyright 2008-11-23 14:12:00 UTC (rev 3795)
@@ -2,13 +2,6 @@
Packaged-By: Mirco Bauer <meebey at meebey.net>
Packaged-Date: Mon, 26 Jan 2004 21:17:00 +0100
-Files: debian/dh_installmonodoc
- debian/postinst-monodoc
- debian/postrm-monodoc
- debian/update-monodoc
-Copyright: © 2008, David Paleino <d.paleino at gmail.com>
-License: GPL-2+
-
Files: debian/*
Copyright: © 2004-2008, Mirco Bauer <meebey at meebey.net>
License: GPL-2+
Deleted: monodoc/trunk/debian/dh_installmonodoc
===================================================================
--- monodoc/trunk/debian/dh_installmonodoc 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/dh_installmonodoc 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,163 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-dh_installmonodoc - register assemblies' documentation with Monodoc
-
-=cut
-
-use strict;
-use Debian::Debhelper::Dh_Lib;
-use File::Temp qw/ tempfile /;
-
-=head1 SYNOPSIS
-
-B<dh_monodoc> [S<I<debhelper options>>] [B<-n>]
-
-=head1 DESCRIPTION
-
-dh_monodoc is a debhelper program that is responsible for
-installing assemblies' documentation with Monodoc.
-
-It also automatically generates the postinst and prerm commands needed
-to register/unregister the documentation from the Monodoc registry.
-See L<dh_installdeb(1)> for an explanation of how this works.
-
-This is based on L<dh_installcligac(1)> in the cli-common-dev package.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-n>, B<--noscripts>
-
-Do not modify postinst/prerm scripts.
-
-=back
-
-=head1 NOTES
-
-Note that this command is not idempotent. "dh_clean -k" should be called
-between invocations of this command. Otherwise, it may cause multiple
-instances of the same text to be added to maintainer scripts.
-
-=cut
-
-init();
-
-foreach my $package (@{$dh{DOPACKAGES}}) {
- my $tmp = tmpdir($package);
-
- my $monodoc = pkgfile($package, "installmonodoc");
- my $line;
- my ($path, $basefile, $label, $parent);
-
- if ($monodoc ne '') {
- open MONODOC, "<$monodoc" or
- die "E: Can't open $monodoc\n";
-
- while (<MONODOC>)
- {
- chomp;
- $line = $_;
- $line =~ s/^\s*#.*//;
- $line =~ s/^\s+//;
- $line =~ s/\s+$//;
- next unless length($line);
-
- # Strip double spaces.
- $line =~ s/[ ]+/ /g;
- ($path, $basefile, $label, $parent) = split(/ /, $line, 4);
-
- # Handle " and ' without inner spaces
- if ($label =~ /([\"\']).*\1/) {
- $label =~ s/$1//g;
- }
- # The label usually has spaces, handle " and ' correctly.
- elsif ($label =~ /([\"\']).*/) {
- my $sep = $1;
- my $tmp = $parent if $parent;
- $tmp =~ s/(.*)[\"\'] [^\"\']*/$1/g;
- $label = "$label ".$tmp;
- $label =~ s/["']//g;
- $parent =~ s/${tmp}${sep}\s*//;
- $parent = "" if ($parent eq $tmp);
- }
- #print "$path $basefile «$label» --$parent--\n";
-
- if (! $path) {
- die "E: Please specify the \"path\"/\"name\" parameter for \"$label\".\n";
- } else {
- if ($basefile eq "none") {
- print "W: Skipping checks for \"$label\", as requested.\n";
- } else {
- if (! -d "$tmp$path") {
- die "E: Can't find specified path ($path) in temporary build directory ($tmp) for \"$label\"!\n";
- } else {
- if (! -f "$tmp$path$basefile.tree") {
- die "E: Can't find $basefile.tree in $tmp$path!\n";
- }
- if (! -f "$tmp$path$basefile.zip") {
- die "E: Can't find $basefile.zip in $tmp$path!\n";
- }
- if (! -f "$tmp$path$basefile.source") {
- die "E: Can't find $basefile.source in $tmp$path!\n";
- }
- }
- }
- }
- if (! $label) {
- die "E: Please specify a label.\n";
- }
-
- # Let's set defaults for optional parameters
- $parent = "various" if !$parent;
-
- # Let's install the documentation.
- print "Installing «$label» in local documentation registry... ";
-
- # We are currently using the "Local Registry" approach.
- # Please see http://wiki.debian.org/Teams/DebianMonoGroup/MonodocIntegration
- # for more information.
- if (! -d "$tmp/usr/share/monodoc/manuals.d") {
- doit("install","-d","$tmp/usr/share/monodoc/manuals.d");
- }
-
- # Let's create our temporary file.
- my ($fh, $filename);
- ($fh, $filename) = tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
-
- # This is our "registry file", same format as .installmonodoc, but ONE FILE PER MANUAL
- # (i.e. if .installmonodoc has 5 lines, we should have 5 files in manuals.d/.)
- print $fh "$basefile \"$label\" $parent\n" or return undef;
- if ($basefile eq "none") {
- # we use the "fake" path parameter to specify the filename, which will be used
- # in monodoc.xml, at the end.
- doit("install", "-m0644", $filename, "$tmp/usr/share/monodoc/manuals.d/$path");
- } else {
- doit("install", "-m0644", $filename, "$tmp/usr/share/monodoc/manuals.d/$basefile");
- }
- close $fh;
-
- print "done.\n";
- }
- close MONODOC;
-
- if (! $dh{NOSCRIPTS}) {
- autoscript($package, "postinst", "postinst-monodoc", "s/#PACKAGE#/$package/");
- autoscript($package, "postrm", "postrm-monodoc", "s/#PACKAGE#/$package/");
- }
- }
-}
-
-=head1 SEE ALSO
-
-L<debhelper(7)>
-
-This program is a part of cli-common-dev.
-
-=head1 AUTHOR
-
-David Paleino <d.paleino at gmail.com>
-
-=cut
Modified: monodoc/trunk/debian/monodoc-base.dirs
===================================================================
--- monodoc/trunk/debian/monodoc-base.dirs 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/monodoc-base.dirs 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,3 +1 @@
usr/bin/
-usr/sbin/
-usr/share/debhelper/autoscripts/
Modified: monodoc/trunk/debian/monodoc-base.install
===================================================================
--- monodoc/trunk/debian/monodoc-base.install 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/monodoc-base.install 2008-11-23 14:12:00 UTC (rev 3795)
@@ -4,9 +4,3 @@
debian/tmp/usr/lib/monodoc/*.exe
debian/tmp/usr/lib/pkgconfig/monodoc.pc
debian/tmp/usr/share/man
-
-debian/dh_installmonodoc usr/bin/
-debian/postinst-monodoc usr/share/debhelper/autoscripts/
-debian/postrm-monodoc usr/share/debhelper/autoscripts/
-
-debian/update-monodoc usr/sbin/
Modified: monodoc/trunk/debian/monodoc-base.manpages
===================================================================
--- monodoc/trunk/debian/monodoc-base.manpages 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/monodoc-base.manpages 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,4 +1,2 @@
debian/man/mod.1
debian/man/monodoc.1
-debian/man/dh_installmonodoc.1
-debian/man/update-monodoc.1
Deleted: monodoc/trunk/debian/postinst-monodoc
===================================================================
--- monodoc/trunk/debian/postinst-monodoc 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/postinst-monodoc 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,3 +0,0 @@
-if [ "$1" = "configure" ] && [ -x /usr/sbin/update-monodoc ]; then
- /usr/sbin/update-monodoc
-fi
Deleted: monodoc/trunk/debian/postrm-monodoc
===================================================================
--- monodoc/trunk/debian/postrm-monodoc 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/postrm-monodoc 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,3 +0,0 @@
-if [ "$1" = "remove" ] || [ "$1" = "upgrade" ] && [ -x /usr/sbin/update-monodoc ]; then
- /usr/sbin/update-monodoc
-fi
Modified: monodoc/trunk/debian/rules
===================================================================
--- monodoc/trunk/debian/rules 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/rules 2008-11-23 14:12:00 UTC (rev 3795)
@@ -9,14 +9,9 @@
build: patch build-stamp
build-stamp:
dh_testdir
- ./configure --prefix=/usr
+ CSC=/usr/bin/csc ./configure --prefix=/usr
$(MAKE)
- # Generate the manpages
- for x in dh_installmonodoc update-monodoc; \
- do chmod +x debian/$$x; pod2man -c "Debhelper for Monodoc" debian/$$x > debian/man/$$x.1; \
- done
-
touch build-stamp
clean: clean-stamp unpatch
@@ -28,7 +23,6 @@
tools/monodocer1.exe.mdb tools/monodocs2html.exe \
tools/monodocs2html.exe.mdb tools/monodocs2slashdoc.exe \
tools/monodocs2slashdoc.exe.mdb
- rm -f debian/man/dh_installmonodoc.1 debian/man/update-monodoc.1
[ ! -f Makefile ] || $(MAKE) clean
rm -f build-stamp
rm -rf $$MONO_SHARED_DIR/.wapi
@@ -63,7 +57,6 @@
$(CURDIR)/debian/monodoc-base/usr/share/doc/monodoc-base/ChangeLog \
$(CURDIR)/debian/monodoc-manual/usr/share/doc/monodoc-manual/ChangeLog
dh_fixperms
- DH_AUTOSCRIPTDIR=$(CURDIR)/debian debian/dh_installmonodoc
dh_installdeb
dh_installxsp -V 1,2
dh_makeclilibs -m 1.0
Deleted: monodoc/trunk/debian/update-monodoc
===================================================================
--- monodoc/trunk/debian/update-monodoc 2008-11-23 13:30:53 UTC (rev 3794)
+++ monodoc/trunk/debian/update-monodoc 2008-11-23 14:12:00 UTC (rev 3795)
@@ -1,247 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-update-monodoc - updates monodoc.xml global documentation registry
-
-=cut
-
-use strict;
-use File::Temp qw/ tempfile /;
-use File::Basename;
-use XML::LibXML;
-
-=head1 SYNOPSIS
-
-B<update-monodoc> [B<-n>]
-
-=head1 DESCRIPTION
-
-B<update-monodoc> is a program taht handles the update of monodoc documentation database.
-It looks for files in /usr/share/monodoc/manuals.d/, and adds the corresponding nodes to
-/usr/lib/monodoc/monodoc.xml. This program is usually called on documentation postinst/postrm,
-or on monodoc postinst/postrm.
-
-=cut
-
-my $monodoc = "/usr/lib/monodoc/monodoc.xml";
-my $manuals = "/usr/share/monodoc/manuals.d";
-
-# Create the XML
-my $dom = XML::LibXML::Document->createDocument("1.0");
-
-# Add the root element
-# <node label="Mono Documentation" name="root:">
-my $root = XML::LibXML::Element->new("node");
-$root->setAttribute("label", "Mono Documentation");
-$root->setAttribute("name", "root:");
-$dom->setDocumentElement($root);
-
-my $parser = new XML::LibXML;
-
-# This is for non-existing parents
-my @dummy_parents;
-
-foreach my $file (glob("${manuals}/*")) {
- # This is to temporarily hide files, use with caution, you might break
- # monodoc.xml!
- next if $file =~ /_.*/;
-
- my %info = get_info($file);
- update_tree(%info);
-}
-
-# TODO: we should check for "second level childs". Any easy way to do
-# it? --David
-
-sub get_info {
- my $file = $_[0];
- my $line;
- my ($parent, $basefile, $label, $name);
- my %ret;
-
- open REGISTRY, "<$file" or
- die "E: Cannot open $file for reading!\n";
- while (<REGISTRY>) {
- my $line = $_;
- our ($basefile, $label, $parent, $name);
-
- # This is just in case someone edited them manually... :)
- $line =~ s/^\s*#.*//;
- $line =~ s/^\s+//;
- $line =~ s/\s+$//;
- next unless length($line);
-
- # Same checks as dh_installmonodoc
- ($basefile, $label, $parent) = split(/ /, $line, 3);
-
- # Handle " and ' without inner spaces
- if ($label =~ /([\"\']).*\1/) {
- $label =~ s/$1//g;
- }
- # The label usually has spaces, handle " and ' correctly.
- elsif ($label =~ /([\"\']).*/) {
- my $sep = $1;
- my $tmp = $parent if $parent;
- $tmp =~ s/(.*)[\"\'] [^\"\']*/$1/g;
- $label = "$label ".$tmp;
- $label =~ s/["']//g;
- $parent =~ s/${tmp}${sep}\s*//;
- $parent = "" if ($parent eq $tmp);
- }
-
- # We don't check everything again, that's maintainers duty.
- # TODO: is this correct? Or should we check everything again?
- # If we should check everything again, a separate Perl Module (.pm)
- # might be needed, to avoid code duplication. --David
-
- # Let's set defaults for optional parameters
- $parent = "various" if !$parent;
-
- my $parser = XML::LibXML->new();
- my $path = "/usr/lib/monodoc/sources/".$basefile.".source";
- if ($basefile eq "none") {
- # If $basefile is "none", it's intended, and we default to the
- # filename.
- $name = basename($file);
- } else {
- if (! -f $path) {
- die("E: Cannot find $path!\n");
- } else {
- my $source = $parser->parse_file($path);
- my $res = $source->findnodes("/monodoc/source");
- foreach my $element ($res->get_nodelist) {
- $name = $element->getAttribute("path");
- }
- }
- }
-
- $ret{"parent"} = $parent;
- $ret{"basefile"} = $basefile;
- $ret{"label"} = $label;
- $ret{"name"} = $name;
- }
- close REGISTRY;
-
- return %ret;
-}
-
-sub update_tree {
- my %info = @_;
- my $name = $info{"name"};
- my $basefile = $info{"basefile"};
- my $parent = $info{"parent"};
- my $label = $info{"label"};
-
- #print "$label\n";
-
- my @nodelist = $dom->getElementsByTagName("node");
-
- my $res = $dom->findnodes("//node");
-
- my $parent_found = 0;
-
- my $child = XML::LibXML::Element->new("node");
- $child->setAttribute("label", $label);
- $child->setAttribute("name", $name);
-
- foreach my $element ($res->get_nodelist) {
- my $el_name = $element->getAttribute("name");
- if ($el_name eq $parent) {
- $parent_found = 1;
-# print "Adding «$label» ($name) to $parent.\n";
- $element->appendChild($child);
- return;
- } else {
- next;
- }
-
- # If the element is already here, probably it's a "dummy parent".
- if ($el_name eq $name) {
- $element->setAttribute("label", $label);
- next;
- }
- }
-
- # We didn't find a parent node, create a dummy one.
- if (!$parent_found) {
- my $dummy_parent = XML::LibXML::Element->new("node");
- $dummy_parent->setAttribute("label", "dummy-$parent");
- $dummy_parent->setAttribute("name", "$parent");
- $dummy_parent->appendChild($child);
- $root->appendChild($dummy_parent);
- push(@dummy_parents, $parent);
- }
-}
-
-# Check for dummy parents hanging around -- move children to Various,
-# if a parent wasn't added before.
-foreach my $nodename (@dummy_parents) {
- my $found = 0;
- my $dummy;
-
- # Grab the node
- foreach my $element ($dom->findnodes("//node")->get_nodelist) {
-# print $element->getAttribute("label")."\n";
- if (($element->getAttribute("name") eq $nodename) and
- ($element->getAttribute("label") eq "dummy-$nodename")) {
- $dummy = $element;
- }
- }
-
- # Look for the "real" parent
- foreach my $element ($dom->findnodes("//node")->get_nodelist) {
- if (($element->getAttribute("name") eq $nodename) and
- ($element->getAttribute("label") ne "dummy-$nodename")) {
- $found = 1;
- foreach my $child ($dummy->childNodes) {
- $element->appendChild($child);
- }
- }
- }
-
- # The parent node wasn't added in the previous cycle, move everything
- # under "Various".
- if (!$found) {
- # TODO: do this in a more efficient way.
- foreach my $element ($dom->findnodes("//node")->get_nodelist) {
- if ($element->getAttribute("name") eq "various") {
- foreach my $child ($dummy->childNodes) {
- $element->appendChild($child);
- }
- }
- }
- }
-
- # Remove the node.
- $dummy->unbindNode();
-}
-
-# Use a temporary file to write the XML, just to be sure we don't
-# fail writing the monodoc.xml in the middle because of something
-# else (most notably: power failure?)
-my ($fh, $filename) = tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
-print $fh $dom->toString(2);
-close $fh;
-
-#print $dom->toString(2)."\n";
-
-system("mv $filename $monodoc");
-system("chmod a+r $monodoc");
-
-print "Regenerating Monodoc search index... ";
-system("monodoc --make-index 2>&1 >/dev/null");
-print "done.\n";
-
-
-=head1 SEE ALSO
-
-L<dh_installmonodoc(1)>
-
-This program is a part of monodoc-base.
-
-=head1 AUTHOR
-
-David Paleino <d.paleino at gmail.com>
-
-=cut
More information about the Pkg-mono-svn-commits
mailing list