summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordadosch2021-01-10 03:52:09 +0100
committerdadosch2021-01-10 03:52:09 +0100
commit4c91ae0a3fb505ff6b8c99a104c21cfd941a0587 (patch)
treedad4dbe0037b909a15577d3f2fd66bc472432ef4
parente2182a9a7d342252c008e74e10f626eeac00de32 (diff)
downloadaur-4c91ae0a3fb505ff6b8c99a104c21cfd941a0587.tar.gz
switch to actual building from source, update to 3.0.1
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD30
2 files changed, 27 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9297fdc4ec7..b7c1129a4bb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = grocy
pkgdesc = web-based self-hosted groceries & household management solution for your home
- pkgver = 3.0.0
+ pkgver = 3.0.1
pkgrel = 1
url = https://grocy.info/
arch = any
license = MIT
+ makedepends = composer
+ makedepends = yarn
depends = php
depends = php-sqlite
depends = php-gd
backup = etc/webapps/grocy/config.php
- source = https://github.com/grocy/grocy/releases/download/v3.0.0/grocy_3.0.0.zip
- sha256sums = 3bb0e4b1f03de481ef2c9c91ad61bc88409c5140ec3adcad77bf24a0d65d4331
+ source = https://github.com/grocy/grocy/archive/v3.0.1.zip
+ sha512sums = 6585fa973b1539822df57c390c17c7f400e8bd2dbc0629b0a29ecbaf21bf0cf37759b460c1700a349fce4a948403d6b995287acb33b15419016100c7797affa6
pkgname = grocy
diff --git a/PKGBUILD b/PKGBUILD
index 0d8256f4e82..92041330c91 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,48 @@
# Maintainer: danieltetraquark
pkgname=grocy
-pkgver=3.0.0
+pkgver=3.0.1
pkgrel=1
pkgdesc="web-based self-hosted groceries & household management solution for your home"
depends=('php' 'php-sqlite' 'php-gd')
+makedepends=('composer' 'yarn')
license=('MIT')
arch=('any')
url="https://grocy.info/"
source=(
-https://github.com/grocy/grocy/releases/download/v${pkgver}/grocy_${pkgver}.zip
+https://github.com/grocy/grocy/archive/v${pkgver}.zip
)
-sha256sums=('3bb0e4b1f03de481ef2c9c91ad61bc88409c5140ec3adcad77bf24a0d65d4331')
+sha512sums=('6585fa973b1539822df57c390c17c7f400e8bd2dbc0629b0a29ecbaf21bf0cf37759b460c1700a349fce4a948403d6b995287acb33b15419016100c7797affa6')
backup=('etc/webapps/grocy/config.php')
+build() {
+ cd grocy-${pkgver}
+
+ mkdir data/viewcache
+
+ # composer need to have php-gd extension enabled, otherwise it will fail for a dependency of grocy.
+ php -n -dextension=gd.so /usr/bin/composer install --no-interaction --no-dev --optimize-autoloader
+ composer clear-cache
+
+ yarn install --modules-folder public/node_modules --production
+ yarn cache clean
+}
+
package() {
- # delete source zip, not needed in webroot
- rm grocy_${pkgver}.zip
+ cd grocy-${pkgver}
_instdir="$pkgdir"/usr/share/webapps/grocy
mkdir -p "$_instdir" "$pkgdir"/etc/webapps/grocy
# install license
- install -Dm644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- cp -ra "$srcdir"/. "$_instdir"/
+ # copy files to install directory
+ cp -ra . "$_instdir"/
- cp "$srcdir"/config-dist.php "$pkgdir"/etc/webapps/grocy/config.php
+ mv config-dist.php "$pkgdir"/etc/webapps/grocy/config.php
ln -s /etc/webapps/grocy/config.php "$pkgdir"/usr/share/webapps/grocy/data/config.php
chown 33 "$pkgdir"/usr/share/webapps/grocy/data -R