# -*- mode: perl -*- # Configuration file # # $Id: lxr.conf,v 1.49 2012/04/04 12:42:24 ajlittoz Exp $ # # This configuration file template can be automatically # preconfigured by script initial-config.sh during the # installation process. ( ################################ # 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/bin/glimpse' , 'glimpseindex' => '/usr/bin/glimpseindex' # Location of SWISH-E binary # e.g.: , 'swishbin' => '/usr/local/bin/swish-e' # , 'swishbin' => '%swish%' # Location of the SWISH-E.conf file # , 'swishconf' => '/var/www/localhost/htdocs/lxr/templates/swish-e.conf' # Path to Exuberant Ctags executable , 'ectagsbin' => '/usr/bin/ctags' # Location of the ectags.conf file , 'ectagsconf' => '/var/www/localhost/htdocs/lxr/templates/ectags.conf' # Paths for CVS module # , 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin' # Computer DNS names subsection # #================================ , 'host_names' => [ '//localhost', 'http://localhost', 'http://127.0.0.1' ] # HTML subsection # #=================# # All paths in this subsection are relative to LXR root directory # Templates used for headers and footers , 'htmlfatal' => 'templates/html/html-fatal.html' , 'htmlhead' => 'templates/html/html-head.html' , 'htmltail' => 'templates/html/html-tail.html' , 'htmldir' => 'templates/html/html-dir.html' , 'htmlident' => 'templates/html/html-ident.html' , 'htmlsearch' => 'templates/html/html-search-glimpse.html' , 'htmlconfig' => 'templates/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' => 'templates/html/html-head.html' , 'sourcedirhead' => 'templates/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' => 'templates/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' => 'templates/lxr.css' # , 'alternate_stylesheet' => [ 'lxrconf.d/another.css' ] # Default character encoding , 'encoding' => 'utf-8', #'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' => '/var/www/localhost/htdocs/lxr/templates/filetype.conf' # Location of the Generic.pm config file , 'genericconf' => '/var/www/localhost/htdocs/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. # Pattern for extracting tree name from URL, since all # trees are usually served from the same physical server. , 'treeextract' => '([^/]*)/[^/]*$' # User name and password for DB access are usually the same, # even if the database name is tree-specific. # , 'dbpass' => 'lxr' , '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://localhost/lxr' # Put your URL here # # 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' => 'Linux kernel' # Button title to switch to this tree when multiple # trees are managed by LXR # , 'shortcaption' => 'My tree' # Character encoding (overrides default if necessary) , 'encoding' => 'utf-8' #'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' => '/mnt/storage/project/kernel' # 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' => 'Example' # 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' => '/a/path/here' # , 'do_annotate' => 1, # , 'do_blame' => 1 # } # 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: , 'range' => [qw(linux-3.0.6-gentoo_origin)] # 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' => 'v3.1' } # Define typed variable "a". First value is default. # Meaningful for Linux kernel # Comment out for average user source-tree , 'a' => { 'name' => 'Architecture' , 'range' => [qw(alpha avr32 c6x frv hexagon m68k mips openrisc powerpc score sparc um x86 arm blackfin cris h8300 ia64 m32r microblaze mn10300 parisc s390 sh tile unicore32 xtensa)] , 'default' => 'x86' } # 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 # #=========================# # Directories to always ignore. These usually are the SCM's # private directories which possibly may contain non-public # project history. , 'ignoredirs' => ['CVSROOT', '.git'] # 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= # for Postgres, it is dbi:Pg:dbname= # 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' => '/var/db/webapps/lxr/0.12.1/glimpse_db/' # Location of swish-e index database files if using swish-e # , 'swishdir' => '/var/db/webapps/lxr/0.12.1/swish-e/' } )