Date: Monday, March 21, 2022 @ 00:56:23 Author: archange Revision: 1166446
LTO rebuild + package cleaning Modified: kresus/trunk/PKGBUILD ----------+ PKGBUILD | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-03-21 00:46:38 UTC (rev 1166445) +++ PKGBUILD 2022-03-21 00:56:23 UTC (rev 1166446) @@ -2,7 +2,7 @@ pkgname=kresus pkgver=0.17.4 -pkgrel=2 +pkgrel=3 pkgdesc="Self-hosted personal finance manager" arch=(x86_64) url="https://kresus.org" @@ -24,23 +24,27 @@ prepare() { cd ${pkgname}-${pkgver} - yarn install + yarn install --no-fund } build() { cd ${pkgname}-${pkgver} - yarn run build:prod + export CFLAGS+=" -ffat-lto-objects" + yarn run build:prod --offline } package() { cd ${pkgname}-${pkgver} + export CFLAGS+=" -ffat-lto-objects" + DESTDIR="${pkgdir}" npm -g install kresus --no-audit --no-fund - DESTDIR="${pkgdir}" npm -g install kresus - # Remove useless stuff rm -r "${pkgdir}"/usr/lib/node_modules/kresus/support find "${pkgdir}"/usr/lib/node_modules/kresus/ -type d \( -name 'test*' -o -name '.github' \) -exec rm -rf {} \+ find "${pkgdir}"/usr/lib/node_modules/kresus/ -type f \( -name '*\.md' -o -name 'LICENSE*' -o -name 'license' -o -name '\.*' \) -delete + # No -o -name 'package.json' because they seem required + # node-expat artifacts + rm -r "${pkgdir}"/usr/lib/node_modules/kresus/node_modules/node-expat/{binding.gyp,build/{Makefile,Release/{.deps,obj.target},binding.Makefile,config.gypi,deps,node_expat.target.mk},deps/,node-expat.cc} # Fix npm crazyness #chmod -R go-w "${pkgdir}"/usr