1. # -*- mode: perl -*-
  2. # Configuration file
  3. #
  4. # $Id: lxr.conf,v 1.47 2012/03/19 20:03:28 ajlittoz Exp $
  5. #
  6. (
  7. ################################
  8. # Global configuration section #
  9. ################################
  10.  
  11. {
  12. # Auxiliary tools subsection #
  13. #============================#
  14.  
  15. # Place where lxr can write temporary files
  16. 'tmpdir' => '/tmp'
  17.  
  18. # Define this OR the swish-e variable depending which search engine you want to use.
  19. # Path to glimpse executables.
  20. # e.g.: , 'glimpsebin' => '/usr/local/bin/glimpse'
  21. , 'glimpsebin' => '/usr/bin/glimpse'
  22. , 'glimpseindex' => '/usr/bin/glimpseindex'
  23. # Location of SWISH-E binary
  24. # e.g.: , 'swishbin' => '/usr/local/bin/swish-e'
  25. # , 'swishbin' => '/usr/bin/swish-e'
  26. # Location of the SWISH-E.conf file
  27. , 'swishconf' => '/usr/local/share/lxr/templates/swish-e.conf'
  28.  
  29. # Path to Exuberant Ctags executable
  30. , 'ectagsbin' => '/usr/bin/ctags'
  31. # Location of the ectags.conf file
  32. , 'ectagsconf' => '/usr/local/share/lxr/templates/ectags.conf'
  33.  
  34. # Paths for CVS module
  35. , 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
  36.  
  37. # Computer DNS names subsection #
  38. #================================
  39. , 'host_names' => [ '//localhost', 'http://127.0.0.1', 'http://localhost' ]
  40.  
  41. # HTML subsection #
  42. #=================#
  43.  
  44. # All paths in this subsection are relative to LXR root directory
  45.  
  46. # Templates used for headers and footers
  47. , 'htmlfatal' => 'templates/html/html-fatal.html'
  48. , 'htmlhead' => 'templates/html/html-head.html'
  49. , 'htmltail' => 'templates/html/html-tail.html'
  50. , 'htmldir' => 'templates/html/html-dir.html'
  51. , 'htmlident' => 'templates/html/html-ident.html'
  52. , 'htmlsearch' => 'templates/html/html-search-glimpse.html'
  53. , 'htmlconfig' => 'templates/html/html-config.html'
  54.  
  55. # htmlhead and htmltail can be customised for the various
  56. # LXR operations. Just replace html by source (listing file),
  57. # sourcedir (displaying directory), diff (difference markup),
  58. # ident (identifier search), search (free-text search)
  59. # as below (which changes nothing):
  60. # , 'sourcehead' => 'templates/html/html-head.html'
  61. # , 'sourcedirhead' => 'templates/html/html-head.html'
  62.  
  63. # showconfig script is a bit special since "version" has
  64. # no meaning for it. Better to wipe out the 'variables' selection
  65. # links with an adequate header:
  66. # , 'showconfighead' => 'templates/html/config-head-btn-smaller.html'
  67. , 'showconfighead' => 'templates/html/config-head-btn-smaller.html'
  68.  
  69. # Default character width of left version (for diff)
  70. , 'diffleftwidth' => 50
  71.  
  72. # Default identifier search constraint (for ident)
  73. # , 'identdefonly' => 1
  74.  
  75. # CSS style sheet
  76. # , 'stylesheet' => 'templates/html/lxr.css'
  77. , 'stylesheet' => 'templates/lxr.css'
  78.  
  79. # , 'alternate_stylesheet' => [ 'lxrconf.d/another.css' ]
  80.  
  81. # Default character encoding
  82. , 'encoding' => 'utf-8',
  83.  
  84. # File management subsection #
  85. #============================#
  86.  
  87. # Which extensions to treat as images when browsing. If a file is an image,
  88. # it is displayed.
  89. , 'graphicfile' =>
  90. 'bitmap|bmp|gif|icon?|jp2|jpe?g|pjpe?g|png|svg|tiff?|xbm|xpm'
  91.  
  92. # Which file extensions are associated with which icon
  93. # Below is an example using 'Oxygen' theme available with KDE
  94. # small-icons/ is a symbolic link to
  95. # /usr/share/icons/oxygen/22x22/mimetypes/
  96. # (This location is valid for Fedora distributions,
  97. # check for others)
  98. # , 'iconfolder' => 'small-icons/'
  99. # Don't forget the final / above.
  100. # , 'icons' =>
  101. # { 'c|pc' => 'text-x-csrc.png'
  102. # , 'h|hh' => 'text-x-chdr.png'
  103. # , 'c\+\+|cc|cpp|cxx' => 'text-x-c++src.png'
  104. # , 'hpp|hxx|h\+\+' => 'text-x-c++hdr.png'
  105. # , 'java' => 'text-x-java.png'
  106. # , 'js' => 'application-x-javascript.png'
  107. # , 'pl|pm|perl' => 'application-x-perl.png'
  108. # , 'php|php3|phtml' => 'application-x-php.png'
  109. # , 'py|python' => 'text-x-python.png'
  110. # , 'sh|bsh|bash|ksh|zsh' => 'text-x-script.png'
  111. # , 's?html?' => 'text-html.png'
  112. # , 'css' => 'text-css.png'
  113. # , 'pdf' => 'application-pdf.png'
  114. # , 'txt' => 'text-plain.png'
  115. # , 'p|pas' => 'text-x-pascal.png'
  116. # , 'patch' => 'text-x-patch.png'
  117. # , 'sql' => 'text-x-sql.png'
  118. # , 'rb' => 'application-x-ruby.png'
  119. # , 'ui' => 'text-xml.png'
  120. # , '.*\~' => 'application-x-trash'
  121. # }
  122. # , 'graphicicon' => 'image-x-generic.png'
  123. # , 'defaulticon' => 'unknown.png'
  124. # , 'diricon' => 'inode-directory.png'
  125.  
  126. # How to map files to languages
  127. , 'filetypeconf' => '/usr/local/share/lxr/templates/filetype.conf'
  128.  
  129. # Location of the Generic.pm config file
  130. , 'genericconf' => '/usr/local/share/lxr/lib/LXR/Lang/generic.conf'
  131.  
  132. # "Common factor" subsection #
  133. #============================#
  134.  
  135. # In case your LXR installation controls several trees,
  136. # put here what you consider common parameters between
  137. # your source trees.
  138. # A parameter is "common" if its value must be simultaneously
  139. # adjusted in every tree.
  140. # E.g., user name and password for DB access are usually the same,
  141. # even if the database name is tree-specific.
  142. # , 'dbpass' => 'lxr'
  143. , 'dbuser' => 'lxr'
  144. # Table prefix (parameter dbprefix) is also a common parameter
  145. # unless you stuff all tree data in a single database.
  146. # It has a default hard-coded value:
  147. # , 'dbprefix' => 'lxr_'
  148. }
  149.  
  150. ###############################
  151. # Tree configuration sections #
  152. ###############################
  153.  
  154. , {
  155.  
  156. # Server configuration subsection #
  157. #=================================#
  158.  
  159. # NOTE --------------------------------------------------- #
  160. # ---- 'baseurl' and 'baseurl_aliases' are deprecated ---- #
  161. # ---- in favor of 'host_names'. ---- #
  162. # ---- See "Global configuration section" ---- #
  163. # ---- ---- #
  164. # ---- 'host_names' takes precedence if 'baseurl' is ---- #
  165. # ---- also defined. ---- #
  166. # ---- ---- #
  167. # ---- Support for 'baseurl' is maintained for ---- #
  168. # ---- compatibility with existing LXRs. ---- #
  169. # ---- ---- #
  170. # Configuration for http://192.168.1.1/lxr.
  171. # baseurl is used to select configuration block.
  172. 'baseurl' => 'http://localhost/lxr' # Put your URL here
  173. # # baseurl_aliases allows other URLs to be used to reach the site
  174. # # comment this out if you do not want any aliases
  175. , 'baseurl_aliases' =>
  176. [ 'http://localhost/lxr'
  177. # , 'http://mydomain/lxr'
  178. ]
  179. # ---- ---- #
  180. # ---- End of deprecated parameters ---- #
  181. # ---- If you use them, uncomment the comma below ---- #
  182. # -------------------------------------------------------- #
  183. ,
  184.  
  185. 'virtroot' => '/lxr' # The bit after the / above
  186.  
  187. # Title for this tree to display in page header area
  188. # if you aren't satisfied with the default
  189. , 'caption' => 'Linux kernel'
  190.  
  191. # Pattern for extracting tree name from URL
  192. , 'treeextract' => '([^/]*)/[^/]*$'
  193.  
  194. # Character encoding (overrides default if necessary)
  195. , 'encoding' => 'utf-8'
  196.  
  197. # a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
  198. # example for cvsweb:
  199. # , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi'
  200. # , 'cvswebpostfix' => '?cvsroot=rootname'
  201. # example for viewcvs:
  202. # , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot'
  203. # , 'cvswebpostfix' => ''
  204.  
  205. # Tree location subsection #
  206. #==========================#
  207.  
  208. # sourceroot - where to get the source files from
  209.  
  210. # For ordinary directories, this specifies a directory which has each version as a
  211. # subdirectory e.g.
  212. # indexed-src/version1/...
  213. # indexed-src/version2/...
  214. # The names of the version directories must match the values for the Version
  215. # variable (see the version selection subsection).
  216. , 'sourceroot' => '/mnt/storage/project/kernel/'
  217.  
  218. # Alternatively, this can specify a CVS repository by setting the value to "cvs:"
  219. # followed by the path to the repository. Note this must be file accessible - remote
  220. # server access does NOT work.
  221. # , 'sourceroot' => 'cvs:/home/karsk/a/CVSROOT/linux'
  222.  
  223. # For a BitKeeper repository, specify bk: followed by the path to the
  224. # repository. For BK it is also necessary to specify a 'cachepath' parameter in
  225. # the 'sourceparams' value below. This should point to a directory where the
  226. # code can write and read files.
  227. # , 'sourceroot' => 'bk:/some/repository/here'
  228.  
  229. # Finally, you can also use GIT, Linux Kernel's new
  230. # distributed SCM to access the history:
  231. # , 'sourceroot' => 'git:/some/repository/.git'
  232. # The 'sourceroot' config variable points to the directory
  233. # in which you find the `objects', `refs', `index' etc.
  234. # directories.
  235.  
  236. # The string to display as the base part of every path in the tree
  237. # , 'sourcerootname' => 'Linux kernel'
  238. # Or if you want automatic version insertion
  239. , 'sourcerootname' => '$v'
  240.  
  241. #
  242. # Any parameters to the source access method should be specified below.
  243. #
  244. # BK: 'cachepath' is used for temporary files
  245. # GIT: if `do_annotations' is non-zero, the file revision that
  246. # introduced each line is displayed.
  247. # `do_blame' will add the author of each line to the
  248. # output. Keep in mind that the core LXR code
  249. # will only request author information if
  250. # annotations are switched on, too!
  251. #
  252. , 'sourceparams' =>
  253. { 'cachepath' => '/a/path/here'
  254. , 'do_annotate' => 1,
  255. , 'do_blame' => 1
  256. }
  257.  
  258. # Directories to always ignore. These usually are the SCM's
  259. # private directories which possibly may contain non-public
  260. # project history.
  261. , 'ignoredirs' => ['CVSROOT', '.git']
  262.  
  263. # Version selection subsection #
  264. #==============================#
  265.  
  266. , 'variables' =>
  267.  
  268. # Define typed variable "v".
  269. { 'v' =>
  270. { 'name' => 'Version'
  271. # This is the list of versions to index.
  272. # This can come from a file, a function or be explicitly
  273. # ennumerated.
  274. # From a file:
  275. # , 'range' => [ readfile('src/versions') ]
  276. # Explicitly:
  277. , 'range' => [qw(linux-3.0.6-gentoo_origin)]
  278. # If files within a tree can have different versions,
  279. # e.g in a CVS tree, 'range' can be specified as a
  280. # function to call for each file:
  281. # , 'range' => sub
  282. # { return ($files->allreleases($LXR::Common::pathname)
  283. # ,$files->allrevisions($LXR::Common::pathname)
  284. # )
  285. # } # deferred function call.
  286. #
  287. # When using a GIT repo, you can use its tags
  288. # to create a list of versions. As an extra
  289. # bonus, with the Linux::KernelSort Perl module,
  290. # you can properly sort kernel versions. Just
  291. # leave it off for generic projects.
  292. #
  293. # Simple example for any GIT repo:
  294. # , 'range' => sub
  295. # { my $some_dir = "/path/to/project/.git/refs/tags";
  296. # opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
  297. # my @files = grep { -f "$some_dir/$_" } readdir (DIR);
  298. # closedir DIR;
  299. # return sort @files;
  300. # }
  301. #
  302. # Advanced example for Linus's upstream
  303. # linux-2.6 kernel repository:
  304. # 'range' => sub
  305. # {
  306. # use Linux::KernelSort;
  307. # my $kernel = new Linux::KernelSort;
  308. #
  309. # my $some_dir = "/path/to/linux-2.6/.git/refs/tags";
  310. # opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
  311. # my @files = grep { -f "$some_dir/$_" } readdir (DIR);
  312. # closedir DIR;
  313. # # Linus's tags all have a leading "v"
  314. # # which we must cut off for sorting
  315. # # add again afterwards.
  316. # for (my $i = 0; $i < scalar (@files); $i++)
  317. # {
  318. # $files[$i] =~ s/^v//;
  319. # }
  320. # @files = $kernel->sort (@files);
  321. # for (my $i = 0; $i < scalar (@files); $i++)
  322. # {
  323. # $files[$i] =~ s/^/v/;
  324. # }
  325. #
  326. # return @files;
  327. # }
  328.  
  329. # The default version to display
  330. # If not specified, first in 'range' used
  331. # , 'default' => 'v3.1'
  332. }
  333.  
  334. # Define typed variable "a". First value is default.
  335. # Meaningful for Linux kernel
  336. # Comment out for average user source-tree
  337. , 'a' =>
  338. { 'name' => 'Architecture'
  339. , 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
  340. }
  341. # NOTE: If you implement the 'a' variable against the Kernel tree,
  342. # don't rely on the above list of architectures. It is out-dated.
  343. # To get an accurate list, type the following command in a
  344. # terminal: ls path-to-kernel-source/arch/
  345. # The directories list in the output gives the up-to-date list.
  346. }
  347.  
  348. # Subdirectory subsection #
  349. #=========================#
  350.  
  351. # where to look for include files inside the sourcetree. This is used to hyperlink
  352. # to included files.
  353. , 'incprefix' => [ '/include', '/include/linux' ]
  354. # For the 2.x-3.x Linux kernel, use
  355. # , 'incprefix' => [ '/include', '/arch/%-ARCH-%/include' ]
  356. # Leave the %-ARCH-% as is. It is needed by the 'maps' rule
  357. # and will be transformed into the appropriate subdir name.
  358.  
  359. # These do funky things to paths in the system - you probably don't need them.
  360. # , 'maps' =>
  361. # { '/include/asm[^\/]*/' => '/include/asm-$a/'
  362. # , '/arch/[^\/]+/' => '/arch/$a/'
  363. # },
  364. # For the 2.x-3.x Linux kernel, use
  365. # , 'maps' =>
  366. # { '^/arch/%-ARCH-%/' => '/arch/$a/'
  367. # }
  368. # Having a fully functional set of 'incprefix'/'maps' directives
  369. # for the kernel is not a trivial task. It requires defining many
  370. # auxiliary variables which are dependent on the current development
  371. # state of the kernel.
  372.  
  373. # Data storage subsection #
  374. #=========================#
  375.  
  376. # The DBI identifier for the database to use
  377. # For mysql, the format is dbi:mysql:dbname=<name>
  378. # for Postgres, it is dbi:Pg:dbname=<name>
  379. # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
  380. , 'dbname' => 'dbi:mysql:dbname=lxr'
  381.  
  382. # If you need to specify the username or password for the database connection,
  383. # uncomment the following two lines
  384. , 'dbuser' => 'lxr'
  385. # , 'dbpass' => 'foo'
  386.  
  387. # If you need multiple lxr configurations in one database, set different table
  388. # prefixes for them.
  389. # , 'dbprefix' => 'lxr_'
  390.  
  391. # For using glimpse, the directory to store the .glimpse files in is required
  392. , 'glimpsedir' => '/var/db/webapps/lxr/glimpse_db'
  393.  
  394. # Location of swish-e index database files if using swish-e
  395. # , 'swishdir' => '/a/directory/here/'
  396. }
  397. )