cgit: Added cgit 0.7.3-c502865 - A CGI for git written in C
[opensde-package-nopast.git] / develop / cgit / cgit.conf
blob0b27f7dae6198cae230f08a6011451f7913e0865
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../cgit/cgit.conf
5 # Copyright (C) 2008 The OpenSDE Project
7 # More information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- SDE-COPYRIGHT-NOTE-END ---
15 custextract=cgit_extract
16 makeinstopt=
18 hook_add premake 5 'cgit_extract_git'
19 hook_add postmake 5 'cgit_install'
21 cgit_extract()
23         local taropt_orig="$taropt"
25         mkdir -p "$pkg-$ver"
26         taropt="-C $pkg-$ver $taropt"
27         autoextract_tar_bz2 "$@"
28         taropt="$taropt_orig"
31 #FIXME: try to use the installed git if possible
32 cgit_extract_git()
34         local gitver=$( pkgdesc ver git )
35         local gitsource=$( match_source_file -p git git )
36         tar -v $taropt $gitsource
37         rmdir git
38         mv git-$gitver git
41 cgit_install()
43         cat <<-EOT > cgit.cgi
44         #!/bin/sh
46         exec $sbindir/cgit "\$@"
47         EOT
48         chmod +x cgit.cgi
50         cp -a cgit $root$sbindir
51         cp -a cgitrc README cgit.{css,png,cgi} $root$docdir