add rebuild after calling setup, better format for setup files
[ikiwiki.git] / ikiwiki.setup
1 #!/usr/bin/perl
2 # Configuration file for ikiwiki.
3 # Passing this to ikiwiki --setup will make ikiwiki generate tw
4 # wrapper programs, one for cgi and one for a subversion post-commit hook.
5 #
6 # Remember to re-run ikiwiki --setup any time you edit this file.
7
8 %config=(%config,
9         
10         wikiname => "MyWiki",
11
12         # Be sure to customise these..
13         srcdir => "/path/to/source",
14         templatedir => "/path/to/templates",
15         destdir => "/var/www/wiki",
16         url => "http://myhost/wiki",
17         cgiurl => "http://myhost/ikiwiki.cgi",
18         #historyurl => "http://svn.myhost/trunk/[[]]",
19         
20         # Whether to integrate with svn.
21         svn => 1,
22         svnrepo => "/svn/wiki",
23         
24         # Can anonymous web users edit pages?
25         #anonok => 1,
26
27 );      
28
29 gen_wrapper(%config,
30         
31         cgi => 1,
32         wrapper => "$config{destdir}/ikiwiki.cgi",
33         wrappermode => 06755,
34         
35 );
36 gen_wrapper(%config,
37         
38         # Note that this will overwrite any exsting post-commit hoo
39         # script, which may not be what you want.
40         wrapper => "$config{svnrepo}/hooks/post-commit",
41         wrappermode => 04755,
42
43 ) if $config{$svn};