]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: fill in gitweb configuration by Makefile
authorMartin Waitz <redacted>
Tue, 1 Aug 2006 19:34:08 +0000 (21:34 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:05:46 +0000 (00:05 -0400)
Generate gitweb/gitweb.cgi to reduce the need to patch gitweb.cgi
by the end user.  The GIT installation directory is already known
by the Makefile, and can be inserted directly into gitweb.
All other gitweb configuration parameters can now be specified by
providing GITWEB_* variables while building GIT.  These are described
in gitweb/README.

Signed-off-by: Martin Waitz <redacted>
Signed-off-by: Junio C Hamano <redacted>
README
gitweb.perl [moved from gitweb.cgi with 99% similarity]

diff --git a/README b/README
index 519eb545603281924f956fac5f3d4da879acee924deea59b52185c88ee50c684..edf00ad6562c13a05d0dbcfdc1176c530db3e2d750cb7deb1d9f1a1c0d6a06fe 100644 (file)
--- a/README
+++ b/README
@@ -5,5 +5,22 @@ The one working on:
 
 From the git version 1.4.0 gitweb is bundled with git.
 
+
+How to configure gitweb for your local system:
+
+You can specify the following configuration variables when building GIT:
+ * GITWEB_SITENAME
+   Shown in the title of all generated pages, defaults to the servers name.
+ * GITWEB_PROJECTROOT
+   The root directory for all projects shown by gitweb.
+ * GITWEB_LIST
+   points to a directory to scan for projects (defaults to project root)
+   or to a file for explicit listing of projects.
+ * GITWEB_HOMETEXT
+   points to an .html file which is included on the gitweb project
+   overview page.
+ * GITWEB_CSS
+   Points to the location where you put gitweb.css on your web server.
+
 Any comment/question/concern to:
   Kay Sievers <kay.sievers@vrfy.org>
similarity index 99%
rename from gitweb.cgi
rename to gitweb.perl
index 7307e2c2a14edfefc875405b29d56b0ee644d94f68e7116b5e137c9169ab7309..9c752c8f61e21be6e9a58e89c064c1884e8d718affaffb317c15c538c5b67dda 100755 (executable)
@@ -18,18 +18,18 @@ use File::Find qw();
 binmode STDOUT, ':utf8';
 
 our $cgi = new CGI;
-our $version = "267";
+our $version = "@@GIT_VERSION@@";
 our $my_url = $cgi->url();
 our $my_uri = $cgi->url(-absolute => 1);
 our $rss_link = "";
 
 # core git executable to use
 # this can just be "git" if your webserver has a sensible PATH
-our $GIT = "/usr/bin/git";
+our $GIT = "@@GIT_BINDIR@@/git";
 
 # absolute fs-path which will be prepended to the project path
 #our $projectroot = "/pub/scm";
-our $projectroot = "/home/kay/public_html/pub/scm";
+our $projectroot = "@@GITWEB_PROJECTROOT@@";
 
 # version of the core git binary
 our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
@@ -45,17 +45,16 @@ our $home_link = $my_uri;
 
 # name of your site or organization to appear in page titles
 # replace this with something more descriptive for clearer bookmarks
-our $site_name = $ENV{'SERVER_NAME'} || "Untitled";
+our $site_name = "@@GITWEB_SITENAME@@" || $ENV{'SERVER_NAME'} || "Untitled";
 
 # html text to include at home page
-our $home_text = "indextext.html";
+our $home_text = "@@GITWEB_HOMETEXT@@";
 
 # URI of default stylesheet
-our $stylesheet = "gitweb.css";
+our $stylesheet = "@@GITWEB_CSS@@";
 
 # source of projects list
-#our $projects_list = $projectroot;
-our $projects_list = "index/index.aux";
+our $projects_list = "@@GITWEB_LIST@@" || "$projectroot";
 
 # default blob_plain mimetype and default charset for text/plain blob
 our $default_blob_plain_mimetype = 'text/plain';
This page took 0.338679 seconds and 4 git commands to generate.