summaryrefslogtreecommitdiff
blob: 00e1b5e10960d4db3ebb6e36b30af98ab3887ee4 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# Source: http://bugs.gentoo.org/show_bug.cgi?id=91078
# Submitted-By: Maciek Ligenza
# Reviewed-By: rl03 2005-12-10

inherit webapp depend.php depend.apache

DESCRIPTION="Bug Tracking System - easy and less advanced bugzilla replacement"
HOMEPAGE="http://flyspray.rocks.cc/"
SRC_URI="http://flyspray.org/${P}.zip"

LICENSE="LGPL-2"
KEYWORDS="~x86"

IUSE="graphviz"

DEPEND="app-arch/unzip"
RDEPEND="dev-php/adodb
	graphviz? ( media-gfx/graphviz )"

need_php_httpd
want_apache

pkg_setup() {
	if ! PHPCHECKNODIE="yes" require_php_with_use xml || \
		! PHPCHECKNODIE="yes" require_php_with_any_use mysql mysqli postgres ; then
			die "Re-install ${PHP_PKG} with xml and at least one of mysql mysqli postgres in USE."
	fi
	webapp_pkg_setup
}

src_unpack () {
	unpack ${A}
	cd "${S}"
	sed -e "s|../adodb|/usr/share/php/adodb|" -i setup/index.php || die "sed failed"
}

src_install () {
	webapp_src_preinst

	cp -R . "${D}"/${MY_HTDOCSDIR}

	dodoc docs/*
	rm -rf "${D}"/${MY_HTDOCSDIR}/docs

	webapp_serverowned "${MY_HTDOCSDIR}/attachments"

	webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
	webapp_configfile ${MY_HTDOCSDIR}/${PN}.conf.php
	webapp_src_install
}

pkg_postinst() {
	webapp_pkg_postinst
	elog "${PN} requires that you disable safe_mode in PHP. :("
	elog "Is highly reccommended that both magic_quotes and register_globals"
	elog "are set to off due to security reasons."
	use apache2 && elog "Also see the htaccess.dist file."
}