summaryrefslogtreecommitdiff
blob: 19643ed2119e432130a27c798cb25a2edbf86230 (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-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/websvn/websvn-2.0_rc1.ebuild,v 1.4 2006/07/09 13:43:54 uberlord Exp $

inherit depend.php eutils webapp

MY_PV="${PV//_/}"
DESCRIPTION="Web-based browsing tool for Subversion (SVN) repositories in PHP"
HOMEPAGE="http://websvn.tigris.org/"
SRC_URI="http://websvn.tigris.org/files/documents/1380/31740/WebSVN_${MY_PV}.tar.gz"
LICENSE="GPL-2"
IUSE="enscript"
KEYWORDS="~amd64 ~sparc ~x86"

RDEPEND="virtual/php
	dev-util/subversion
	sys-apps/sed
	enscript? ( app-text/enscript )"

S="${WORKDIR}/WebSVN-${MY_PV}"

pkg_setup() {
	webapp_pkg_setup

	if ! has_version "=dev-lang/php-5*" ; then
		require_php_with_use expat
	else
		require_php_with_use xml
	fi
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}/${P}"-pathinfo.patch
}

src_compile() {
	mv "${S}"/include/distconfig.inc "${S}"/include/config.inc
}

src_install() {
	webapp_src_preinst

	local doc docs="changes.txt templates.txt"

	dodoc ${docs}
	for doc in ${docs} install.txt ; do
		rm -f "${doc}"
	done

	insinto "${MY_HTDOCSDIR}"
	doins -r *
	webapp_configfile "${MY_HTDOCSDIR}"/include/config.inc

	# This is the multiview config file
	webapp_configfile "${MY_HTDOCSDIR}"/wsvn.php

	# The cache directory needs to be writeable
	webapp_serverowned "${MY_HTDOCSDIR}"/cache

	webapp_src_install
}