tt-rss-1.9 added

This commit is contained in:
Kolan Sh 2013-09-12 13:39:52 +04:00
parent cc4fc6c519
commit b0ba918b3a
8 changed files with 284 additions and 0 deletions

1
www-apps/tt-rss/Manifest Normal file
View File

@ -0,0 +1 @@
DIST tt-rss-1.9.tar.gz 2410978 SHA256 f2eb2141b09510b996bb88f129d184a455d6f1fc7fe1f3241811760a6323f455 SHA512 17f1326467c3fcc40504b95fca7bad9861d8de4823f416cffdd0a9c1428fc174dcb8882e3d619e5069760d45519be4064bb829fb3fa9f9b1dfb8d85174eef5ff WHIRLPOOL 83d8b7b61a5ff54a1b31f37b90a7050845600af58e7fcdbe407d5187c2216b3967633cd5b0ec4ae5dd76b3c002f556bc41dcf58dba94fb9a8cd2467ce3fe0cbe

View File

@ -0,0 +1,19 @@
Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes
Once you have configured TT-RSS, put the path to this instance into
the INSTANCE_DIRS variable in /etc/conf.d/ttrssd. Make sure that
the ttrssd user can access the path, and then start the update daemon
with
/etc/init.d/ttrssd start
to get your feeds updated. Add the daemon to your default runlevel,
so that it gets launched after a system restart:
rc-update add ttrssd default
With the update to 1.7.0 the 'magpie' RSS parser has been removed.
That means TT-RSS will use the 'simplepie' parser. If you have been
using 'magpie' so far, the switch might cause lots of duplicate
articles - it's a one-time thing for each instance.

View File

@ -0,0 +1,6 @@
Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes
With the update to 1.7.0 the 'magpie' RSS parser has been removed.
That means TT-RSS will use the 'simplepie' parser. If you have been
using 'magpie' so far, the switch might cause lots of duplicate
articles - it's a one-time thing for each instance.

View File

@ -0,0 +1,15 @@
# Copyright 1999-2013 Gentoo Foundation
# # Distributed under the terms of the GNU General Public License v2
# # $Header: /var/cvsroot/gentoo-x86/www-apps/tt-rss/files/ttrssd.confd-r1,v 1.1 2013/03/24 10:22:25 scarabeus Exp $
# Path to TT-RSS instances which should have running update daemon.
# EXAMPLE: INSTANCE_DIRS="/some/webhost/htdocs/tt-rss /some/otherwebhost/htdocs/newsreader"
INSTANCE_DIRS=""
# Path to log file. Remember to alter logrotate file if you change it here.
LOGFILE="/var/log/ttrssd.log"
# User and group which run the update daemon.
# NOTE: you should really avoid running it as root.
TTRSSD_USER="ttrssd"
TTRSSD_GROUP="ttrssd"

View File

