summaryrefslogtreecommitdiff
blob: 11d4eccec9d4a21b4d9e87ac820c03408de0858e (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
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 1999-2005 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# Source: http://bugs.gentoo.org/show_bug.cgi?id=51662
# Submitted-By: G. Wrobel
# Reviewed-By: wrobel 2005-12-11
# $Id$

inherit webapp depend.php

MY_P=${PN}${PV//./}

DESCRIPTION="Claroline E-learning System"
HOMEPAGE="http://www.claroline.net/"
SRC_URI="http://www.claroline.net/dlarea/${MY_P}.tar.gz"

LICENSE="GPL-2"
IUSE=""

KEYWORDS="~x86"

RDEPEND="net-www/apache
         virtual/php
         >=dev-db/mysql-3.23"

S=${WORKDIR}/${MY_P}

pkg_setup() {

	webapp_pkg_setup

	require_php_with_use tokenizer

}

src_install() {

	webapp_src_preinst

	cd ${S}

	## Install documentation
	DOCS="CREDITS.txt INSTALL.txt README.txt"
	dodoc ${DOCS}
	
	## Install application
	cp -R . ${D}/${MY_HTDOCSDIR}

	## Remove unnecessary documentation from webdir
	for file in ${DOCS} LICENCE.txt 
	do
	  rm ${D}/${MY_HTDOCSDIR}/${file}
	done

	touch ${D}/${MY_HTDOCSDIR}/claroline/inc/currentVersion.inc.php
	cp ${D}/${MY_HTDOCSDIR}/textzone_right.inc.html.dist ${D}/${MY_HTDOCSDIR}/textzone_right.inc.html
	cp ${D}/${MY_HTDOCSDIR}/textzone_top.inc.html.dist ${D}/${MY_HTDOCSDIR}/textzone_top.inc.html

	keepdir ${MY_HTDOCSDIR}/courses
	sed -i -e 's#^\$coursesRepositoryAppend.*#\$coursesRepositoryAppend="courses/";#' ${D}/${MY_HTDOCSDIR}/claroline/install/do_install.inc.php

	SFILES="courses claroline claroline/inc/conf claroline/sql                  \
            claroline/inc/currentVersion.inc.php claroline/lang claroline/admin \
            claroline/inc/conf/* textzone_right.inc.html textzone_top.inc.html  \
            textzone_right.inc.html.dist textzone_top.inc.html.dist"

	for FILE in ${SFILES}
	do
	  webapp_serverowned ${MY_HTDOCSDIR}/${FILE};
	done

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

	webapp_src_install
}