diff --git a/aur/tt-rss/PKGBUILD b/aur/tt-rss/PKGBUILD deleted file mode 100644 index dcd50a1df..000000000 --- a/aur/tt-rss/PKGBUILD +++ /dev/null @@ -1,48 +0,0 @@ -# Contributor: David Rosenstrauch -# Contributor: Erik Mank -# Maintainer: Clément Démoulins - -pkgname=tt-rss -_realname=Tiny-Tiny-RSS -pkgver=1.7.9 -pkgrel=1 -pkgdesc="Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible." -arch=('any') -url="http://tt-rss.org/redmine/" -license=('GPL') -depends=('php') -optdepends=('apache' 'mysql' 'postgresql' 'php-curl') -backup=() -install=tt-rss.install - -source=(https://github.com/gothfox/Tiny-Tiny-RSS/archive/${pkgver}.tar.gz tt-rss-updated.rc tt-rss-updated.service) -md5sums=('d4980f9646cf588ada3956ca9ffba754' - 'd4dbb037f2392eb9f4a91c6ae96863cc' - 'd3ba69d6f0d0a6bce7fab7f235d6afdf') - -package() { - cd "$srcdir/${_realname}-$pkgver" - _instdir=${pkgdir}/usr/share/webapps/${pkgname} - - # install tt-rss - mkdir -p ${_instdir} - cp -ra * ${_instdir}/ - rm -rf ${_instdir}/debian - - # install config file into /etc/webapps/tt-rss/ - mkdir -p $pkgdir/etc/webapps/tt-rss - install -m640 -g http config.php-dist $pkgdir/etc/webapps/tt-rss/config.php-dist - ln -s /etc/webapps/tt-rss/config.php ${_instdir}/config.php - - # cache, feed-icons and lock will be into /var/lib/tt-rss/ - mkdir -p $pkgdir/var/lib/tt-rss - mv ${_instdir}/{lock,feed-icons,cache} $pkgdir/var/lib/tt-rss - ln -s /var/lib/tt-rss/lock ${_instdir}/lock - ln -s /var/lib/tt-rss/feed-icons ${_instdir}/feed-icons - ln -s /var/lib/tt-rss/cache ${_instdir}/cache - chown -R http:http $pkgdir/var/lib/tt-rss - - # add a daemon - install -D -m755 ${srcdir}/tt-rss-updated.rc ${pkgdir}/etc/rc.d/tt-rss-updated - install -D -m644 ${srcdir}/tt-rss-updated.service ${pkgdir}/usr/lib/systemd/system/tt-rss-updated.service -} diff --git a/aur/tt-rss/tt-rss-updated.rc b/aur/tt-rss/tt-rss-updated.rc deleted file mode 100644 index a7bc34113..000000000 --- a/aur/tt-rss/tt-rss-updated.rc +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -daemon_name=tt-rss-updated - -ttrss_user="http" -ttrss_path=/usr/share/webapps/tt-rss -ttrss_command="php $ttrss_path/update.php --daemon" - -. /etc/rc.conf -. /etc/rc.d/functions -#. /etc/conf.d/$daemon_name.conf - -get_pid() { - pidof -o %PPID -- $ttrss_command -} - -case "$1" in - start) - stat_busy "Starting $daemon_name daemon" - - PID=$(get_pid) - if [[ -z $PID ]]; then - [[ -f /var/run/${daemon_name}.pid ]] && - rm -f /var/run/${daemon_name}.pid - # RUN - su - ${ttrss_user} -s /bin/sh -c "${ttrss_command}" &> /var/log/${daemon_name}.log & - # - if [[ $? -gt 0 ]]; then - stat_fail - exit 1 - else - echo $(get_pid) > /run/${daemon_name}.pid - add_daemon ${daemon_name} - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping ${daemon_name} daemon" - PID=$(get_pid) - # KILL - [[ -n $PID ]] && kill $PID &> /dev/null - # - if [[ $? -gt 0 ]]; then - stat_fail - exit 1 - else - rm -f /var/run/${daemon_name}.pid &> /dev/null - rm_daemon ${daemon_name} - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking ${daemon_name} status"; - ck_status ${daemon_name} - ;; - - *) - echo "usage: $0 {start|stop|restart|status}" -esac - -exit 0 - -# vim:set ts=2 sw=2 et ft=sh: diff --git a/aur/tt-rss/tt-rss.install b/aur/tt-rss/tt-rss.install deleted file mode 100644 index b1731e5ed..000000000 --- a/aur/tt-rss/tt-rss.install +++ /dev/null @@ -1,20 +0,0 @@ -## arg 1: the new package version -post_install() { - echo - echo "As per the installation notes at http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes" - echo "you must perform the following steps to finish installing tt-rss:" - echo - echo "New Installation:" - echo "1. Install the schema file corresponding to your database server (either schema/ttrss_schema_mysql.sql or schema/trss_schema_pgsql.sql)" - echo "2. Copy /etc/webapps/tt-rss/config.php-dist to config.php. Fill in your database server info and other necessary parameters." - echo "3. Choose a method to update your feeds: http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds" - echo " The daemon tt-rss-updated is available to automatically update the feeds." -} - -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - echo - echo "Upgrade from previous version:" - echo "1. Update config.php with new configuration data from config.php-dist if necessary. Update CONFIG_VERSION to the new version afterwards." -} diff --git a/community/tt-rss/PKGBUILD b/community/tt-rss/PKGBUILD new file mode 100644 index 000000000..7655fc96d --- /dev/null +++ b/community/tt-rss/PKGBUILD @@ -0,0 +1,42 @@ +# $Id$ +# Maintainer: Bartłomiej Piotrowski +# Contributor: Clément Démoulins +# Contributor: David Rosenstrauch +# Contributor: Erik Mank + +pkgname=tt-rss +pkgver=1.7.9 +pkgrel=1 +pkgdesc='Web-based news feed (RSS/Atom) aggregator' +arch=('any') +url='http://tt-rss.org/redmine/' +license=('GPL') +depends=('php') +optdepends=('mysql' 'postgresql' 'php-curl') +install=tt-rss.install +source=(https://github.com/gothfox/Tiny-Tiny-RSS/archive/$pkgver.tar.gz + service) +sha256sums=('972f0f8a1033f076093ad6ff6480a0c32166bddeec217c5176da19afd021e3ff' + '41309d75318b32a6a8152c36cbc8431a9173b58ca98f0b73d09b1d2242000737') + +package() { + cd Tiny-Tiny-RSS-$pkgver + _instdir="$pkgdir"/usr/share/webapps/$pkgname + + install -d "$_instdir" + cp -ra * "$_instdir/" + rm -rf "$_instdir"/debian + + install -d "$pkgdir"/etc/webapps/tt-rss + install -gm640 -g http config.php-dist "$pkgdir"/etc/webapps/tt-rss/config.php-dist + ln -s /etc/webapps/tt-rss/config.php "$_instdir"/config.php + + install -d "$pkgdir"/var/lib/tt-rss + mv "$_instdir"/{lock,feed-icons,cache} "$pkgdir"/var/lib/tt-rss + ln -s /var/lib/tt-rss/lock "$_instdir"/lock + ln -s /var/lib/tt-rss/feed-icons "$_instdir"/feed-icons + ln -s /var/lib/tt-rss/cache "$_instdir"/cache + chown -R 33:33 "$pkgdir"/var/lib/tt-rss + + install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/tt-rss.service +} diff --git a/aur/tt-rss/tt-rss-updated.service b/community/tt-rss/service similarity index 82% rename from aur/tt-rss/tt-rss-updated.service rename to community/tt-rss/service index c5a42c1f8..c6b686e3e 100644 --- a/aur/tt-rss/tt-rss-updated.service +++ b/community/tt-rss/service @@ -1,5 +1,5 @@ [Unit] -Description=Tiny tiny rss feed updater daemon +Description=Tiny Tiny RSS feeds update daemon After=network.target After=mysqld.service After=postgresql.service diff --git a/community/tt-rss/tt-rss.install b/community/tt-rss/tt-rss.install new file mode 100644 index 000000000..f4bc290b1 --- /dev/null +++ b/community/tt-rss/tt-rss.install @@ -0,0 +1,4 @@ +post_upgrade() { + echo "===> Update config.php with new configuration data from config.php-dist if necessary." + echo " Update CONFIG_VERSION to the new version afterwards." +}