diff options
Diffstat (limited to 'development/cgit')
-rw-r--r-- | development/cgit/cgit.SlackBuild | 22 | ||||
-rw-r--r-- | development/cgit/cgit.info | 10 | ||||
-rw-r--r-- | development/cgit/config/cgit-httpd.conf | 73 | ||||
-rw-r--r-- | development/cgit/config/cgitrc.sample | 8 |
4 files changed, 72 insertions, 41 deletions
diff --git a/development/cgit/cgit.SlackBuild b/development/cgit/cgit.SlackBuild index 0e8f7f5725..e1d0d68a3b 100644 --- a/development/cgit/cgit.SlackBuild +++ b/development/cgit/cgit.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for cgit -# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# Copyright 2013-2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,10 +21,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=cgit -VERSION=${VERSION:-1.2.1} +VERSION=${VERSION:-1.2.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} DOCROOT=${DOCROOT:-/var/www} @@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -56,7 +66,7 @@ else fi CGIT_VERSION=${CGIT_VERSION:-v$VERSION} -GIT_VERSION=${GIT_VERSION:-2.18.0} +GIT_VERSION=${GIT_VERSION:-2.26.2} DOCS="cgitrc.5.txt COPYING README $CWD/config/cgitrc.sample \ $CWD/config/cgit-lighttpd.conf $CWD/config/cgit-httpd.conf \ @@ -118,4 +128,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/cgit/cgit.info b/development/cgit/cgit.info index 98564a09a3..1c624026b9 100644 --- a/development/cgit/cgit.info +++ b/development/cgit/cgit.info @@ -1,10 +1,10 @@ PRGNAM="cgit" -VERSION="1.2.1" +VERSION="1.2.3" HOMEPAGE="https://git.zx2c4.com/cgit/about/" -DOWNLOAD="https://git.zx2c4.com/cgit/snapshot/cgit-1.2.1.tar.xz \ - https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.xz" -MD5SUM="8580586d320e4a4d71e1e07d4bf4a6fe \ - 7a668403aa7807d0db37e8573299d471" +DOWNLOAD="https://git.zx2c4.com/cgit/snapshot/cgit-1.2.3.tar.xz \ + https://www.kernel.org/pub/software/scm/git/git-2.26.2.tar.xz" +MD5SUM="2d44ca575a8770fae48139c18dac6986 \ + f9a832256032e711973dd7be4981ab4c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf index 4d713503be..4b757ea049 100644 --- a/development/cgit/config/cgit-httpd.conf +++ b/development/cgit/config/cgit-httpd.conf @@ -1,43 +1,62 @@ -# sample folder and virtual host configurations for httpd. +# Sample folder and virtual host configurations for httpd. # edit, move it to /etc/httpd/extra and include it in # /etc/httpd/httpd.conf with a line # -# Include /etc/httpd/extra/cgit-httpd.conf +# Include /etc/httpd/extra/cgit.conf # # uncomment also the line # # AddHandler cgi-script .cgi +# +# and enable mod_cgi (or mod_cgid, depending on your apache +# configuration) + +## Version 1: cgit in a /cgit subdirectory of the main host +## This will need the following 3 lines in your /etc/cgitrc +## +## virtual-root=/cgit/ +## css=/static/cgit.css +## logo=/static/cgit.png +## +#Alias /static/cgit.css "@DOCROOT@/cgi-bin/cgit.css" +#Alias /static/cgit.png "@DOCROOT@/cgi-bin/cgit.png" +#ScriptAlias /cgit/ "@DOCROOT@/cgi-bin/cgit.cgi/" +#RedirectMatch ^/cgit$ /cgit/ +#<Directory "@DOCROOT@/cgi-bin/"> +# AllowOverride None +# Options ExecCGI FollowSymlinks +# Require all granted +#</Directory> -<Directory @DOCROOT@/cgi-bin> - AllowOverride None - Require all granted -</Directory> - -## Version 1 (default): under /cgi-bin/cgit.cgi address -#ScriptAlias /cgi-bin/cgit.cgi @DOCROOT@/cgi-bin/cgit.cgi -#Alias /cgit/ @DOCROOT@/cgi-bin/ -#<Location /cgit/cgit.cgi> -# Options FollowSymlinks ExecCGI -# Require all granted -#</Location> -#RewriteEngine on -#RewriteCond %{REQUEST_FILENAME} !-f -#RewriteCond %{REQUEST_FILENAME} !-d -#RewriteRule ^/cgit/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] - -# Version 2: cgit as a handler to whole vhost: +# Version 2: cgit as a handler to whole vhost +# Thanks to Robby Workman for this elegant example <VirtualHost *:80> - ServerName cgit.my.domain + ServerName cgit.yourdomain.ltd + + Options FollowSymlinks + SetEnv CGIT_CONFIG /etc/cgitrc - Options FollowSymlinks ExecCGI - DirectoryIndex cgit.cgi + DocumentRoot @DOCROOT@/cgi-bin + + <Directory @DOCROOT@/cgi-bin> + AllowOverride None + Require all granted + DirectoryIndex cgit.cgi + </Directory> + + Alias /cgit.css @DOCROOT@/cgi-bin/cgit.css + Alias /cgit.png @DOCROOT@/cgi-bin/cgit.png + Alias /favicon.ico @DOCROOT@/cgi-bin/favicon.ico + Alias /robots.txt @DOCROOT@/cgi-bin/robots.txt + Alias / @DOCROOT@/cgi-bin/cgit.cgi/ + <Location /> Options ExecCGI Require all granted </Location> - RewriteEngine on - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA] + + <Files cgit.cgi> + SetHandler cgi-script + </Files> </VirtualHost> diff --git a/development/cgit/config/cgitrc.sample b/development/cgit/config/cgitrc.sample index cd23168d04..31d7708333 100644 --- a/development/cgit/config/cgitrc.sample +++ b/development/cgit/config/cgitrc.sample @@ -8,11 +8,13 @@ virtual-root=/ snapshots=tar.gz branch-sort=age # for this to work you have to build cgit against lua -# and install luacrypto too +# and install luacrypto too. +# you wull have also to add email-gravatar-sbo-additions.css +# at the bottom of your installed cgit.css email-filter=lua:/usr/share/cgit/filters/email-gravatar-sbo.lua -#css=/static/cgit.css -#logo=/static/cgit.png +#css=/cgit.css +#logo=/cgit.png # repository specific data repo.url=slackbuilds |