TT-RSS Git Ebuild Gentoo

A little tinkering and managed to get an ebuild working for the excellent google reader replacement tt-rss.

Download it here tt-rss-9999.ebuild

# 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-9999.ebuild,v 1.0 13/07/20 13:02:05 ukjohnd Exp $

EAPI=5

inherit git-2  eutils webapp user depend.php depend.apache
MY_PN="Tiny-Tiny-RSS"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
HOMEPAGE="http://tt-rss.org/"
EGIT_REPO_URI="git://github.com/gothfox/Tiny-Tiny-RSS.git"
#SLOT="0"
LICENSE="GPL-2"
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 )"

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-r1 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
}






‘Worrying’ rise in alcohol-related deaths among women in their 30s and 40s | Society | The Guardian

‘Worrying’ rise in alcohol-related deaths among women in their 30s and 40s | Society | The Guardian.

BBC News – Cory Monteith: The heroin users who don’t fit the ‘junkie’ stereotype

heroin

via BBC News – Cory Monteith: The heroin users who don’t fit the ‘junkie’ stereotype.

BBC News – Minimum alcohol pricing plan shelved

BBC News – Minimum alcohol pricing plan shelved.

Sunlit

Sunlit by Hexagoneye Photography
Sunlit, a photo by Hexagoneye Photography on Flickr.

Simple flower hit by sunlight

BBC News – ‘I can relate to Lauren the alcoholic in EastEnders’

BBC News – ‘I can relate to Lauren the alcoholic in EastEnders’.

Are Alcohol-Fuelled Arguments Ruining Your Friendships And Relationships?

Are Alcohol-Fuelled Arguments Ruining Your Friendships And Relationships?.

Self Centered Actor

Most people try to live by self-propulsion. Each per­
son is like an actor who wants to run the whole show;
is forever trying to arrange the lights, the ballet, the
scenery and the rest of the players in his own way. If

his arrangements would only stay put, if only people
would do as he wished, the show would be great.
Everybody, including himself, would be pleased. Life
would be wonderful. In trying to make these arrange­
ments our actor may sometimes be quite virtuous. He
may be kind, considerate, patient, generous; even
modest and self-sacrificing. On the other hand, he
may be mean, egotistical, selfish and dishonest. But,
as with most humans, he is more likely to have varied
traits.
What usually happens? The show doesn’t come off
very well. He begins to think life doesn’t treat him
right. He decides to exert himself more. He becomes,
on the next occasion, still more demanding or gracious,
as the case may be. Still the play does not suit him.
Admitting he may be somewhat at fault, he is sure
that other people are more to blame. He becomes
angry, indignant, self-pitying. What is his basic
trouble? Is he not really a self-seeker even when try­
ing to be kind? Is he not a victim of the delusion that
he can wrest satisfaction and happiness out of this
world if he only manages well? Is it not evident to all
the rest of the players that these are the things he
wants? And do not his actions make each of them
wish to retaliate, snatching all they can get out of the
show? Is he not, even in his best moments, a pro­
ducer of confusion rather than harmony?
Our actor is self-centered—ego-centric, as people
like to call it nowadays. He is like the retired business
man who lolls in the Florida sunshine in the winter
complaining of the sad state of the nation; the minister
who sighs over the sins of the twentieth century; poli­
ticians and reformers who are sure all would be Utopia

if the rest of the world would only behave; the outlaw
safe cracker who thinks society has wronged him; and
the alcoholic who has lost all and is locked up. What­
ever our protestations, are not most of us concerned
with ourselves, our resentments, or our self-pity?
Selfishness—self-centeredness! That, we think, is the
root of our troubles. Driven by a hundred forms of
fear, self-delusion, self-seeking, and self-pity, we step
on the toes of our fellows and they retaliate. Some­
times they hurt us, seemingly without provocation, but
we invariably find that at some time in the past we
have made decisions based on self which later placed
us in a position to be hurt.
So our troubles, we think, are basically of our own
making. They arise out of ourselves, and the alcoholic
is an extreme example of self-will run riot, though he
usually doesn’t think so. Above everything, we alco­
holics must be rid of this selfishness. We must, or it
kills us! God makes that possible. And there often
seems no way of entirely getting rid of self without
His aid. Many of us had moral and philosophical convictions
galore, but we could not live up to them even
though we would have liked to. Neither could we
reduce our self-centeredness much by wishing or try­
ing on our own power. We had to have God’s help.
This is the how and why of it. First of all, we had to
quit playing God. It didn’t work. Next, we decided
that hereafter in this drama of life, God was going to
be our Director. He is the Principal; we are His
agents. He is the Father, and we are His children.
Most good ideas are simple, and this concept was the
keystone of the new and triumphant arch through
which we passed to freedom.
Chapter 5
HOW IT WORKS