Merge pull request #2 from di72nn/update

Bump version and move some data to /var/lib/
This commit is contained in:
Philipp Schmitt 2016-10-30 23:20:01 +01:00 committed by GitHub
commit c304cedb43
3 changed files with 42 additions and 16 deletions

View file

@ -1,6 +1,6 @@
pkgbase = wallabag pkgbase = wallabag
pkgdesc = Self hostable application for saving web pages pkgdesc = Self hostable application for saving web pages
pkgver = 2.0.5 pkgver = 2.1.2
pkgrel = 1 pkgrel = 1
url = http://www.wallabag.org/ url = http://www.wallabag.org/
install = wallabag.install install = wallabag.install
@ -13,11 +13,15 @@ pkgbase = wallabag
optdepends = php-mysql: For MySQL storage optdepends = php-mysql: For MySQL storage
optdepends = php-pgsql: For postgres storage optdepends = php-pgsql: For postgres storage
optdepends = php-sqlite: For sqlite storage optdepends = php-sqlite: For sqlite storage
optdepends = rabbitmq: For async import
optdepends = redis: For async import
options = !strip options = !strip
backup = etc/webapps/wallabag/parameters.yml backup = etc/webapps/wallabag/parameters.yml
backup = usr/share/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 source = wallabag.tar.xz::http://wllbg.org/latest-v2-package
sha256sums = c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc sha256sums = f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406
pkgname = wallabag pkgname = wallabag

View file

@ -1,7 +1,7 @@
# Maintainer: Philipp Schmitt (philipp<at>schmitt<dot>co) # Maintainer: Philipp Schmitt (philipp<at>schmitt<dot>co)
pkgname=wallabag pkgname=wallabag
pkgver=2.0.5 pkgver=2.1.2
pkgrel=1 pkgrel=1
pkgdesc='Self hostable application for saving web pages' pkgdesc='Self hostable application for saving web pages'
arch=('any') arch=('any')
@ -17,13 +17,17 @@ optdepends=(
'php-mysql: For MySQL storage' 'php-mysql: For MySQL storage'
'php-pgsql: For postgres storage' 'php-pgsql: For postgres storage'
'php-sqlite: For sqlite storage' 'php-sqlite: For sqlite storage'
'rabbitmq: For async import'
'redis: For async import'
) )
install="$pkgname.install" install="$pkgname.install"
options=(!strip) options=(!strip)
source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package") source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package")
sha256sums=('c3df0fe67782538cc7fbdeedb48845a8a23eceb11b58888fbd8ee3b97f8842fc') sha256sums=('f3acfde5a945bcd0a65f2549fc2f577bc6fc633ba901df27e7dc88c07feb2406')
backup=("etc/webapps/${pkgname}/parameters.yml" 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() { package() {
cd "${pkgdir}" cd "${pkgdir}"
@ -37,5 +41,11 @@ package() {
chown -R http:http ${pkgdir}/etc/webapps/${pkgname} chown -R http:http ${pkgdir}/etc/webapps/${pkgname}
ln -s /etc/webapps/${pkgname}/parameters.yml "${WALLABAG_CONF_DIR}"/ 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}"
} }

View file

@ -10,7 +10,10 @@ post_install() {
echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod" echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod"
echo "" echo ""
echo -n "To setup your webserver and enable the needed php extensions, " 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"
} }
@ -22,8 +25,17 @@ pre_upgrade() {
/usr/share/webapps/wallabag/app/config/parameters.yml \ /usr/share/webapps/wallabag/app/config/parameters.yml \
-t /etc/webapps/wallabag/ -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() { post_upgrade() {
rm -rf /usr/share/webapps/wallabag/var/cache/* rm -rf /var/lib/wallabag/var/cache/*
} }