summaryrefslogtreecommitdiff
path: root/www-apps/cgit/cgit-9999.ebuild
blob: de33543a7b988e0cb1bde6689ca96d8dc9f34739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
 
inherit git webapp
 
EGIT_REPO_URI="git://hjemli.net/pub/git/cgit"
 
GIT_V="1.5.5.1"
 
DESCRIPTION="a fast web-interface for git repositories"
HOMEPAGE="http://hjemli.net/git/cgit/about/"
SRC_URI="mirror://kernel/software/scm/git/git-${GIT_V}.tar.bz2"
 
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
IUSE=""
 
RDEPEND="dev-util/git
sys-libs/zlib
dev-libs/openssl"
DEPEND="${RDEPEND}"
 
S=${WORKDIR}
 
src_unpack() {
git_src_unpack
 
# Extract the git release
unpack ${A}
cd "${S}"
rmdir git
mv git-${GIT_V} git
        cp ${FILESDIR}/cgitrc .
 
sed -i \
-e "s:#css=/cgit/cgit.css:css=/cgit/cgit.css:" \
-e "s:#logo=/cgit/git-logo.png:logo=/cgit/cgit.png:" \
-e "s:#cache-root=/var/cache/cgit:cache-root=/var/cache/cgit:" \
cgitrc || die "patching cgitrc failed"
}
 
src_install() {
webapp_src_preinst
 
insinto ${MY_HTDOCSDIR}
mv cgit cgit.cgi
doins ${FILESDIR}/.htaccess cgit.cgi cgit.css cgit.png
 
insinto /etc
doins cgitrc
 
dodir /var/cache/cgit
keepdir /var/cache/cgit
 
# This is just plain wrong, how to do it correctly? (copied from bugzilla
# 3.0.4 ebuild)
chmod +x "${D}${MY_HTDOCSDIR}"/*.cgi
 
webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
 
webapp_src_install
}