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

inherit webapp depend.php

MY_PN="ackerTodo"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="ackerTodo is a light-weight web based todo list manager"
HOMEPAGE="http://ackertodo.sourceforge.net/site2/index.html"
SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}.tar.bz2"
LICENSE="GPL-2"

KEYWORDS="~x86"
IUSE="email-notification"

DEPEND=""
RDEPEND="email-notification? ( virtual/cron )
	virtual/httpd-cgi"

need_php_httpd

S=${WORKDIR}/${MY_P}

pkg_setup() {
	webapp_pkg_setup
	if use email-notification ; then
		require_php_with_use cli mysql
	else
		require_php_with_use mysql
	fi
}

src_install() {
	webapp_src_preinst

	local docs="ChangeLog CREDITS README TODO UPGRADE"

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

	cp -r src/* "${D}"${MY_HTDOCSDIR}

	webapp_configfile ${MY_HTDOCSDIR}/config/config.inc.php
	webapp_sqlscript mysql "${D}"${MY_HTDOCSDIR}/setup/ackertodo.sql
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
	webapp_src_install
}

pkg_postinst() {
	if use email-notification ; then
		elog "See Email notification section of README in /usr/share/doc/${PF}"
		elog "for instructions on using the email module."
	fi
	webapp_pkg_postinst
}