mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
aur/tt-rss to community
This commit is contained in:
parent
ca33cf82a8
commit
c42ffdb014
6 changed files with 47 additions and 144 deletions
|
@ -1,48 +0,0 @@
|
||||||
# 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.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
|
|
||||||
}
|
|
|
@ -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:
|
|
|
@ -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."
|
|
||||||
}
|
|
42
community/tt-rss/PKGBUILD
Normal file
42
community/tt-rss/PKGBUILD
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# $Id$
|
||||||
|
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
|
||||||
|
# Contributor: Clément Démoulins <clement@archivel.fr>
|
||||||
|
# Contributor: David Rosenstrauch <darose@darose.net>
|
||||||
|
# Contributor: Erik Mank <erik@braindisorder.org>
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Tiny tiny rss feed updater daemon
|
Description=Tiny Tiny RSS feeds update daemon
|
||||||
After=network.target
|
After=network.target
|
||||||
After=mysqld.service
|
After=mysqld.service
|
||||||
After=postgresql.service
|
After=postgresql.service
|
4
community/tt-rss/tt-rss.install
Normal file
4
community/tt-rss/tt-rss.install
Normal file
|
@ -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."
|
||||||
|
}
|
Loading…
Reference in a new issue