You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
16 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# Filename: package/.../cgit/cgit.conf
|
||
|
# Copyright (C) 2008 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 ---
|
||
|
|
||
|
custextract=cgit_extract
|
||
|
makeinstopt=
|
||
|
|
||
|
hook_add premake 5 'cgit_extract_git'
|
||
|
hook_add postmake 5 'cgit_install'
|
||
|
|
||
|
cgit_extract()
|
||
|
{
|
||
|
local taropt_orig="$taropt"
|
||
|
|
||
|
mkdir -p "$pkg-$ver"
|
||
|
taropt="-C $pkg-$ver $taropt"
|
||
|
autoextract_tar_bz2 "$@"
|
||
|
taropt="$taropt_orig"
|
||
|
}
|
||
|
|
||
|
#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 README cgit.{css,png,cgi} $root$docdir
|
||
|
}
|