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