|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../cgit/cgit.conf
|
|
|
|
# Copyright (C) 2008 - 2009 The OpenSDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
makeinstopt=
|
|
|
|
|
|
|
|
hook_add prepatch 5 'cgit_extract_git'
|
|
|
|
hook_add postmake 5 'cgit_install'
|
|
|
|
|
|
|
|
#FIXME: try to use the installed git if possible
|
|
|
|
cgit_extract_git()
|
|
|
|
{
|
|
|
|
local gitver=$( pkgdesc ver git )
|
|
|
|
local gitsource=$( match_source_file -p git git )
|
|
|
|
tar -v $taropt $gitsource
|
|
|
|
rmdir git
|
|
|
|
mv git-$gitver git
|
|
|
|
}
|
|
|
|
|
|
|
|
cgit_install()
|
|
|
|
{
|
|
|
|
cat <<-EOT > cgit.cgi
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exec $sbindir/cgit "\$@"
|
|
|
|
EOT
|
|
|
|
chmod +x cgit.cgi
|
|
|
|
|
|
|
|
cp -a cgit $root$sbindir
|
|
|
|
cp -a cgitrc.5.txt README cgit.{css,png,cgi} $root$docdir
|
|
|
|
}
|
|
|
|
|
|
|
|
if pkginstalled fcgi; then
|
|
|
|
echo_status "Enabling fastcgi mode"
|
|
|
|
var_append patchfiles ' ' "$confdir/fastcgi.diff"
|
|
|
|
fi
|