/[gentoo-x86]/www-apps/tt-rss/tt-rss-1.5.9.ebuild
Gentoo

Contents of /www-apps/tt-rss/tt-rss-1.5.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Feb 3 22:37:28 2012 UTC (2 years, 5 months ago) by hwoarang
Branch: MAIN
version bump. thanks to Patrick <mail@patrick-nagel.net>. Bug #399889

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/tt-rss/tt-rss-1.5.8.1.ebuild,v 1.1 2011/12/30 09:19:39 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit eutils 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="daemon mysql postgres"
16
17 DEPEND=" daemon? ( dev-lang/php[mysql?,postgres?,pcntl,curl] )
18 !daemon? ( dev-lang/php[mysql?,postgres?,curl] )"
19 RDEPEND="${DEPEND}"
20
21 need_httpd_cgi
22 need_php_httpd
23 use daemon && need_php_cli
24
25 pkg_setup() {
26 webapp_pkg_setup
27
28 use mysql && require_php_with_use mysql
29 use postgres && require_php_with_use postgres
30
31 if use daemon; then
32 enewgroup ttrssd
33 enewuser ttrssd -1 /bin/sh /dev/null ttrssd
34 fi
35 }
36
37 src_prepare() {
38 # Customize config.php so that the right 'DB_TYPE' is already set (according to the USE flag)
39 einfo "Customizing config.php..."
40 mv config.php{-dist,} || die "Could not rename config.php-dist to config.php."
41
42 if use mysql && ! use postgres; then
43 sed -e "/define('DB_TYPE',/{s:pgsql:mysql:}" -i config.php || die "sed failed"
44 fi
45
46 sed -e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" -i config.php \
47 || die "sed failed"
48 }
49
50 src_install() {
51 webapp_src_preinst
52
53 insinto "/${MY_HTDOCSDIR}"
54 doins -r * || die "Could not copy the files to ${MY_HTDOCSDIR}."
55 keepdir "/${MY_HTDOCSDIR}"/feed-icons
56
57 insinto /etc/logrotate.d/
58 newins "${FILESDIR}"/ttrssd.logrotated ttrssd || die "Installing ttrssd logrotate config failed."
59
60 for DIR in cache cache/htmlpurifier cache/magpie cache/simplepie cache/images cache/export lock feed-icons; do
61 webapp_serverowned "${MY_HTDOCSDIR}/${DIR}"
62 done
63
64 webapp_configfile "${MY_HTDOCSDIR}"/config.php
65 if use daemon; then
66 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon.txt
67 newinitd "${FILESDIR}"/ttrssd.initd ttrssd
68 newconfd "${FILESDIR}"/ttrssd.confd ttrssd
69 else
70 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
71 fi
72
73 webapp_src_install
74 }

  ViewVC Help
Powered by ViewVC 1.1.20