Add 'wallabag/' from commit 'f2909b0b9177de0eb30fe8cc6ba7b1e3ec43d693'

git-subtree-dir: wallabag
git-subtree-mainline: 394be3f637
git-subtree-split: f2909b0b91
This commit is contained in:
Cedric Girard 2020-12-10 17:20:58 +01:00
commit df7bfda860
6 changed files with 163 additions and 0 deletions

26
wallabag/.SRCINFO Normal file
View file

@ -0,0 +1,26 @@
pkgbase = wallabag
pkgdesc = Self hostable application for saving web pages
pkgver = 2.3.8
pkgrel = 1
url = http://www.wallabag.org/
install = wallabag.install
arch = any
license = MIT
depends = php>=5.6
depends = php-gd
depends = php-tidy
depends = pcre
optdepends = php-pgsql: For postgres storage
optdepends = php-sqlite: For sqlite storage
optdepends = rabbitmq: For async import
optdepends = redis: For async import
options = !strip
backup = etc/webapps/wallabag/parameters.yml
backup = usr/share/webapps/wallabag/parameters.yml
backup = var/lib/wallabag/data/db/wallabag.sqlite
backup = usr/share/webapps/wallabag/data/db/wallabag.sqlite
source = https://static.wallabag.org/releases/wallabag-release-2.3.8.tar.gz
sha256sums = 58f319ee41828fcc4fd00a14c4ac7c16b2179a47af21e257a15938311d1426eb
pkgname = wallabag

5
wallabag/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*tar.gz
*pkg.tar.xz
src/
pkg/
vendor.zip

14
wallabag/LICENSE Normal file
View file

@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

52
wallabag/PKGBUILD Normal file
View file

@ -0,0 +1,52 @@
# Maintainer: Philipp Schmitt (philipp<at>schmitt<dot>co)
pkgname=wallabag
pkgver=2.3.8
pkgrel=1
pkgdesc='Self hostable application for saving web pages'
arch=('any')
url='http://www.wallabag.org/'
license=('MIT')
depends=(
'php>=5.6'
'php-gd'
'php-tidy'
'pcre'
)
optdepends=(
'php-pgsql: For postgres storage'
'php-sqlite: For sqlite storage'
'rabbitmq: For async import'
'redis: For async import'
)
install="$pkgname.install"
options=(!strip)
source=("https://static.wallabag.org/releases/wallabag-release-${pkgver}.tar.gz")
sha256sums=('58f319ee41828fcc4fd00a14c4ac7c16b2179a47af21e257a15938311d1426eb')
backup=("etc/webapps/${pkgname}/parameters.yml"
"usr/share/webapps/${pkgname}/parameters.yml"
"var/lib/${pkgname}/data/db/wallabag.sqlite"
"usr/share/webapps/${pkgname}/data/db/wallabag.sqlite")
package() {
cd "${pkgdir}"
mkdir -p usr/share/webapps
mv "${srcdir}/${pkgver}" "usr/share/webapps/${pkgname}"
WALLABAG_CONF_DIR="${pkgdir}/usr/share/webapps/${pkgname}/app/config"
install -d "${pkgdir}/etc/webapps/${pkgname}/"
mv "${WALLABAG_CONF_DIR}"/parameters.yml "${pkgdir}/etc/webapps/${pkgname}/"
chown -R http:http "${pkgdir}/etc/webapps/${pkgname}"
ln -s "/etc/webapps/${pkgname}/parameters.yml" "${WALLABAG_CONF_DIR}"/
_VAR_DIR="${pkgdir}/var/lib/${pkgname}/"
install -d "$_VAR_DIR"
mv "${pkgdir}/usr/share/webapps/${pkgname}/"{data,var} "$_VAR_DIR"
ln -s "/var/lib/${pkgname}/"{data,var} "${pkgdir}/usr/share/webapps/${pkgname}/"
chown -R http:http "$_VAR_DIR"
sed -i "${_VAR_DIR}/var/bootstrap.php.cache" -e "s@__DIR__.'/../@'/usr/share/webapps/${pkgname}/@"
chown -R http:http "${pkgdir}/usr/share/webapps/${pkgname}"
}

18
wallabag/README.md Normal file
View file

@ -0,0 +1,18 @@
# wallabag
## Description
AUR package for wallabag
## Installation
``` bash
git clone https://github.com/pschmitt/aur-wallabag /tmp/wallabag
cd /tmp/wallabag
makepkg -si
```
## Links
* AUR page: https://aur.archlinux.org/packages/wallabag
* Upstream: http://www.wallabag.org/ and https://github.com/wallabag/wallabag

48
wallabag/wallabag.install Normal file
View file

@ -0,0 +1,48 @@
post_install() {
echo ""
echo "==> Installed in : /usr/share/webapps/wallabag"
echo ""
echo "==> Config is at /etc/webapps/wallabag/parameters.yml"
echo ""
echo -n "Change the configuration to fit to your current setup, and then "
echo "init wallabag by launching:"
echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod"
echo ""
echo -n "To setup your webserver and enable the needed php extensions, "
echo "please read: https://doc.wallabag.org/en/master/user/installation.html"
echo ""
echo -n "If you upgraded from 2.0.x or 2.1.x, you might need to check "
echo "the upgrade guide: https://doc.wallabag.org/en/master/user/upgrade.html"
}
pre_upgrade() {
# save old untracked config and make it tracked
if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \
! -h /usr/share/webapps/wallabag/app/config/parameters.yml ]];
then install -Dm644 \
/usr/share/webapps/wallabag/app/config/parameters.yml \
-t /etc/webapps/wallabag/
fi
# also move `data` and `var` to /var/lib/wallabag/
if [[ -d /usr/share/webapps/wallabag/data && \
! -h /usr/share/webapps/wallabag/data && \
-d /usr/share/webapps/wallabag/var && \
! -h /usr/share/webapps/wallabag/var ]]; then
install -d /var/lib/wallabag/
chown http:http /var/lib/wallabag/
mv /usr/share/webapps/wallabag/{data,var} /var/lib/wallabag/
fi
}
post_upgrade() {
rm -rf /var/lib/wallabag/var/cache/*
echo ""
echo "====================================================================================="
echo " If you upgraded from 2.2.3 to 2.3.X you need to do database "
echo " migrations, check the guide: "
echo "https://doc.wallabag.org/en/admin/upgrade.html#explanations-about-database-migrations"
echo "====================================================================================="
echo ""
}