diff options
author | potatoattack | 2022-10-27 09:43:59 +1100 |
---|---|---|
committer | potatoattack | 2022-10-27 09:43:59 +1100 |
commit | 5d1d8ebe30f0a3d2492013335af7d176fe8a789e (patch) | |
tree | 2527e252ba6c9a95cab23e9c2ad6a5480a624ed8 | |
download | aur-5d1d8ebe30f0a3d2492013335af7d176fe8a789e.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | ghostfolio.service | 16 | ||||
-rw-r--r-- | ghostfolio.sysusers | 1 | ||||
-rw-r--r-- | ghostfolio.tmpfiles | 2 |
6 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..35bd88e0b802 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = ghostfolio + pkgdesc = Open source wealth management software. + pkgver = 1.206.2 + pkgrel = 1 + url = https://ghostfol.io/ + arch = x86_64 + license = AGPL + depends = nodejs-lts-gallium + depends = yarn + depends = postgresql + depends = redis + backup = etc/ghostfolio.env + source = ghostfolio-1.206.2.tar.gz::https://github.com/ghostfolio/ghostfolio/archive/refs/tags/1.206.2.tar.gz + source = ghostfolio.service + source = ghostfolio.sysusers + source = ghostfolio.tmpfiles + sha256sums = 0370ca17a1805a69995239aca3ea6c5afd5c26ed1a4d95c8cd1d80d7e89e0d0f + sha256sums = 38528fddb3710eb617a21cf0bb3cc3bfcebbe92d539980ed559e9248b0ec1f78 + sha256sums = 128f0df32f5af102e7915b96c3868a90e9f33421d2376adbea63197f0257fcc1 + sha256sums = e640d2239e5308198b9ee84cefa9825d156dbd6151f86559e0d7f94dd1144b44 + +pkgname = ghostfolio diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..9df3f5cad512 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +* +!ghostfolio.service +!ghostfolio.sysusers +!ghostfolio.tmpfiles +!PKGBUILD +!.SRCINFO +!.gitignore diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..20fb2ea02499 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Aaron Coach <aur at ezpz dot cz> + +pkgname=ghostfolio +pkgver=1.206.2 +pkgrel=1 +pkgdesc="Open source wealth management software." +arch=('x86_64') +url="https://ghostfol.io/" +license=(AGPL) +depends=('nodejs-lts-gallium' 'yarn' 'postgresql' 'redis') +backup=('etc/ghostfolio.env') +source=("ghostfolio-$pkgver.tar.gz::https://github.com/ghostfolio/ghostfolio/archive/refs/tags/$pkgver.tar.gz" + "ghostfolio.service" + "ghostfolio.sysusers" + "ghostfolio.tmpfiles") +sha256sums=('0370ca17a1805a69995239aca3ea6c5afd5c26ed1a4d95c8cd1d80d7e89e0d0f' + '38528fddb3710eb617a21cf0bb3cc3bfcebbe92d539980ed559e9248b0ec1f78' + '128f0df32f5af102e7915b96c3868a90e9f33421d2376adbea63197f0257fcc1' + 'e640d2239e5308198b9ee84cefa9825d156dbd6151f86559e0d7f94dd1144b44') + +prepare() { + cd "$srcdir/ghostfolio-$pkgver" + yarn install + node decorate-angular-cli.js + + sed -i -e '1 i\NODE_ENV=production' -e 's|ghostfolio-development|ghostfolio|' .env +} + +build() { + cd "$srcdir/ghostfolio-$pkgver" + yarn build:all + cd dist/apps/api + yarn + cp -R ../../../{package.json,prisma} . + yarn database:generate-typings +} + +package() { + mkdir -p "$pkgdir/usr/lib" + cp -R "$srcdir/ghostfolio-$pkgver/dist/apps" "$pkgdir/usr/lib/ghostfolio" + install -D "$srcdir/$pkgname.service" -t "$pkgdir/usr/lib/systemd/system" + install -D "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + install -D "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" + install -D "$srcdir/ghostfolio-$pkgver/.env" "$pkgdir/etc/$pkgname.env" +} + +# vim:set ts=2 sw=2 et: diff --git a/ghostfolio.service b/ghostfolio.service new file mode 100644 index 000000000000..9ccc6401cfb0 --- /dev/null +++ b/ghostfolio.service @@ -0,0 +1,16 @@ +[Unit] +Description=Open source wealth management +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +ExecStart=/usr/bin/yarn start:prod +WorkingDirectory=/usr/lib/ghostfolio/api +EnvironmentFile=/etc/ghostfolio.env +User=ghostfolio +Group=ghostfolio +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/ghostfolio.sysusers b/ghostfolio.sysusers new file mode 100644 index 000000000000..5858cee4304e --- /dev/null +++ b/ghostfolio.sysusers @@ -0,0 +1 @@ +u ghostfolio - "Ghostfolio server user" /var/lib/ghostfolio /usr/bin/nologin diff --git a/ghostfolio.tmpfiles b/ghostfolio.tmpfiles new file mode 100644 index 000000000000..87381f632751 --- /dev/null +++ b/ghostfolio.tmpfiles @@ -0,0 +1,2 @@ +d /var/lib/ghostfolio 0750 +Z /var/lib/ghostfolio - ghostfolio ghostfolio |