summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-09-23 22:39:41 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-09-23 22:40:58 +0100
commit5ef6ecc9f0d8c046fd0b66f6e371400f251ac17a (patch)
treecbd0b186b919ec1d37b8a8a71fd209dbd7672444 /www-apps/tt-rss/tt-rss-20200922.ebuild
parentacct-user/ttrssd: Add user for www-apps/tt-rss (diff)
downloadgentoo-5ef6ecc9f0d8c046fd0b66f6e371400f251ac17a.tar.gz
gentoo-5ef6ecc9f0d8c046fd0b66f6e371400f251ac17a.tar.bz2
gentoo-5ef6ecc9f0d8c046fd0b66f6e371400f251ac17a.zip
www-apps/tt-rss: Bump snapshot to 20200922, GLEP 81
Bug: https://bugs.gentoo.org/744157 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'www-apps/tt-rss/tt-rss-20200922.ebuild')
-rw-r--r--www-apps/tt-rss/tt-rss-20200922.ebuild87
1 files changed, 87 insertions, 0 deletions
diff --git a/www-apps/tt-rss/tt-rss-20200922.ebuild b/www-apps/tt-rss/tt-rss-20200922.ebuild
new file mode 100644
index 000000000000..1c58510d1d96
--- /dev/null
+++ b/www-apps/tt-rss/tt-rss-20200922.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit prefix webapp
+
+DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
+HOMEPAGE="https://tt-rss.org/"
+SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.gz" # Upstream git frontend blocks wget?
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~arm ~mips ~x86"
+IUSE="+acl daemon gd +mysqli postgres"
+REQUIRED_USE="|| ( mysqli postgres )"
+PHP_USE="gd?,mysqli?,postgres?,curl,fileinfo,intl,json,pdo,unicode,xml"
+
+DEPEND="
+ daemon? ( acl? ( sys-apps/acl ) )
+"
+
+RDEPEND="
+ ${DEPEND}
+ daemon? (
+ acct-user/ttrssd
+ acct-group/ttrssd
+ dev-lang/php:*[${PHP_USE},cli,pcntl]
+ )
+ !daemon? (
+ dev-lang/php:*[${PHP_USE}]
+ )
+ virtual/httpd-php:*
+"
+
+DEPEND="
+ !vhosts? ( ${DEPEND} )
+"
+
+need_httpd_cgi # From webapp.eclass
+
+S="${WORKDIR}/${PN}"
+
+src_configure() {
+ hprefixify config.php-dist
+
+ sed -i -r \
+ -e "/'DB_TYPE'/s:,.*:, '$(usex mysqli mysql pgsql)'); // mysql or pgsql:" \
+ -e "/'CHECK_FOR_UPDATES'/s/true/false/" \
+ config.php-dist || die
+}
+
+src_install() {
+ webapp_src_preinst
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ # When updating, grep the plugins directory for additional CACHE_DIR
+ # instances as they cannot be created later due to permissions.
+ dodir "${MY_HTDOCSDIR}"/cache/starred-images
+
+ local dir
+ for dir in "${ED}${MY_HTDOCSDIR}"/{cache/*,feed-icons,lock}/; do
+ webapp_serverowned "${dir#${ED}}"
+ done
+
+ if use daemon; then
+ webapp_hook_script "${FILESDIR}"/permissions
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon-r1.txt
+
+ newinitd "${FILESDIR}"/ttrssd.initd-r3 ttrssd
+ newconfd "${FILESDIR}"/ttrssd.confd-r2 ttrssd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/ttrssd.logrotated-r1 ttrssd
+
+ elog "After upgrading, please restart ttrssd."
+ else
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ fi
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ elog "You need to merge config.php-dist into config.php manually when upgrading."
+ webapp_pkg_postinst
+}