diff --git a/.SRCINFO b/.SRCINFO index 21951d0..eafc0ac 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = wallabag pkgdesc = Self hostable application for saving web pages - pkgver = 2.0.5 + pkgver = 2.1.2 pkgrel = 1 url = http://www.wallabag.org/ install = wallabag.install @@ -13,11 +13,15 @@ pkgbase = wallabag optdepends = php-mysql: For MySQL storage 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 = wallabag.tar.xz::http://wllbg.org/latest-v2-package - sha256sums = c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc + sha256sums = f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406 pkgname = wallabag diff --git a/PKGBUILD b/PKGBUILD index 5b8a857..ce118c0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Philipp Schmitt (philippschmittco) pkgname=wallabag -pkgver=2.0.5 +pkgver=2.1.2 pkgrel=1 pkgdesc='Self hostable application for saving web pages' arch=('any') @@ -17,13 +17,17 @@ optdepends=( 'php-mysql: For MySQL storage' 'php-pgsql: For postgres storage' 'php-sqlite: For sqlite storage' + 'rabbitmq: For async import' + 'redis: For async import' ) install="$pkgname.install" options=(!strip) source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package") -sha256sums=('c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc') +sha256sums=('f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406') backup=("etc/webapps/${pkgname}/parameters.yml" - "usr/share/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}" @@ -37,5 +41,11 @@ package() { chown -R http:http ${pkgdir}/etc/webapps/${pkgname} ln -s /etc/webapps/${pkgname}/parameters.yml "${WALLABAG_CONF_DIR}"/ - chown -R http:http "${pkgdir}/usr/share/webapps/wallabag" + _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" + + chown -R http:http "${pkgdir}/usr/share/webapps/${pkgname}" } diff --git a/wallabag.install b/wallabag.install index 55b211b..1b342a2 100644 --- a/wallabag.install +++ b/wallabag.install @@ -1,29 +1,41 @@ post_install() { - echo "" - echo "==> Installed in : /usr/share/webapps/wallabag" - echo "" - echo "==> Config is at /etc/webapps/wallabag/config/parameters.yml" - echo "" + echo "" + echo "==> Installed in : /usr/share/webapps/wallabag" + echo "" + echo "==> Config is at /etc/webapps/wallabag/config/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 "plase read: http://doc.wallabag.org/en/master/user/installation.html" + echo "please read: http://doc.wallabag.org/en/master/user/installation.html" + echo "" + echo -n "If you upgraded from 2.0.x, you might need to check the upgrade guide: " + echo "http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.1.html" } pre_upgrade() { - # save old untracked config and make it tracked - if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \ + # 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 + 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 /usr/share/webapps/wallabag/var/cache/* + rm -rf /var/lib/wallabag/var/cache/* }