summaryrefslogtreecommitdiff
blob: 9211a4bb6d27d61b62f7472d638fbea98c1c99e4 (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-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/net2ftp/net2ftp-0.82.ebuild,v 1.4 2005/11/04 11:05:08 uberlord Exp $

inherit eutils webapp

IUSE=""

MY_P=${PN}_v${PV}
S="${WORKDIR}/${MY_P}"

DESCRIPTION="Web-based FTP client in php"
SRC_URI="http://www.net2ftp.com/download/${MY_P}.zip"
HOMEPAGE="http://www.net2ftp.com/"

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

DEPEND="app-arch/unzip"
RDEPEND="virtual/php"

src_unpack() {
	unzip "${DISTDIR}/${MY_P}.zip" >/dev/null \
		|| die "failed to unpack ${MY_P}.zip"

	# We rename these files as it looks like Windows was
	# development platform
	# We also rename the version number as the doc dir is
	# versioned anyway
	cd "${S}"
	rename "_v${PV}" "" *.txt
	rename _ "" *.txt
	rename .txt "" *.txt

	# Fix footer to point to the new license name
	sed -i -e "s|_LICENSE.txt|LICENSE|" includes/html.inc.php
}

src_install() {
	webapp_src_preinst

	local docs="CREDITS INSTALL CHANGES TODO" doc

	dodoc ${docs} LICENSE
	for doc in ${docs}; do
		rm -f "${doc}"
	done

	rm -f temp/chmod_this_dir_to_777.txt

	cp -pPR * "${D}/${MY_HTDOCSDIR}"

	webapp_serverowned "${MY_HTDOCSDIR}/temp"

	webapp_configfile "${MY_HTDOCSDIR}/settings.inc.php"
	webapp_configfile "${MY_HTDOCSDIR}/settings_authorizations.inc.php"
	webapp_configfile "${MY_HTDOCSDIR}/settings_screens.inc.php"

	webapp_sqlscript mysql create_tables.sql

	webapp_src_install
}