gitweb.psgi: Use installed static files, if they are available
commitfd9e36933e419a5427eb521dfb753d4d11dbf2ec
authorJakub Narebski <jnareb@gmail.com>
Tue, 8 May 2012 19:35:08 +0000 (8 21:35 +0200)
committerJakub Narebski <jnareb@gmail.com>
Tue, 8 May 2012 19:35:08 +0000 (8 21:35 +0200)
treeb69186b4f5b1cee9b9e74cc320f6cdb5aaf0e903
parent17fbe3d0b269ef45c999aa14c3731490576ee69a
gitweb.psgi: Use installed static files, if they are available

When gitweb is running as PSGI app, it must itself take care of
serving static files: stylesheets, script, images that are required
to render gitweb output.

This commit makes gitweb (in PSGI mode) use installed static files
from $(gitwebstaticdir) if such directory exists.  Before this commit
gitweb served static files from 'static/' directory relative to
position of gitweb script itself (to __DIR__).

Note that mechanism of serving is slightly different: the one with
__DIR__ uses Plack::Middleware::Static, while the installdir one uses
URLMap-ped set of Plack::App::File.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/Makefile
gitweb/gitweb.perl