@ -0,0 +1,73 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/tt-rss/files/ttrssd.initd-r1,v 1.3 2013/07/03 20:30:34 hwoarang Exp $
depend() {
need logger net
after postgres mysql
}
LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"}
TTRSSD_USER=${TTRSSD_USER:-"ttrssd"}
TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"}
INSTANCE_FOLDERS="cache lock feed-icons"
checkconfig() {
local instance dir
# check instances
if [ -z "${INSTANCE_DIRS}" ]; then
eerror "There is no defined instance directory in /etc/conf.d/ttrssd"
return 1
fi
# verify log file accessibility
if [ ! -e "${LOGFILE}" ]; then
touch "${LOGFILE}" || return 1
fi
chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1
# check instances for errors
for instance in ${INSTANCE_DIRS}; do
if [ ! -f "${instance}/update_daemon2.php" ]; then
eerror "\"${instance}\" does not contain update_daemon2.php script."
eerror "Please check your installation or the INSTANCE_DIRS variable."
return 1
fi
# FIXME: This should be done by webapp-config during install
for dir in ${INSTANCE_FOLDERS}; do
if [ -d "${instance}/${dir}" ]; then
chgrp -R "${TTRSSD_GROUP}" "${instance}/${dir}" || return 1
chmod -R g+w "${instance}/${dir}" || return 1
fi
done
done
}
start () {
local instance
checkconfig || return 1
for instance in ${INSTANCE_DIRS}; do
ebegin "Starting TT-RSS update daemon in \"${instance}\""
start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \
--stdout "${LOGFILE}" --stderr "${LOGFILE}" \
--exec /usr/bin/php -- -f "${instance}/update_daemon2.php"
eend $?
done
}
stop() {
local instance
for instance in ${INSTANCE_DIRS}; do
ebegin "Stopping TT-RSS update daemon in \"${instance}\""
start-stop-daemon --stop --retry 30 \
--exec /usr/bin/php -- -f "${instance}/update_daemon2.php"
eend $?
rm -f ${instance}/lock/*.lock
done
}

View File

@ -0,0 +1,83 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need logger net
after postgres mysql
}
LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"}
TTRSSD_USER=${TTRSSD_USER:-"ttrssd"}
TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"}
INSTANCE_FOLDERS="cache lock feed-icons"
BASE_PID="/run/ttrssd"
checkconfig() {
local instance instancepidname dir
# check instances
if [ -z "${INSTANCE_DIRS}" ]; then
eerror "There is no defined instance directory in /etc/conf.d/ttrssd"
return 1
fi
# verify log file accessibility
if [ ! -e "${LOGFILE}" ]; then
touch "${LOGFILE}" || return 1
fi
chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1
mkdir -p "${BASE_PID}"
# check instances for errors
for instance in ${INSTANCE_DIRS}; do
instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g')
if [ ! -f "${instance}/update_daemon2.php" ]; then
eerror "\"${instance}\" does not contain update_daemon2.php script."
eerror "Please check your installation or the INSTANCE_DIRS variable."
return 1
fi
# FIXME: This should be done by webapp-config during install
for dir in ${INSTANCE_FOLDERS}; do
if [ -d "${instance}/${dir}" ]; then
chown -R "apache:${TTRSSD_GROUP}" "${instance}/${dir}" || return 1
chmod -R g+w "${instance}/${dir}" || return 1
fi
done
done
}
start () {
local instance instancepidname
checkconfig || return 1
for instance in ${INSTANCE_DIRS}; do
instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g')
mypid="${BASE_PID}/${instancepidname}"
ebegin "Starting TT-RSS update daemon in \"${instance}\""
start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \
--stdout "${LOGFILE}" --stderr "${LOGFILE}" \
--make-pidfile --pidfile "${mypid}" \
--exec /usr/bin/php -- -f "${instance}/update_daemon2.php"
eend $?
done
}
stop() {
local instance instancepidname
for instance in ${INSTANCE_DIRS}; do
instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g')
mypid="${BASE_PID}/${instancepidname}"
ebegin "Stopping TT-RSS update daemon in \"${instance}\""
start-stop-daemon --stop \
--pidfile "${mypid}" \
--exec /usr/bin/php -- -f "${instance}/update_daemon2.php"
eend $?
rm -f ${instance}/lock/*.lock
done
}

View File

@ -0,0 +1,8 @@
/var/log/ttrssd.log {
daily
missingok
notifempty
postrotate
/etc/init.d/ttrssd restart > /dev/null
endscript
}

View File

@ -0,0 +1,79 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/tt-rss/tt-rss-1.9.ebuild,v 1.2 2013/09/12 08:33:47 tomka Exp $
EAPI=5
inherit user eutils webapp depend.php depend.apache vcs-snapshot
DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
HOMEPAGE="http://tt-rss.org/"
SRC_URI="https://github.com/gothfox/Tiny-Tiny-RSS/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
KEYWORDS="~amd64 ~x86"
IUSE="daemon +mysql postgres"
DEPEND="
daemon? ( dev-lang/php[mysql?,postgres?,pcntl,curl] )
!daemon? ( dev-lang/php[mysql?,postgres?,curl] )
"
RDEPEND="${DEPEND}"
REQUIRED_USE="|| ( mysql postgres )"
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
sed -i \
-e "/define('DB_TYPE',/{s:pgsql:mysql:}" \
config.php || die
fi
sed -i \
-e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" \
config.php || die
# per 462578
epatch_user
}
src_install() {
webapp_src_preinst
insinto "/${MY_HTDOCSDIR}"
doins -r *
keepdir "/${MY_HTDOCSDIR}"/feed-icons
for DIR in cache lock feed-icons; do
webapp_serverowned -R "${MY_HTDOCSDIR}/${DIR}"
done
webapp_configfile "${MY_HTDOCSDIR}"/config.php
if use daemon; then
webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon.txt
newinitd "${FILESDIR}"/ttrssd.initd-r2 ttrssd
newconfd "${FILESDIR}"/ttrssd.confd-r1 ttrssd
insinto /etc/logrotate.d/
newins "${FILESDIR}"/ttrssd.logrotated ttrssd
else
webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
fi
webapp_src_install
}