You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.2 KiB
89 lines
2.2 KiB
12 years ago
|
# Copyright 1999-2013 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
# $Header: /var/cvsroot/gentoo-x86/www-apps/tt-rss/tt-rss-1.7.9-r1.ebuild,v 1.1 2013/05/20 09:20:31 scarabeus Exp $
|
||
12 years ago
|
|
||
12 years ago
|
EAPI=5
|
||
12 years ago
|
|
||
12 years ago
|
inherit user eutils webapp depend.php depend.apache vcs-snapshot
|
||
12 years ago
|
|
||
|
DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
|
||
|
HOMEPAGE="http://tt-rss.org/"
|
||
12 years ago
|
SRC_URI="https://github.com/gothfox/Tiny-Tiny-RSS/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||
|
http://dev.gentooexperimental.org/~scarabeus/ttrss-${PV}-patches.tar.xz
|
||
|
"
|
||
12 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
12 years ago
|
IUSE="daemon +mysql postgres"
|
||
12 years ago
|
|
||
12 years ago
|
DEPEND="
|
||
|
daemon? ( dev-lang/php[mysql?,postgres?,pcntl,curl] )
|
||
|
!daemon? ( dev-lang/php[mysql?,postgres?,curl] )
|
||
|
"
|
||
12 years ago
|
RDEPEND="${DEPEND}"
|
||
|
|
||
12 years ago
|
REQUIRED_USE="|| ( mysql postgres )"
|
||
|
|
||
12 years ago
|
need_httpd_cgi
|
||
|
need_php_httpd
|
||
|
|
||
|
pkg_setup() {
|
||
|
webapp_pkg_setup
|
||
|
|
||
|
if use daemon; then
|
||
|
enewgroup ttrssd
|
||
|
enewuser ttrssd -1 /bin/sh /dev/null ttrssd
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
# Customize config.php so that the right 'DB_TYPE' is already set (according to the USE flag)
|
||
|
einfo "Customizing config.php..."
|
||
|
mv config.php{-dist,} || die "Could not rename config.php-dist to config.php."
|
||
|
|
||
|
if use mysql && ! use postgres; then
|
||
12 years ago
|
sed -i \
|
||
|
-e "/define('DB_TYPE',/{s:pgsql:mysql:}" \
|
||
|
config.php || die
|
||
12 years ago
|
fi
|
||
|
|
||
12 years ago
|
sed -i \
|
||
|
-e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" \
|
||
|
config.php || die
|
||
|
|
||
12 years ago
|
# broken release fixed in git
|
||
|
EPATCH_FORCE="yes" \
|
||
|
EPATCH_SOURCE="${WORKDIR}/ttrss-1.7.9-patches" \
|
||
|
EPATCH_SUFFIX="patch" \
|
||
|
epatch
|
||
12 years ago
|
sh utils/update-translations.sh
|
||
12 years ago
|
|
||
12 years ago
|
# per 462578
|
||
|
epatch_user
|
||
12 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
webapp_src_preinst
|
||
|
|
||
|
insinto "/${MY_HTDOCSDIR}"
|
||
12 years ago
|
doins -r .
|
||
12 years ago
|
keepdir "/${MY_HTDOCSDIR}"/feed-icons
|
||
|
|
||
12 years ago
|
for DIR in cache lock feed-icons; do
|
||
12 years ago
|
webapp_serverowned -R "${MY_HTDOCSDIR}/${DIR}"
|
||
12 years ago
|
done
|
||
|
|
||
|
webapp_configfile "${MY_HTDOCSDIR}"/config.php
|
||
|
if use daemon; then
|
||
|
webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon.txt
|
||
12 years ago
|
newinitd "${FILESDIR}"/ttrssd.initd-r1 ttrssd
|
||
|
newconfd "${FILESDIR}"/ttrssd.confd-r1 ttrssd
|
||
|
insinto /etc/logrotate.d/
|
||
|
newins "${FILESDIR}"/ttrssd.logrotated ttrssd
|
||
12 years ago
|
else
|
||
|
webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
|
||
|
fi
|
||
|
|
||
|
webapp_src_install
|
||
|
}
|