feat: Minimized package for production.

This commit is contained in:
Xarth-Mai 2025-07-17 00:38:02 +08:00
parent 92db207cf0
commit 92ea25d142
2 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,5 @@
pkgname=homepage
pkgver=1.4.0
pkgver=1.4.0-2
pkgrel=1
pkgdesc="A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations."
arch=('any')
@ -16,13 +16,20 @@ sha256sums=('8a90dcca10a001818d0f6f28a15d4eaef1ae5f614a4bc019d3a95ecb02ab60de'
'b35b3df75248f5dd1298cb1a13921cb40b66998608eae3a8bf0c36562d43d278'
'e10cf0af4417326d32acffddd7104ce5e033dfbbf06f7f8f71bc92a1d6c37165')
build() {
export NEXT_TELEMETRY_DISABLED=1
export NEXT_PUBLIC_BUILDTIME="$(date +%s)"
export NEXT_PUBLIC_VERSION="${pkgver}"
export NEXT_PUBLIC_REVISION="aur"
cd "homepage-${pkgver}"
pnpm install
pnpm build
}
package() {
install -dm 755 "${pkgdir}/var/lib/homepage"
cp -r "$srcdir/homepage-${pkgver}/." "${pkgdir}/var/lib/homepage/"
cp -r "$srcdir/homepage-${pkgver}/.next/standalone/." "${pkgdir}/var/lib/homepage/"
cp -r "${srcdir}/homepage-${pkgver}/public/." "${pkgdir}/var/lib/homepage/public/"
mkdir -p "${pkgdir}/var/lib/homepage/.next/static"
cp -r "${srcdir}/homepage-${pkgver}/.next/static/." "${pkgdir}/var/lib/homepage/.next/static/"
install -Dm644 "$srcdir/homepage.service" "$pkgdir/usr/lib/systemd/system/homepage.service"
install -Dm644 "$srcdir/homepage.sysusers" "$pkgdir/usr/lib/sysusers.d/homepage.conf"
install -Dm644 "$srcdir/homepage.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/homepage.conf"

View file

@ -17,6 +17,7 @@ User=homepage
Group=homepage
SyslogIdentifier=homepage
WorkingDirectory=/var/lib/homepage/
Environment="NODE_ENV=production"
ExecStart=/usr/bin/pnpm start
Restart=on-failure