1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit eutils python-r1
12 DESCRIPTION="A python script that converts RSS/Atom newsfeeds to email"
13 HOMEPAGE="http://www.allthingsrss.com/rss2email"
14 SRC_URI="http://www.allthingsrss.com/${PN}/${P}.tar.gz
15 mirror://debian/pool/main/r/${PN}/${PN}_${DEBIAN_PV}-1.diff.gz"
21 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
23 DEPEND="dev-util/patchutils"
24 RDEPEND="${PYTHON_DEPS}
25 >=dev-python/feedparser-5.0.1
26 >=dev-python/html2text-3.01"
29 # Tarball has zero permissions inside
30 tar xf "${DISTDIR}"/${P}.tar.gz || die
31 chmod 0755 ${P} || die
32 chmod 0644 ${P}/* || die
36 epatch "${FILESDIR}"/${PN}-2.69-config-location.patch
38 # Extract man page from Debian patch
39 zcat "${DISTDIR}"/${PN}_${DEBIAN_PV}-1.diff.gz \
40 | filterdiff -i '*/r2e.1' \
41 > "${S}"/r2e.1.patch || die
42 EPATCH_OPTS="-p1" epatch r2e.1.patch
47 python_moduleinto ${PN}
48 python_newscript rss2email.py main.py
50 python_foreach_impl my_install
53 doins config.py.example
55 dodoc CHANGELOG readme.html
61 SITE_PACKAGES=`python2 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
62 CONF_DIR=${HOME}/.rss2email
63 mkdir -p "${CONF_DIR}"
64 exec python2 "${SITE_PACKAGES}"/rss2email/main.py "${CONF_DIR}"/feeds.dat $*