mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
development/cgit: Fixes for httpd-2.4.x and allow custom DOCROOT
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
2d46d325ed
commit
1d048cb81c
4 changed files with 22 additions and 18 deletions
|
@ -26,6 +26,8 @@ VERSION=${VERSION:-20130826_d62e71a}
|
|||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
DOCROOT=${DOCROOT:-/var/www}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
|
@ -56,8 +58,8 @@ fi
|
|||
CGIT_VERSION=${CGIT_VERSION:-v0.9.2-21-gd62e}
|
||||
GIT_VERSION=${GIT_VERSION:-1.8.4}
|
||||
|
||||
DOCS="cgitrc.5.txt COPYING README $CWD/config/cgit-lighttpd.conf \
|
||||
$CWD/config/cgit-httpd.conf $CWD/config/cgitrc.sample"
|
||||
DOCS="cgitrc.5.txt COPYING README $CWD/config/cgitrc.sample \
|
||||
$CWD/config/cgit-lighttpd.conf $CWD/config/cgit-httpd.conf"
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -75,10 +77,12 @@ find -L . \
|
|||
-exec chmod 644 {} \;
|
||||
|
||||
# prepare sources
|
||||
sed -i -e "s|-g -Wall -Igit|-Wall ${SLKCFLAGS} -Igit|" Makefile
|
||||
sed -i -e "s|\/lib$|/lib${LIBDIRSUFFIX}|" Makefile
|
||||
sed -i -e "s|(libdir)|(prefix)/share|" Makefile
|
||||
cat $CWD/config/cgit.conf > cgit.conf
|
||||
sed -i Makefile \
|
||||
-e "s|-g -Wall -Igit|-Wall ${SLKCFLAGS} -Igit|" \
|
||||
-e "s|\/lib$|/lib${LIBDIRSUFFIX}|" \
|
||||
-e "s|(libdir)|(prefix)/share|" \
|
||||
-e "s|/usr/local|/usr|"
|
||||
sed -e "s|@DOCROOT@|$DOCROOT|g" $CWD/config/cgit.conf > cgit.conf
|
||||
echo "CGIT_VERSION = $CGIT_VERSION" >> cgit.conf
|
||||
|
||||
# extract the git tarball
|
||||
|
@ -94,6 +98,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
|
|||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
install -m0644 -oroot $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
sed -i "s|@DOCROOT@|$DOCROOT|g" $PKG/usr/doc/$PRGNAM-$VERSION/*
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
# prepare the cache dir: default permissions are for the apache user and group
|
||||
|
|
|
@ -8,18 +8,17 @@
|
|||
#
|
||||
# AddHandler cgi-script .cgi
|
||||
|
||||
<Directory /var/www/cgi-bin>
|
||||
<Directory @DOCROOT@/cgi-bin>
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
## Version 1 (default): under /cgi-bin/cgit.cgi address
|
||||
#ScriptAlias /cgi-bin/cgit.cgi /var/www/cgi-bin/cgit.cgi
|
||||
#Alias /cgit/ /var/www/cgi-bin/
|
||||
#ScriptAlias /cgi-bin/cgit.cgi @DOCROOT@/cgi-bin/cgit.cgi
|
||||
#Alias /cgit/ @DOCROOT@/cgi-bin/
|
||||
#<Location /cgit/cgit.cgi>
|
||||
# Options FollowSymlinks ExecCGI
|
||||
# Allow from All
|
||||
# Require all granted
|
||||
#</Location>
|
||||
#RewriteEngine on
|
||||
#RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
@ -32,10 +31,10 @@
|
|||
SetEnv CGIT_CONFIG /etc/cgitrc
|
||||
Options FollowSymlinks ExecCGI
|
||||
DirectoryIndex cgit.cgi
|
||||
DocumentRoot /var/www/cgi-bin
|
||||
DocumentRoot @DOCROOT@/cgi-bin
|
||||
<Location />
|
||||
Options ExecCGI
|
||||
Allow from All
|
||||
Require all granted
|
||||
</Location>
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
$HTTP["host"] == "cgit.my.domain" {
|
||||
alias.url = (
|
||||
"/static/" => "/var/www/cgi-bin/",
|
||||
"/cgit.cgi" => "/var/www/cgi-bin/cgit.cgi",
|
||||
"/static/" => "@DOCROOT@/cgi-bin/",
|
||||
"/cgit.cgi" => "@DOCROOT@/cgi-bin/cgit.cgi",
|
||||
)
|
||||
url.rewrite-once = (
|
||||
"^/static/.*$" => "$0",
|
||||
"^/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2",
|
||||
)
|
||||
cgi.assign = (
|
||||
"/var/www/cgi-bin/cgit.cgi" => "",
|
||||
"@DOCROOT@/cgi-bin/cgit.cgi" => "",
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
CGIT_SCRIPT_PATH = /var/www/cgi-bin
|
||||
CGIT_SCRIPT_PATH = @DOCROOT@/cgi-bin
|
||||
CACHE_ROOT = /var/cache/cgit
|
||||
|
|
Loading…
Reference in a new issue