summaryrefslogtreecommitdiff
path: root/debian/control
blob: 02974c4fa83e731d65f733663b8b6ba88f843827 (plain)
  1. Source: ikiwiki
  2. Section: web
  3. Priority: optional
  4. Build-Depends: perl, debhelper (>= 5)
  5. Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl
  6. Maintainer: Joey Hess <joeyh@debian.org>
  7. Standards-Version: 3.7.2
  8. XS-Vcs-Svn: svn://svn.kitenet.net/ikiwiki/trunk
  9. Package: ikiwiki
  10. Architecture: all
  11. Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.02.02), libtime-duration-perl, libcgi-session-perl (>= 4.14-1), libmail-sendmail-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl, liburi-perl
  12. Recommends: subversion | git-core | tla | mercurial, hyperestraier, libnet-openid-consumer-perl
  13. Suggests: viewvc | viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.05-1)
  14. Description: a wiki compiler
  15. ikiwiki converts a directory full of wiki pages into HTML pages suitable
  16. for publishing on a website. Unlike many wikis, ikiwiki does not have its
  17. own ad-hoc means of storing page history, and instead uses a revision control
  18. system such as Subversion or Git.
  19. .
  20. ikiwiki implements all of the other standard features of a wiki, including
  21. web-based page editing, user registration and logins, a RecentChanges
  22. page, BackLinks, search, Discussion pages, tags, smart merging and conflict
  23. resolution, page locking, and commit emails.
  24. .
  25. ikiwiki also supports generating news feeds (RSS and Atom) and blogging.
  26. ikiwiki provides a plugin system which allows many other features to be
  27. added. Some of the plugins have additional dependencies, found among the
  28. Recommends and Suggests of this package.
  29. .
  30. Homepage: http://ikiwiki.info/
_22" class="hl"> # Needs to update whenever a page is added or removed, so
  • # register a dependency.
  • add_depends($params{page}, $params{pages});
  • # Can't just return the linkmap here, since the htmlscrubber
  • # scrubs out all <object> tags (with good reason!)
  • # Instead, insert a placeholder tag, which will be expanded during
  • # formatting.
  • $mapnum++;
  • $maps{$mapnum}=\%params;
  • return "<div class=\"linkmap$mapnum\"></div>";
  • } # }}}
  • sub format (@) { #{{{
  • my %params=@_;
  • $params{content}=~s/<div class=\"linkmap(\d+)"><\/div>/genmap($1)/eg;
  • return $params{content};
  • } # }}}
  • sub genmap ($) { #{{{
  • my $mapnum=shift;
  • return "" unless exists $maps{$mapnum};
  • my %params=%{$maps{$mapnum}};
  • # Get all the items to map.
  • my %mapitems = ();
  • foreach my $item (keys %links) {
  • if (pagespec_match($item, $params{pages}, location => $params{page})) {
  • $mapitems{$item}=urlto($item, $params{destpage});
  • }
  • }
  • my $dest=$params{page}."/linkmap.png";
  • # Use ikiwiki's function to create the file, this makes sure needed
  • # subdirs are there and does some sanity checking.
  • will_render($params{page}, $dest);
  • writefile($dest, $config{destdir}, "");
  • # Run dot to create the graphic and get the map data.
  • my $pid;
  • my $sigpipe=0;
  • $SIG{PIPE}=sub { $sigpipe=1 };
  • $pid=open2(*IN, *OUT, "dot -Tpng -o '$config{destdir}/$dest' -Tcmapx");
  • # open2 doesn't respect "use open ':utf8'"
  • binmode (IN, ':utf8');
  • binmode (OUT, ':utf8');
  • print OUT "digraph linkmap$mapnum {\n";
  • print OUT "concentrate=true;\n";
  • print OUT "charset=\"utf-8\";\n";
  • print OUT "ratio=compress;\nsize=\"".($params{width}+0).", ".($params{height}+0)."\";\n"
  • if defined $params{width} and defined $params{height};
  • foreach my $item (keys %mapitems) {
  • print OUT "\"$item\" [shape=box,href=\"$mapitems{$item}\"];\n";
  • foreach my $link (map { bestlink($item, $_) } @{$links{$item}}) {
  • print OUT "\"$item\" -> \"$link\";\n"
  • if $mapitems{$link};
  • }
  • }
  • print OUT "}\n";
  • close OUT;
  • local $/=undef;