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

inherit webapp depend.php

DESCRIPTION="Light and Open Source forum package"
HOMEPAGE="http://www.usebb.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

LICENSE="GPL-2"
KEYWORDS="~x86"
IUSE=""

RDEPEND="virtual/httpd-cgi"

need_php_httpd

S="${WORKDIR}/UseBB"

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

	webapp_pkg_setup
}

src_install() {
	webapp_src_preinst

	docs="AUTHORS README Changelog.txt docs/INSTALL docs/UPGRADE"
	dodoc ${docs}
	rm -f ${docs} COPYING
	dohtml -r docs/

	mv config.php-dist config.php
	cp -pPR * "${D}/${MY_HTDOCSDIR}"

	webapp_serverowned ${MY_HTDOCSDIR}/sources
	webapp_serverowned ${MY_HTDOCSDIR}/languages
	webapp_serverowned ${MY_HTDOCSDIR}/config.php

	webapp_configfile ${MY_HTDOCSDIR}/config.php

	webapp_sqlscript mysql install/schemas/mysql.sql
	webapp_sqlscript mysql install/${PN}.sql

	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt

	webapp_src_install
}