2016-08-30 22:42:56 +02:00
|
|
|
#
|
|
|
|
# Common variables
|
|
|
|
#
|
2017-02-13 22:28:50 +01:00
|
|
|
APPNAME="freshrss"
|
2016-10-31 12:18:57 +01:00
|
|
|
# FreshRSS version
|
2019-01-29 21:21:05 +01:00
|
|
|
VERSION="1.13.1"
|
2016-08-30 22:42:56 +02:00
|
|
|
|
2016-10-31 12:18:57 +01:00
|
|
|
# FreshRSS complete tarball checksum
|
2019-01-29 21:21:05 +01:00
|
|
|
FRESHRSS_SOURCE_SHA256="45510d4f9fff1ee530e94e8c3bf35649f0c7cc032118b57346621de0d4dd1abe"
|
2016-08-30 22:42:56 +02:00
|
|
|
|
2016-10-31 12:18:57 +01:00
|
|
|
# Remote URL to fetch FreshRSS source tarball
|
2019-01-29 21:21:05 +01:00
|
|
|
FRESHRSS_SOURCE_URL="https://github.com/FreshRSS/FreshRSS/archive/${VERSION}.tar.gz"
|
2016-08-30 22:42:56 +02:00
|
|
|
|
|
|
|
PKGDIR=$(cd ../; pwd)
|
|
|
|
|
2018-09-23 15:10:36 +02:00
|
|
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
|
|
|
pkg_dependencies="php5-gd"
|
|
|
|
else
|
|
|
|
pkg_dependencies="php-gd php-zip php-dom php-mbstring"
|
|
|
|
fi
|
|
|
|
|
2016-08-30 22:42:56 +02:00
|
|
|
#
|
|
|
|
# Common helpers
|
|
|
|
#
|
2016-10-31 12:18:57 +01:00
|
|
|
# Download and extract FreshRSS sources to the given directory
|
2016-08-30 22:42:56 +02:00
|
|
|
# usage: extract_freshrss DESTDIR
|
|
|
|
extract_freshrss() {
|
|
|
|
local DESTDIR=$1
|
|
|
|
|
2016-10-31 12:18:57 +01:00
|
|
|
# retrieve and extract FreshRSS tarball
|
2016-08-30 22:42:56 +02:00
|
|
|
rc_tarball="${DESTDIR}/freshrss.tar.gz"
|
2017-03-06 12:02:25 +01:00
|
|
|
wget -q -O "$rc_tarball" "$FRESHRSS_SOURCE_URL" \
|
2016-10-31 12:18:57 +01:00
|
|
|
|| ynh_die "Unable to download FreshRSS tarball"
|
2016-08-30 22:42:56 +02:00
|
|
|
echo "$FRESHRSS_SOURCE_SHA256 $rc_tarball" | sha256sum -c >/dev/null \
|
|
|
|
|| ynh_die "Invalid checksum of downloaded tarball"
|
|
|
|
tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \
|
|
|
|
|| ynh_die "Unable to extract FreshRss tarball"
|
2017-02-14 10:58:25 +01:00
|
|
|
sudo rm "$rc_tarball"
|
2016-08-30 22:42:56 +02:00
|
|
|
}
|
2017-03-05 17:17:14 +01:00
|
|
|
|
|
|
|
install_freshrss_dependencies() {
|
2018-09-23 15:10:36 +02:00
|
|
|
ynh_install_app_dependencies $pkg_dependencies
|
2017-03-05 17:17:14 +01:00
|
|
|
}
|