Merge pull request #1 from Anthony25/master

Update for wallabag 2
This commit is contained in:
Philipp Schmitt 2016-05-22 17:23:03 +02:00
commit 1c0859d865
3 changed files with 58 additions and 40 deletions

View file

@ -1,25 +1,25 @@
# Generated by mksrcinfo v8 # Generated by mksrcinfo v8
# Fri May 6 05:56:19 UTC 2016 # Sat May 7 10:29:37 UTC 2016
pkgbase = wallabag pkgbase = wallabag
pkgdesc = Self hostable application for saving web pages pkgdesc = Self hostable application for saving web pages
pkgver = 2.0.3 pkgver = 2.0.3
pkgrel = 2 pkgrel = 3
url = http://www.wallabag.org/ url = http://www.wallabag.org/
install = wallabag.install install = wallabag.install
arch = any arch = any
license = MIT license = MIT
depends = php>=5.3.3 depends = php>=5.3.3
depends = php-gd
depends = php-tidy depends = php-tidy
depends = pcre depends = pcre
depends = php-gd optdepends = php-mysql: For MySQL storage
optdepends = mariadb: For MySQL storage
optdepends = php-sqlite: For sqlite storage
optdepends = php-pgsql: For postgres storage optdepends = php-pgsql: For postgres storage
optdepends = php-sqlite: For sqlite storage
options = !strip options = !strip
source = https://github.com/wallabag/wallabag/archive/2.0.3.tar.gz backup = etc/webapps/wallabag/parameters.yml
source = vendor.zip::http://wllbg.org/vendor backup = usr/share/webapps/wallabag/parameters.yml
sha256sums = 2252e0218917bc71db03db60a7b6940b4b8bdc8602732a458e906147e3c99a73 source = wallabag.tar.xz::http://wllbg.org/latest-v2-package
sha256sums = bd3e843290de28f1c20fa19ed746ca221c9174cb7f0a9723618f21bddb883e12 sha256sums = 6c69e2fd1dbebbd4311e4d385928dcad60cb80b16247d1e18181eb66a91e8bd7
pkgname = wallabag pkgname = wallabag

View file

@ -2,24 +2,40 @@
pkgname=wallabag pkgname=wallabag
pkgver=2.0.3 pkgver=2.0.3
pkgrel=2 pkgrel=3
pkgdesc='Self hostable application for saving web pages' pkgdesc='Self hostable application for saving web pages'
arch=('any') arch=('any')
url='http://www.wallabag.org/' url='http://www.wallabag.org/'
license=('MIT') license=('MIT')
depends=('php>=5.3.3' 'php-tidy' 'pcre' 'php-gd') depends=(
optdepends=('mariadb: For MySQL storage' 'php-sqlite: For sqlite storage' 'php-pgsql: For postgres storage') 'php>=5.3.3'
'php-gd'
'php-tidy'
'pcre'
)
optdepends=(
'php-mysql: For MySQL storage'
'php-pgsql: For postgres storage'
'php-sqlite: For sqlite storage'
)
install="$pkgname.install" install="$pkgname.install"
options=(!strip) options=(!strip)
source=("https://github.com/wallabag/wallabag/archive/${pkgver}.tar.gz" "vendor.zip::http://wllbg.org/vendor") source=("${pkgname}.tar.xz::http://wllbg.org/latest-v2-package")
sha256sums=('2252e0218917bc71db03db60a7b6940b4b8bdc8602732a458e906147e3c99a73' sha256sums=('6c69e2fd1dbebbd4311e4d385928dcad60cb80b16247d1e18181eb66a91e8bd7')
'bd3e843290de28f1c20fa19ed746ca221c9174cb7f0a9723618f21bddb883e12') backup=("etc/webapps/${pkgname}/parameters.yml"
"usr/share/webapps/${pkgname}/parameters.yml")
package() { package() {
cd "${pkgdir}" cd "${pkgdir}"
mkdir -p usr/share/webapps mkdir -p usr/share/webapps
mv "${srcdir}/${pkgname}-${pkgver}" usr/share/webapps/${pkgname} mv "${srcdir}/release-${pkgver}" usr/share/webapps/${pkgname}
mv "${srcdir}/vendor" usr/share/webapps/${pkgname}/vendor
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}"/
chown -R http:http "${pkgdir}/usr/share/webapps/wallabag" chown -R http:http "${pkgdir}/usr/share/webapps/wallabag"
} }

View file

@ -1,27 +1,29 @@
post_install() {
echo 'To get started you need to:
- Enable tidy.so and allow_url_fopen in /etc/php/php.ini
- Create a new mariadb user and a database:
$ mysql -u root -p
> create database wallabag;
> GRANT ALL ON wallabag.* TO wallabag@localhost IDENTIFIED BY '"'mypassword'"';
- Initialize the database:
$ mysql -u root -p wallabag < /usr/share/webapps/wallabag/install/mysql.sql
- Create a config file:
# cp /usr/share/webapps/wallabag/inc/poche/config.inc{.default,}.php
- Adjust your prefered STORAGE_SERVER (mysql, sqlite, postgres)
- Set the database credentials: STORAGE_SERVER, STORAGE_DB, STORAGE_USER, STORAGE_PASSWORD
- *Optional*: Adjust the SALT value in config.inc.php (it was autogenerated during install)
- Remove /usr/share/webapps/wallabag/install
More info: post_install() {
http://doc.wallabag.org/en/Administrator/download_and_install.html' 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"
}
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
} }
post_upgrade() { post_upgrade() {
echo 'After each upgrade you have to manually: rm -rf /usr/share/webapps/wallabag/var/cache/*
- Remove the installation folder (/usr/share/webapps/wallabag/install)
- Empty the cache folder (/usr/share/webapps/wallabag/cache)
$ sudo -u http rm -rf /usr/share/webapps/wallabag/{install,cache/*}'
} }