equal
deleted
inserted
replaced
1 # Copyright 1999-2010 Gentoo Foundation |
|
2 # Distributed under the terms of the GNU General Public License v2 |
|
3 # $Header: $ |
|
4 |
|
5 EAPI="2" |
|
6 |
|
7 inherit webapp depend.php depend.apache |
|
8 |
|
9 DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX" |
|
10 HOMEPAGE="http://tt-rss.org/" |
|
11 SRC_URI="http://tt-rss.org/download/${P}.tar.gz" |
|
12 |
|
13 LICENSE="GPL-2" |
|
14 KEYWORDS="~amd64" |
|
15 IUSE="mysql postgres" |
|
16 |
|
17 DEPEND="dev-lang/php[mysql?,postgres?]" |
|
18 RDEPEND="${DEPEND}" |
|
19 |
|
20 need_httpd_cgi |
|
21 need_php_httpd |
|
22 |
|
23 pkg_setup() { |
|
24 webapp_pkg_setup |
|
25 use mysql && require_php_with_use mysql |
|
26 use postgres && require_php_with_use postgres |
|
27 } |
|
28 |
|
29 src_prepare() { |
|
30 # Customize config.php so that the right 'DB_TYPE' is already set (according to the USE flag) |
|
31 einfo "Customizing config.php..." |
|
32 mv config.php{-dist,} || die "Could not rename config.php-dist to config.php." |
|
33 if use mysql && ! use postgres; then |
|
34 sed -e "/define('DB_TYPE',/{s:pgsql:mysql:}" -i config.php || die "sed failed" |
|
35 fi |
|
36 sed -e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" -i config.php \ |
|
37 || die "sed failed" |
|
38 } |
|
39 |
|
40 src_install() { |
|
41 webapp_src_preinst |
|
42 |
|
43 insinto "/${MY_HTDOCSDIR}" |
|
44 doins -r * || die "Could not copy the files to ${MY_HTDOCSDIR}." |
|
45 keepdir "/${MY_HTDOCSDIR}"/icons |
|
46 |
|
47 webapp_serverowned "${MY_HTDOCSDIR}"/icons |
|
48 webapp_configfile "${MY_HTDOCSDIR}"/config.php |
|
49 |
|
50 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt |
|
51 webapp_src_install |
|
52 } |
|