updated on Thu Jan 12 00:00:55 UTC 2012
[aur-mirror.git] / lxr / lxr.conf
blob8428ec620e01bc67c1250cb9cecf24aa299e93e7
1 # -*- mode: perl -*-
2 # Configuration file
4 #       $Id: lxr.conf,v 1.40 2011/04/08 16:00:43 ajlittoz Exp $
7                 ################################
8                 # Global configuration section #
9                 ################################
11         {
12                 # Auxiliary tools subsection #
13                 #============================#
15                 # Place where lxr can write temporary files
16           'tmpdir' => '/tmp'
18                 # Define this OR the swish-e variable depending which search engine you want to use.
19                 # Path to glimpse executables.
20 #       , 'glimpsebin'   => '/usr/local/bin/glimpse'
21 #       , 'glimpseindex' => '/usr/local/bin/glimpseindex'
22                 # Location of SWISH-E binary
23         , 'swishbin' => '/usr/bin/swish-e'
25                 # Path to Exuberant Ctags executable
26         , 'ectagsbin' => '/usr/bin/ctags'
27                 # Location of the ectags.conf file
28         , 'ectagsconf' => '/usr/share/perl5/vendor_perl/LXR/Lang/ectags.conf'
30                 # Paths for CVS module
31         , 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
33                 # HTML subsection #
34                 #=================#
36                 # All paths in this subsection are relative to LXR root directory
38                 # Templates used for headers and footers
39         , 'htmlfatal'           => 'templates/html-fatal.html'
40         , 'htmlhead'            => 'templates/html-head.html'
41         , 'htmltail'            => 'templates/html-tail.html'
42         , 'htmldir'                     => 'templates/html-dir.html'
43         , 'htmlident'           => 'templates/html-ident.html'
44         , 'htmlident_refs'      => 'templates/html-ident-refs.html'
45         , 'htmlsearch'          => 'templates/html-search-swish.html'
47                 # htmlhead and htmltail can be customised for the various
48                 # LXR operations. Just replace html by source (listing file),
49                 # sourcedir (displaying directory), diff (difference markup),
50                 # ident (identifier search), search (free-text search)
51                 # as below (which changes nothing):
52 #       , 'sourcehead'          => 'templates/html-head.html'
53 #       , 'sourcedirhead'       => 'templates/html-head.html'
55         # Default identifier search constraint (in htmlident)
56 #   , 'identdefonly'        => 1
58                 # CSS style sheet
59         , 'stylesheet'          => 'templates/lxr.css'
61                 # Default character encoding
62         , 'encoding'    => 'iso-8859-1',
64                 # File content subsection #
65                 #=========================#
67                 # Which extensions to treat as images when browsing.  If a file is an image,
68                 # it is displayed.
69         , 'graphicfile' =>
70                 '(bitmap|bmp|gif|icon|jp2|jpg|jpeg|pjpg|pjpeg|png|tif|tiff|xbm|xpm)'
72                 # Location of the Generic.pm config file
73         , 'genericconf' => '/usr/share/perl5/vendor_perl/LXR/Lang/generic.conf'
75                 # How to map files to languages
76                 # Note that the string for the key and the first entry in the
77                 # array MUST match
78         , 'filetype' =>
79                         # Format is
80                         # Language name, filepatten regexp, module to invoke,
81                         # (optional )tabwidth
82                         # Note that to have another language supported by Generic.pm,
83                         # you must ensure that:
84                         # a) exuberant ctags supports it
85                         # b) generic.conf is updated to specify information about the language
86                         # c) the name of the language given here matches the entry in generic.conf
87                 { 'C' =>
88                         [ 'C'
89                         , '\.c$|\.pc$'
90                         , 'LXR::Lang::Generic'
91                         , '4'
92                         ]
93                 , 'C++' =>
94                         [ 'C++'
95                         , '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp$|\.hxx$|\.h\+\+$)'    #'
96                         , 'LXR::Lang::Generic'
97                         , '4'
98                         ]
100                         # Some languages are commented out until the relevant entries in generic.conf are made
101                         # The list here is the set supported by ctags 5.0.1
102         #       , 'Beta'    => [ 'Beta',   '(?i)\.bet$', 'LXR::Lang::Generic' ]
103                 , 'Cobol' => [ 'Cobol',  '(?i)\.cob$', 'LXR::Lang::Cobol' ]
104         #       , 'Eiffel'  => [ 'Eiffel', '(?i)\.e$',   'LXR::Lang::Generic' ]
105         #       , 'Fortran' =>
106         #               [ 'Fortran', '(?i)\.f$|\.for$|\.ftn$|\.f77$|\.f90$|\.f95$', 'LXR::Lang::Generic' ]
107                 , 'Java' => [ 'Java', '(?i)\.java$', 'LXR::Lang::Java', '4' ]
109         #       , 'Lisp' =>
110         #               [ 'Lisp'
111         #               , '(?i)\.cl$|\.clisp$|\.el$|\.l$|\.lisp$|\.lsp$|\.ml$'
112         #               , 'LXR::Lang::Generic'
113         #               ]
115                         # No tabwidth specified here as an example
116                 , 'Make' =>
117                         [ 'Make'
118                         , '(?i)\.mak$|(?i)\.mk$|makefile*'
119                         , 'LXR::Lang::Generic'
120                         ]
122         #       , 'Pascal' => [ 'Pascal', '(?i)\.p$|\.pas$',             'LXR::Lang::Generic' ]
123                 , 'Perl'   => [ 'Perl',   '(?i)\.pl$|\.pm$|\.perl$',     'LXR::Lang::Generic', '4' ]
124                 , 'php'    => [ 'php',    '(?i)\.php$|\.php3$|\.phtml$', 'LXR::Lang::Generic', '2' ]
125                 , 'Python' => [ 'Python', '(?i)\.py$|\.python$',         'LXR::Lang::Generic', '4' ]
127         #       , 'rexx'   => [ 'rexx',   '(?i)\.cmd$|\.rexx$|\.rx$',       'LXR::Lang::Generic' ]
128         #       , 'ruby'   => [ 'ruby',   '(?i)\.rb$',                      'LXR::Lang::Generic' ]
129         #       , 'scheme' => [ 'scheme', '(?i)\.sch$|\.scheme$|\.scm$|\.sm$', 'LXR::Lang::Generic' ]
130                 , 'shell' => [ 'shell', '(?i)\.sh$|\.bsh$|\.bash$|\.ksh$|\.zsh$', 'LXR::Lang::Generic' ]
132         #       , 's-Lang' => [ 's-Lang', '(?i)\.sl$',                'LXR::Lang::Generic' ]
133                 , 'SQL' => [ 'SQL', '(?i)\.sql$|\.pks$|\.pkb$',               'LXR::Lang::Generic' ]
134                 , 'VB'  => [ 'VB',  '(?i)\.bas$|\.cls$|\.ctl$|\.frm$|\.vbs$', 'LXR::Lang::Generic' ]
135         #       , 'tcl' => [ 'tcl', '(?i)\.tcl$|\.wish$',                     'LXR::Lang::Generic' ]
136                 }
138                 # Maps interpreter names to languages.  The format is:
139                 #  regexp => langname
140                 #   regexp is matched against the part after #! on the first line of a file
141                 #   langname must match one of the keys in filetype above.
142                 #
143                 # This mapping is only used if the filename doesn't match a pattern above, so
144                 # a shell script called shell.c will be recognised as a C file, not a shell file.
146         , 'interpreters' =>
147                 { 'perl'        => 'Perl'
148                 , 'bash'        => 'shell'
149                 , 'csh'         => 'shell'
150                 , 'python'      => 'Python'
151                 , 'ksh'         => 'shell'
152                 , 'zsh'         => 'shell'
153                 , 'sh'          => 'shell'
154                 , 'ksh'         => 'shell'
155                 }
156         }
158                 ###############################
159                 # Tree configuration sections #
160                 ###############################
162 ,       {
164                 # Server configuration subsection #
165                 #=================================#
167                 # Configuration for http://192.168.1.3/lxr.
168                 # baseurl is used to select configuration block.
169           'baseurl' => 'http://localhost/lxr'    # Put your URL here
170                      # baseurl_aliases allows other URLs to be used to reach the site
171                      # comment this out if you do not want any aliases
172 #       , 'baseurl_aliases' =>
173 #                       [ 'http://localhost/lxr'
174 #                       , 'http://mydomain/lxr'
175 #                       ]
176         , 'virtroot'    => '/lxr'   # The bit after the / above
178                 # Pattern for extracting tree name from URL
179         , 'treeextract' => '([^/]*)/[^/]*$'
181                 # Character encoding (overrides default)
182         , 'encoding'    => 'iso-8859-1'
184                 # a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
185                 #   example for cvsweb:
186 #       , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi'
187 #       , 'cvswebpostfix' => '?cvsroot=rootname'
188                 #   example for viewcvs:
189 #       , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot'
190 #       , 'cvswebpostfix' => ''
192                 # Tree location subsection #
193                 #==========================#
195                 # sourceroot - where to get the source files from
197                 # For ordinary directories, this specifies a directory which has each version as a
198                 # subdirectory e.g.
199                 #  indexed-src/version1/...
200                 #  indexed-src/version2/...
201                 # The names of the version directories must match the values for the Version
202                 # variable (see the version selection subsection).
203         , 'sourceroot' => '/usr/src'
205                 # Alternatively, this can specify a CVS repository by setting the value to "cvs:"
206                 # followed by the path to the repository.  Note this must be file accessible - remote
207                 # server access does NOT work.
208 #       , 'sourceroot'  => 'cvs:/hom/karsk/a/CVSROOT/linux'
210                 # For a BitKeeper repository, specify bk: followed by the path to the
211                 # repository.  For BK it is also necessary to specify a 'cachepath' parameter in
212                 # the 'sourceparams' value below.  This should point to a directory where the
213                 # code can write and read files.
214 #       , 'sourceroot' => 'bk:/some/repository/here'
216                 # Finally, you can also use GIT, Linux Kernel's new
217                 # distributes SCM to access the history:
218 #       , 'sourceroot' => 'git:/some/repository/.git'
219                 # The `sourceroot' config variable points to the directory
220                 # in which you find the `objects', `refs', `index' etc.
221                 # directories.
223                 # The name to display for this source tree
224         , 'sourcerootname' => 'Kernel'
226                 #
227                 # Any parameters to the source access method should be specified below.
228                 #
229                 # BK:   'cachepath' is used for temporary files
230                 # GIT:  if `do_annotations' is non-zero, the file revision that
231                 #               introduced each line is displayed.
232                 #       `do_blame' will add the author of each line to the
233                 #               output. Keep in mind that the core LXR code
234                 #               will only request author information if
235                 #               annotations are switched on, too!
236                 #
237         , 'sourceparams' =>
238                         { 'cachepath'   => '/var/cache/lxr'
239                         , 'do_annotate' => 1,
240                         , 'do_blame'    => 1
241                         }
243                 # Directories to always ignore. These usually are the SCM's
244                 # private directories which possibly may contain non-public
245                 # project history.
246         , 'ignoredirs' => ['CVSROOT', '.git']
248                   # Version selection subsection #
249                   #==============================#
251         , 'variables' =>
253                         # Define typed variable "v".
254                 { 'v' =>
255                         { 'name' => 'Version'
256                                 # This is the list of versions to index.
257                                 # This can come from a file, a function or be explicitly
258                                 # ennumerated.
259                                 # From a file:
260                 #       , 'range' => [ readfile('src/versions') ]
261                                 # Explicitly:
262 #                       , 'range' => [qw(v1 v2 v3.1 v4 experimental)]
263                                 # If files within a tree can have different versions,
264                                 # e.g in a CVS tree, 'range' can be specified as a
265                                 # function to call for each file:
266                 #       , 'range' => sub
267                 #               { return        ($files->allreleases($LXR::Common::pathname)
268                 #                                       ,$files->allrevisions($LXR::Common::pathname)
269                 #                                       )
270                 #               }  # deferred function call.
271                                 #
272                                 # When using a GIT repo, you can use its tags
273                                 # to create a list of versions. As an extra
274                                 # bonus, with the Linux::KernelSort Perl module,
275                                 # you can properly sort kernel versions. Just
276                                 # leave it off for generic projects.
277                                 #
278                                 #       Simple example for any GIT repo:
279                 #       , 'range' => sub
280                 #               { my $some_dir = "/path/to/project/.git/refs/tags";
281                 #                 opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
282                 #                 my @files = grep { -f "$some_dir/$_" } readdir (DIR);
283                 #                 closedir DIR;
284                 #                 return sort @files;
285                 #               }
286                                 #
287                                 #       Advanced example for Linus's upstream
288                                 #       linux-2.6 kernel repository:
289                                 #       'range' => sub
290                                 #               {
291                                 #                       use Linux::KernelSort;
292                                 #                       my $kernel = new Linux::KernelSort;
293                                 #
294                                 #                       my $some_dir = "/path/to/linux-2.6/.git/refs/tags";
295                                 #                       opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
296                                 #                       my @files = grep { -f "$some_dir/$_" } readdir (DIR);
297                                 #                       closedir DIR;
298                                 #               # Linus's tags all have a leading "v"
299                                 #               # which we must cut off for sorting
300                                 #               # add again afterwards.
301                                 #                       for (my $i = 0; $i < scalar (@files); $i++)
302                                 #                       {
303                                 #                               $files[$i] =~ s/^v//;
304                                 #                       }
305                                 #                       @files = $kernel->sort (@files);
306                                 #                       for (my $i = 0; $i < scalar (@files); $i++)
307                                 #                       {
308                                 #                               $files[$i] =~ s/^/v/;
309                                 #                       }
310                                 #
311                                 #                       return @files;
312                                 #               }
314                                 # The default version to display
315                         , 'default' => 'linux-3.1.4-1-ARCH'
316                         }
318                         # Define typed variable "a".  First value is default.
319                 , 'a' =>
320                         { 'name'  => 'Architecture'
321                         , 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
322                         }
323                 }
325                   # Subdirectory subsection #
326                   #=========================#
328                 # where to look for include files inside the sourcetree.  This is used to hyperlink
329                 # to included files.
330         , 'incprefix' => [ '/include', '/include/linux' ]
332                 # These do funky things to paths in the system - you probably don't need them.
333         , 'maps' =>
334                         { '/include/asm[^\/]*/' => '/include/asm-$a/'
335                         , '/arch/[^\/]+/'       => '/arch/$a/'
336                         },
338                   # Data storage subsection #
339                   #=========================#
341                 # The DBI identifier for the database to use
342                 # For mysql, the format is dbi:mysql:dbname=<name>
343                 # for Postgres, it is dbi:Pg:dbname=<name>
344                 # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
345         , 'dbname' => 'dbi:mysql:dbname=lxr'
347                 # If you need to specify the username or password for the database connection,
348                 # uncomment the following two lines
349 #       , 'dbpass'              => 'foo'
350 #       , 'dbuser'              => 'lxr'
352                 # If you need multiple lxr configurations in one database, set different table
353                 # prefixes for them.
354 #       , 'dbprefix' => 'lxr_'
356                 # For using glimpse, the directory to store the .glimpse files in is required
357 #       , 'glimpsedir' => '/path/to/glimpse/databases'
359                 # Location of swish-e index database files if using swish-e
360         , 'swishdir' => '/var/lib/lxr/'
361         }