summaryrefslogtreecommitdiff
blob: 7a38b6b5bfcf21fdad61a11fd19ef9b2fb002c17 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/bugport/bugport-1.146.ebuild,v 1.6 2008/02/22 15:46:04 hollow Exp $

inherit webapp depend.php

DESCRIPTION="Web-based system for managing tasks and defects throughout the software development process"
HOMEPAGE="http://www.incogen.com/index.php?type=General&param=bugport"
SRC_URI="http://www.incogen.com/downloads/${PN}/${PN}_${PV}.tar.gz"

LICENSE="BSD"
KEYWORDS="x86 ~ppc"
IUSE=""

DEPEND="dev-php/adodb"

need_httpd_cgi
need_php_httpd

S="${WORKDIR}"/${PN}_${PV}

pkg_setup() {
	webapp_pkg_setup
	has_php
	require_php_with_use mysql
}

src_install() {
	webapp_src_preinst

	# fix INSTALL.txt to let the user know where the SQL scripts live
	sed -i -e "s|create_tables.sql|${MY_SQLSCRIPTSDIR}/mysql/${PV}_create.sql|" \
		INSTALL.txt || die "sed failed in INSTALL.txt"

	webapp_postinst_txt en INSTALL.txt

	webapp_sqlscript mysql create_tables.sql
	rm -f *.sql

	dodoc *.txt
	docinto devel-docs
	dodoc devel-docs/*
	rm -rf *.txt devel-docs install-gentoo-unsupported

	# fix config file to know where to find adodb
	sed -i -e 's|^\(# \+\)\?\$adoDir.\+$|$adoDir = "/usr/lib/php/adodb/"; # DO NOT CHANGE!|' \
		conf/config.php || die "failed to fix adodb location in config.php."

	insinto "${MY_HTDOCSDIR}"
	doins -r .

	webapp_configfile "${MY_HTDOCSDIR}"/conf/config.php
	webapp_configfile "${MY_HTDOCSDIR}"/conf/configuration.php

	webapp_src_install
}