# -*- mode: perl -*-
# Configuration file
#
# $Id: lxr.conf,v 1.47 2012/03/19 20:03:28 ajlittoz Exp $
#
(
################################
# Global configuration section #
################################
{
# Auxiliary tools subsection #
#============================#
# Place where lxr can write temporary files
'tmpdir' => '/tmp/'
# Define this OR the swish-e variable depending which search engine you want to use.
# Path to glimpse executables.
# e.g.: , 'glimpsebin' => '/usr/local/bin/glimpse'
, 'glimpsebin' => '/usr/local/bin/glimpse'
, 'glimpseindex' => '/usr/local/bin/glimpseindex'
# Location of SWISH-E binary
# e.g.: , 'swishbin' => '/usr/local/bin/swish-e'
# , 'swishbin' => '/usr/bin/swish-e'
# Location of the SWISH-E.conf file
# , 'swishconf' => '%LXRroot%/templates/swish-e.conf'
# Path to Exuberant Ctags executable
, 'ectagsbin' => '/usr/bin/ctags'
# Location of the ectags.conf file
#, 'ectagsconf' => '/usr/suse/lxr/lxr/ectags.conf'
, 'ectagsconf' => '/usr/suse/lxr/lxr/templates/ectags.conf'
# Paths for CVS module
# , 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
# Computer DNS names subsection #
#================================
, 'host_names' => [ 'http://localhost'
, 'http://127.0.0.1'
, 'http://mycomputer.outside.domain:12345'
]
# HTML subsection #
#=================#
# All paths in this subsection are relative to LXR root directory
# Templates used for headers and footers
, 'htmlfatal' => '/usr/suse/lxr/lxr/html/html-fatal.html'
, 'htmlhead' => '/usr/suse/lxr/lxr/html/html-head.html'
, 'htmltail' => '/usr/suse/lxr/lxr/html/html-tail.html'
, 'htmldir' => '/usr/suse/lxr/lxr/html/html-dir.html'
, 'htmlident' => '/usr/suse/lxr/lxr/html/html-ident.html'
, 'htmlsearch' => '/usr/suse/lxr/lxr/html/html-search-glimpse.html'
, 'htmlconfig' => '/usr/suse/lxr/lxr/html/html-config.html'
# htmlhead and htmltail can be customised for the various
# LXR operations. Just replace html by source (listing file),
# sourcedir (displaying directory), diff (difference markup),
# ident (identifier search), search (free-text search)
# as below (which changes nothing):
, 'sourcehead' => '/usr/suse/lxr/lxr/html/html-head.html'
, 'sourcedirhead' => '/usr/suse/lxr/lxr/html/html-head.html'
# showconfig script is a bit special since "version" has
# no meaning for it. Better to wipe out the 'variables' selection
# links with an adequate header:
, 'showconfighead' => '/usr/suse/lxr/lxr/html/config-head-btn-smaller.html'
# Default character width of left version (for diff)
, 'diffleftwidth' => 50
# Default identifier search constraint (for ident)
# , 'identdefonly' => 1
# CSS style sheet
#, 'stylesheet' => '/usr/suse/lxr/lxr/html/lxr.css'
, 'stylesheet' => 'lxr.css'
# , 'alternate_stylesheet' => [ 'lxrconf.d/another.css' ]
# Default character encoding
, 'encoding' => 'iso-8859-1',
# File management subsection #
#============================#
# Which extensions to treat as images when browsing. If a file is an image,
# it is displayed.
, 'graphicfile' =>
'bitmap|bmp|gif|icon?|jp2|jpe?g|pjpe?g|png|svg|tiff?|xbm|xpm'
# Which file extensions are associated with which icon
# Below is an example using 'Oxygen' theme available with KDE
# small-icons/ is a symbolic link to
# /usr/share/icons/oxygen/22x22/mimetypes/
# (This location is valid for Fedora distributions,
# check for others)
# , 'iconfolder' => 'small-icons/'
# Don't forget the final / above.
# , 'icons' =>
# { 'c|pc' => 'text-x-csrc.png'
# , 'h|hh' => 'text-x-chdr.png'
# , 'c\+\+|cc|cpp|cxx' => 'text-x-c++src.png'
# , 'hpp|hxx|h\+\+' => 'text-x-c++hdr.png'
# , 'java' => 'text-x-java.png'
# , 'js' => 'application-x-javascript.png'
# , 'pl|pm|perl' => 'application-x-perl.png'
# , 'php|php3|phtml' => 'application-x-php.png'
# , 'py|python' => 'text-x-python.png'
# , 'sh|bsh|bash|ksh|zsh' => 'text-x-script.png'
# , 's?html?' => 'text-html.png'
# , 'css' => 'text-css.png'
# , 'pdf' => 'application-pdf.png'
# , 'txt' => 'text-plain.png'
# , 'p|pas' => 'text-x-pascal.png'
# , 'patch' => 'text-x-patch.png'
# , 'sql' => 'text-x-sql.png'
# , 'rb' => 'application-x-ruby.png'
# , 'ui' => 'text-xml.png'
# , '.*\~' => 'application-x-trash'
# }
# , 'graphicicon' => 'image-x-generic.png'
# , 'defaulticon' => 'unknown.png'
# , 'diricon' => 'inode-directory.png'
# How to map files to languages
, 'filetypeconf' => '/usr/suse/lxr/lxr/filetype.conf'
# Location of the Generic.pm config file
, 'genericconf' => '/usr/suse/lxr/lxr/lib/LXR/Lang/generic.conf'
# "Common factor" subsection #
#============================#
# In case your LXR installation controls several trees,
# put here what you consider common parameters between
# your source trees.
# A parameter is "common" if its value must be simultaneously
# adjusted in every tree.
# E.g., user name and password for DB access are usually the same,
# even if the database name is tree-specific.
, 'dbpass' => 'foo'
, 'dbuser' => 'lxr'
# Table prefix (parameter dbprefix) is also a common parameter
# unless you stuff all tree data in a single database.
# It has a default hard-coded value:
# , 'dbprefix' => 'lxr_'
}
###############################
# Tree configuration sections #
###############################
, {
# Server configuration subsection #
#=================================#
# NOTE --------------------------------------------------- #
# ---- 'baseurl' and 'baseurl_aliases' are deprecated ---- #
# ---- in favor of 'host_names'. ---- #
# ---- See "Global configuration section" ---- #
# ---- ---- #
# ---- 'host_names' takes precedence if 'baseurl' is ---- #
# ---- also defined. ---- #
# ---- ---- #
# ---- Support for 'baseurl' is maintained for ---- #
# ---- compatibility with existing LXRs. ---- #
# ---- ---- #
# Configuration for http://192.168.1.1/lxr.
# baseurl is used to select configuration block.
# 'baseurl' => 'http://192.168.1.1/lxr' # Put your URL here
'baseurl' => 'http://localhost/lxr'
# # baseurl_aliases allows other URLs to be used to reach the site
# # comment this out if you do not want any aliases
# , 'baseurl_aliases' =>
# [ 'http://localhost/lxr'
# , 'http://mydomain/lxr'
# ]
# ---- ---- #
# ---- End of deprecated parameters ---- #
# ---- If you use them, uncomment the comma below ---- #
# -------------------------------------------------------- #
,
'virtroot' => '/lxr' # The bit after the / above
# Title for this tree to display in page header area
# if you aren't satisfied with the default
# , 'caption' => 'My tree'
# Pattern for extracting tree name from URL
, 'treeextract' => '([^/]*)/[^/]*$'
# Character encoding (overrides default if necessary)
# , 'encoding' => 'iso-8859-1'
# a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
# example for cvsweb:
# , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi'
# , 'cvswebpostfix' => '?cvsroot=rootname'
# example for viewcvs:
# , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot'
# , 'cvswebpostfix' => ''
# Tree location subsection #
#==========================#
# sourceroot - where to get the source files from
# For ordinary directories, this specifies a directory which has each version as a
# subdirectory e.g.
# indexed-src/version1/...
# indexed-src/version2/...
# The names of the version directories must match the values for the Version
# variable (see the version selection subsection).
, 'sourceroot' => '/usr/suse/lxr/lxr/src/'
# Alternatively, this can specify a CVS repository by setting the value to "cvs:"
# followed by the path to the repository. Note this must be file accessible - remote
# server access does NOT work.
# , 'sourceroot' => 'cvs:/home/karsk/a/CVSROOT/linux'
# For a BitKeeper repository, specify bk: followed by the path to the
# repository. For BK it is also necessary to specify a 'cachepath' parameter in
# the 'sourceparams' value below. This should point to a directory where the
# code can write and read files.
# , 'sourceroot' => 'bk:/some/repository/here'
# Finally, you can also use GIT, Linux Kernel's new
# distributed SCM to access the history:
# , 'sourceroot' => 'git:/some/repository/.git'
# The 'sourceroot' config variable points to the directory
# in which you find the `objects', `refs', `index' etc.
# directories.
# The string to display as the base part of every path in the tree
, 'sourcerootname' => '/usr/suse/lxr/lxr/src/$v'
# Or if you want automatic version insertion
# , 'sourcerootname' => '$v'
#
# Any parameters to the source access method should be specified below.
#
# BK: 'cachepath' is used for temporary files
# GIT: if `do_annotations' is non-zero, the file revision that
# introduced each line is displayed.
# `do_blame' will add the author of each line to the
# output. Keep in mind that the core LXR code
# will only request author information if
# annotations are switched on, too!
#
, 'sourceparams' =>
{ 'cachepath' => '/tmp/here'
, 'do_annotate' => 1,
, 'do_blame' => 1
}
# Directories to always ignore. These usually are the SCM's
# private directories which possibly may contain non-public
# project history.
, 'ignoredirs' => ['CVSROOT', '.git']
# Version selection subsection #
#==============================#
, 'variables' =>
# Define typed variable "v".
{ 'v' =>
{ 'name' => 'Version'
# This is the list of versions to index.
# This can come from a file, a function or be explicitly
# ennumerated.
# From a file:
# , 'range' => [ readfile('src/versions') ]
# Explicitly:
# updated Aug.17
# I'm using readfile fun. to retrive the
# version values.
# -s
# , 'range' => [qw(0.12)]
, 'range' => [ readfile('src/version') ]
# If files within a tree can have different versions,
# e.g in a CVS tree, 'range' can be specified as a
# function to call for each file:
# , 'range' => sub
# { return ($files->allreleases($LXR::Common::pathname)
# ,$files->allrevisions($LXR::Common::pathname)
# )
# } # deferred function call.
#
# When using a GIT /repo, you can use its tags
# to create a list of versions. As an extra
# bonus, with the Linux::KernelSort Perl module,
# you can properly sort kernel versions. Just
# leave it off for generic projects.
#
# Simple example for any GIT repo:
# , 'range' => sub
# { my $some_dir = "/path/to/project/.git/refs/tags";
# opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
# my @files = grep { -f "$some_dir/$_" } readdir (DIR);
# closedir DIR;
# return sort @files;
# }
#
# Advanced example for Linus's upstream
# linux-2.6 kernel repository:
# 'range' => sub
# {
# use Linux::KernelSort;
# my $kernel = new Linux::KernelSort;
#
# my $some_dir = "/path/to/linux-2.6/.git/refs/tags";
# opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
# my @files = grep { -f "$some_dir/$_" } readdir (DIR);
# closedir DIR;
# # Linus's tags all have a leading "v"
# # which we must cut off for sorting
# # add again afterwards.
# for (my $i = 0; $i < scalar (@files); $i++)
# {
# $files[$i] =~ s/^v//;
# }
# @files = $kernel->sort (@files);
# for (my $i = 0; $i < scalar (@files); $i++)
# {
# $files[$i] =~ s/^/v/;
# }
#
# return @files;
# }
# The default version to display
# If not specified, first in 'range' used
, 'default' => '0.12'
}
# Define typed variable "a". First value is default.
# Meaningful for Linux kernel
# Comment out for average user source-tree
, 'a' =>
{ 'name' => 'Architecture'
, 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
}
# NOTE: If you implement the 'a' variable against the Kernel tree,
# don't rely on the above list of architectures. It is out-dated.
# To get an accurate list, type the following command in a
# terminal: ls path-to-kernel-source/arch/
# The directories list in the output gives the up-to-date list.
}
# Subdirectory subsection #
#=========================#
# where to look for include files inside the sourcetree. This is used to hyperlink
# to included files.
, 'incprefix' => [ '/include', '/include/linux' ]
# For the 2.x-3.x Linux kernel, use
# , 'incprefix' => [ '/include', '/arch/%-ARCH-%/include' ]
# Leave the %-ARCH-% as is. It is needed by the 'maps' rule
# and will be transformed into the appropriate subdir name.
# These do funky things to paths in the system - you probably don't need them.
# , 'maps' =>
# { '/include/asm[^\/]*/' => '/include/asm-$a/'
# , '/arch/[^\/]+/' => '/arch/$a/'
# },
# For the 2.x-3.x Linux kernel, use
# , 'maps' =>
# { '^/arch/%-ARCH-%/' => '/arch/$a/'
# }
# Having a fully functional set of 'incprefix'/'maps' directives
# for the kernel is not a trivial task. It requires defining many
# auxiliary variables which are dependent on the current development
# state of the kernel.
# Data storage subsection #
#=========================#
# The DBI identifier for the database to use
# For mysql, the format is dbi:mysql:dbname=<name>
# for Postgres, it is dbi:Pg:dbname=<name>
# for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
, 'dbname' => 'dbi:mysql:dbname=lxr'
# If you need to specify the username or password for the database connection,
# uncomment the following two lines
, 'dbuser' => 'lxr'
, 'dbpass' => 'foo'
# If you need multiple lxr configurations in one database, set different table
# prefixes for them.
# , 'dbprefix' => 'lxr_'
# For using glimpse, the directory to store the .glimpse files in is required
, 'glimpsedir' => '/usr/suse/lxr/lxr/src/'
# Location of swish-e index database files if using swish-e
# , 'swishdir' => '/a/directory/here/'
}
)