mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
added aur/tt-rss 1.7.5-1
This commit is contained in:
parent
5040ab379a
commit
af145a0fc7
4 changed files with 154 additions and 0 deletions
48
aur/tt-rss/PKGBUILD
Normal file
48
aur/tt-rss/PKGBUILD
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# Contributor: David Rosenstrauch <darose@darose.net>
|
||||||
|
# Contributor: Erik Mank <erik@braindisorder.org>
|
||||||
|
# Maintainer: Clément Démoulins <clement@archivel.fr>
|
||||||
|
|
||||||
|
pkgname=tt-rss
|
||||||
|
_realname=Tiny-Tiny-RSS
|
||||||
|
pkgver=1.7.5
|
||||||
|
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=('9785c9d91b8df767eccac6bff39c3564'
|
||||||
|
'6a2087df3c9a06f533701645df3ec418'
|
||||||
|
'5eb8a3bafb1165dadb9489e1389d9979')
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
75
aur/tt-rss/tt-rss-updated.rc
Normal file
75
aur/tt-rss/tt-rss-updated.rc
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
#!/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:
|
11
aur/tt-rss/tt-rss-updated.service
Normal file
11
aur/tt-rss/tt-rss-updated.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Tiny tiny rss feed updater daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/php /usr/share/webapps/tt-rss/update.php -daemon
|
||||||
|
User=http
|
||||||
|
StandardOutput=syslog
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
20
aur/tt-rss/tt-rss.install
Normal file
20
aur/tt-rss/tt-rss.install
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
## 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."
|
||||||
|
}
|
Loading…
Reference in a new issue