4 # $Id: lxr.conf,v 1.40 2011/04/08 16:00:43 ajlittoz Exp $
7 ################################
8 # Global configuration section #
9 ################################
12 # Auxiliary tools subsection #
13 #============================#
15 # Place where lxr can write temporary files
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'
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
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,
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
80 # Language name, filepatten regexp, module to invoke,
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
90 , 'LXR::Lang::Generic'
95 , '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp$|\.hxx$|\.h\+\+$)' #'
96 , 'LXR::Lang::Generic'
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' ]
106 # [ 'Fortran', '(?i)\.f$|\.for$|\.ftn$|\.f77$|\.f90$|\.f95$', 'LXR::Lang::Generic' ]
107 , 'Java' => [ 'Java', '(?i)\.java$', 'LXR::Lang::Java', '4' ]
111 # , '(?i)\.cl$|\.clisp$|\.el$|\.l$|\.lisp$|\.lsp$|\.ml$'
112 # , 'LXR::Lang::Generic'
115 # No tabwidth specified here as an example
118 , '(?i)\.mak$|(?i)\.mk$|makefile*'
119 , 'LXR::Lang::Generic'
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' ]
138 # Maps interpreter names to languages. The format is:
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.
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.
150 , 'python' => 'Python'
158 ###############################
159 # Tree configuration sections #
160 ###############################
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'
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
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.
223 # The name to display for this source tree
224 , 'sourcerootname' => 'Kernel'
227 # Any parameters to the source access method should be specified below.
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!
238 { 'cachepath' => '/var/cache/lxr'
239 , 'do_annotate' => 1,
243 # Directories to always ignore. These usually are the SCM's
244 # private directories which possibly may contain non-public
246 , 'ignoredirs' => ['CVSROOT', '.git']
248 # Version selection subsection #
249 #==============================#
253 # Define typed variable "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
260 # , 'range' => [ readfile('src/versions') ]
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:
267 # { return ($files->allreleases($LXR::Common::pathname)
268 # ,$files->allrevisions($LXR::Common::pathname)
270 # } # deferred function call.
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.
278 # Simple example for any GIT repo:
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);
284 # return sort @files;
287 # Advanced example for Linus's upstream
288 # linux-2.6 kernel repository:
291 # use Linux::KernelSort;
292 # my $kernel = new Linux::KernelSort;
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);
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++)
303 # $files[$i] =~ s/^v//;
305 # @files = $kernel->sort (@files);
306 # for (my $i = 0; $i < scalar (@files); $i++)
308 # $files[$i] =~ s/^/v/;
314 # The default version to display
315 , 'default' => 'linux-3.1.4-1-ARCH'
318 # Define typed variable "a". First value is default.
320 { 'name' => 'Architecture'
321 , 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
325 # Subdirectory subsection #
326 #=========================#
328 # where to look for include files inside the sourcetree. This is used to hyperlink
330 , 'incprefix' => [ '/include', '/include/linux' ]
332 # These do funky things to paths in the system - you probably don't need them.
334 { '/include/asm[^\/]*/' => '/include/asm-$a/'
335 , '/arch/[^\/]+/' => '/arch/$a/'
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
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/'