summaryrefslogtreecommitdiff
blob: ca03210359b30efb2230bb4229ea1b7586100af2 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-www/tiki/tiki-1.6.ebuild

inherit webapp-apache

DESCRIPTION="A Web Based Collaboration Platform"
HOMEPAGE="http://twiki.org/"
SRC_URI="http://twiki.org/swd/TWiki${PV}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86 ~ppc"

RDEPEND="virtual/php
	media-gfx/graphviz
	dev-db/mysql"

webapp-detect || NO_WEBSERVER=1

pkg_setup() {
	webapp-pkg_setup "${NO_WEBSERVER}"
	einfo "Installing for ${WEBAPP_SERVER}"
}

src_unpack() {
	mkdir ${P}
	cd ${S}
	unpack ${A}
	sed -i -e 's:\/home\/httpd:\/var\/www\/localhost\/htdocs:g' lib/TWiki.cfg
	echo "Options ExecCGI" >> bin/.htaccess.txt
}


src_install() {
	webapp-mkdirs

	local DocumentRoot=${HTTPD_ROOT}
	local destdir=${DocumentRoot}/${PN}

	dodir ${destdir}
	cp -r . ${D}${destdir}

	cd ${D}/${HTTPD_ROOT}
	dodoc readme.txt license.txt
	chown -R ${HTTPD_USER}:${HTTPD_GROUP} ${PN}
}

pkg_postinst() {
	einfo "now go to your ${HTTPD_ROOT},"
	einfo "copy bin/.htaccess.txt to bin/.htaccess"
	einfo "and edit the paths"
}