=== modified file 'IkiWiki/Plugin/meta.pm'
--- IkiWiki/Plugin/meta.pm	
+++ IkiWiki/Plugin/meta.pm	
@@ -11,6 +11,10 @@
 my %permalink;
 my %author;
 my %authorurl;
+my %podurl;
+my %podfile;
+my %podlen;
+my %podtype;
 
 sub import { #{{{
 	IkiWiki::hook(type => "preprocess", id => "meta", 
@@ -27,6 +31,15 @@
 	$meta{$params{page}}='';
 
 	return $params{content};
+} # }}}
+
+sub pod_meta ($) { #{{{
+	my $page=shift;
+
+	if (defined $podurl{$page} && defined $podtype{$page}) {
+		$meta{$page}.="<link rel=\"alternate\" href=\"".$podurl{$page}."\" media=\"speech\" type=\"".$podtype{$page}."\" />\n";
+	}
+
 } # }}}
 
 sub preprocess (@) { #{{{
@@ -64,6 +77,22 @@
 		$permalink{$page}=$value;
 		$meta{$page}.="<link rel=\"bookmark\" href=\"".encode_entities($value)."\" />\n";
 	}
+	elsif ($key eq 'podurl') {
+		$podurl{$page}=encode_entities($value);
+	}
+	elsif ($key eq 'podfile') {
+		$podfile{$page}=$value;
+		my ($a, $b, $c, $d, $e, $f, $g, $size)  = stat($value);
+		$podlen{$page}=$size;
+		require File::MimeInfo;
+		$podtype{$page}=File::MimeInfo::mimetype($value);
+	}
+	elsif ($key eq 'podlen') {
+		$podlen{$page}=$value;
+	}
+	elsif ($key eq 'podtype') {
+		$podtype{$page}=$value;
+	}
 	else {
 		$meta{$page}.="<meta name=\"".encode_entities($key).
 			"\" content=\"".encode_entities($value)."\" />\n";
@@ -83,6 +112,8 @@
         my $page=$params{page};
         my $template=$params{template};
 
+	pod_meta($page);
+
 	$template->param(meta => $meta{$page})
 		if exists $meta{$page} && $template->query(name => "meta");
 	if (exists $title{$page} && $template->query(name => "title")) {
@@ -95,7 +126,16 @@
 		if exists $author{$page} && $template->query(name => "author");
 	$template->param(authorurl => $authorurl{$page})
 		if exists $authorurl{$page} && $template->query(name => "authorurl");
-	
+
+	if (defined $podurl{$page} && 
+		defined $podlen{$page} && defined $podtype{$page}) {
+		if ($template->query(name => "podcast")) {
+			$template->param("podcast" => 1);
+			$template->param(podurl => $podurl{$page});
+			$template->param(podlen => $podlen{$page});
+			$template->param(podtype => $podtype{$page});
+		}
+	}
 } # }}}
 
 1

=== modified file 'Makefile.PL'
--- Makefile.PL	
+++ Makefile.PL	
@@ -55,6 +55,7 @@
 
 WriteMakefile(
 	'NAME'		=> 'IkiWiki',
+	'PREFIX'	=> '/usr',
 	'PM_FILTER'	=> './pm_filter $(PREFIX) $(VER)',
 	'EXE_FILES'	=> ['ikiwiki'],
 	'MAN1PODS'	=> {},

=== modified file 'doc/features.mdwn'
--- doc/features.mdwn	
+++ doc/features.mdwn	
@@ -58,6 +58,9 @@
   Ikiwiki can also [[plugins/aggregate]] external blogs, feeding them into
   the wiki. This can be used to create a Planet type site that aggregates
   interesting feeds.
+
+  You can also do podcasts by using the [[meta]] plugin. Simply define the
+  links and make the files available.
 
 * [[tags]]
 

=== modified file 'doc/install.mdwn'
--- doc/install.mdwn	
+++ doc/install.mdwn	
@@ -7,7 +7,7 @@
 installed, and also uses the following perl modules if available: 
 `CGI::Session` `CGI::FormBuilder` (version 3.02.02 or newer)
 `HTML::Template` `Mail::SendMail` `Time::Duration` `Date::Parse`,
-`HTML::Scrubber`, `RPC::XML`, `XML::Simple`, `XML::Feed`.
+`HTML::Scrubber`, `RPC::XML`, `XML::Simple`, `XML::Feed`, `File::MimeInfo`.
 
 Various [[plugins]] use other libraries and utlities; see their individual
 documentation for details.

=== modified file 'doc/plugins/inline.mdwn'
--- doc/plugins/inline.mdwn	
+++ doc/plugins/inline.mdwn	
@@ -20,7 +20,8 @@
   Set to 0 to show all matching pages.
 * `rss` - Controls generation of an RSS feed. On by default, set to "no" to
   disable.
-* `rootpage` - Enables a form to post new pages to a [[blog]].
+* `rootpage` - Enables a form to post new pages to a [[blog]]. See the [[meta]]
+  plugin if you want to do podcasts as well.
 * `archive` - If set to "yes", only list page titles and some metadata, not
   full controls.
 * `raw` - Rather than the default behavior of creating a [[blog]],

=== modified file 'doc/plugins/meta.mdwn'
--- doc/plugins/meta.mdwn	
+++ doc/plugins/meta.mdwn	
@@ -48,6 +48,25 @@
   Specifies a permanent link to the page, if different than the page
   generated by ikiwiki.
 
+* podcast
+
+  Specify an audio (or any type) file that should be interpreted as a
+  podcast. Add two meta items to the page.
+
+          \[[meta podurl="http://site/path.mp3"]]
+          \[[meta podfile="/path/to/local/file"]]
+
+  This will add a <link tag to the head of the page, pointing to the 
+  url you give. If you use the page as a blog entry then the file will be
+  seen as a podcast by subscribers who can use them. If you do not wish to
+  give the file then instead give the size and mime-type of the file, such as
+
+          \[[meta podlen="12345"]]
+          \[[meta podtype="audio/mpeg"]]
+
+  This is probably safer, but less convenient. To use the file method you
+  must have `File::MimeInfo` installed.
+
 If the field is not treated specially (as the link and title fields are),
 the metadata will be written to the generated html page as a &lt;meta&gt;
 header.

=== modified file 'templates/rssitem.tmpl'
--- templates/rssitem.tmpl	
+++ templates/rssitem.tmpl	
@@ -13,5 +13,8 @@
 	</TMPL_LOOP>
 	</TMPL_IF>
 	<pubDate><TMPL_VAR PUBDATE></pubDate>
+	<TMPL_IF NAME="PODCAST">
+	<enclosure url="<TMPL_VAR PODURL>" length="<TMPL_VAR PODLEN>" type="<TMPL_VAR PODTYPE>" />
+	</TMPL_IF>
 	<description><![CDATA[<TMPL_VAR CONTENT>]]></description>
 </item>

