mirror of
https://github.com/archlinux/aur.git
synced 2026-02-21 13:04:18 +01:00
Reduced the installed size
This commit is contained in:
parent
607caf2f51
commit
ebc0f90176
3 changed files with 29 additions and 22 deletions
6
.SRCINFO
6
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = homepage
|
||||
pkgdesc = A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
|
||||
pkgver = 1.8.0
|
||||
pkgrel = 1
|
||||
pkgrel = 15
|
||||
url = https://github.com/gethomepage/homepage
|
||||
arch = any
|
||||
license = GPL-3.0-only
|
||||
|
|
@ -9,13 +9,13 @@ pkgbase = homepage
|
|||
makedepends = pnpm
|
||||
makedepends = git
|
||||
depends = nodejs-lts-iron
|
||||
depends = pnpm
|
||||
options = !debug
|
||||
source = https://github.com/gethomepage/homepage/archive/v1.8.0.tar.gz
|
||||
source = homepage.service
|
||||
source = homepage.sysusers
|
||||
source = homepage.tmpfiles
|
||||
sha256sums = 66e7b0282d1e1372821ee62dbe3d21640d58c10d285a35716a65911895a0092b
|
||||
sha256sums = 98e54ffbf5fb251f66a50457d20d78b057d87f9dce645be15e87d84b181b094a
|
||||
sha256sums = SKIP
|
||||
sha256sums = b35b3df75248f5dd1298cb1a13921cb40b66998608eae3a8bf0c36562d43d278
|
||||
sha256sums = e10cf0af4417326d32acffddd7104ce5e033dfbbf06f7f8f71bc92a1d6c37165
|
||||
|
||||
|
|
|
|||
40
PKGBUILD
40
PKGBUILD
|
|
@ -1,29 +1,29 @@
|
|||
pkgname=homepage
|
||||
pkgver=1.8.0
|
||||
pkgrel=1
|
||||
pkgrel=15
|
||||
pkgdesc="A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations."
|
||||
arch=('any')
|
||||
url="https://github.com/gethomepage/homepage"
|
||||
license=('GPL-3.0-only')
|
||||
makedepends=('nodejs-lts-iron' 'pnpm' 'git')
|
||||
depends=('nodejs-lts-iron' 'pnpm')
|
||||
depends=('nodejs-lts-iron')
|
||||
# FIX 1: Disable the -debug package
|
||||
options=('!debug')
|
||||
source=("https://github.com/gethomepage/homepage/archive/v${pkgver}.tar.gz"
|
||||
'homepage.service'
|
||||
'homepage.sysusers'
|
||||
'homepage.tmpfiles')
|
||||
sha256sums=('66e7b0282d1e1372821ee62dbe3d21640d58c10d285a35716a65911895a0092b'
|
||||
'98e54ffbf5fb251f66a50457d20d78b057d87f9dce645be15e87d84b181b094a'
|
||||
'SKIP'
|
||||
'b35b3df75248f5dd1298cb1a13921cb40b66998608eae3a8bf0c36562d43d278'
|
||||
'e10cf0af4417326d32acffddd7104ce5e033dfbbf06f7f8f71bc92a1d6c37165')
|
||||
|
||||
build() {
|
||||
# Fix Date Crash
|
||||
export NEXT_PUBLIC_BUILDTIME="$(date --iso-8601=seconds)"
|
||||
|
||||
export NEXT_TELEMETRY_DISABLED=1
|
||||
export NEXT_PUBLIC_VERSION="${pkgver}"
|
||||
export NEXT_PUBLIC_REVISION="aur"
|
||||
|
||||
|
||||
cd "homepage-${pkgver}"
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm build
|
||||
|
|
@ -31,22 +31,28 @@ build() {
|
|||
|
||||
package() {
|
||||
cd "homepage-${pkgver}"
|
||||
|
||||
# Install Dir
|
||||
install -dm 755 "${pkgdir}/var/lib/homepage"
|
||||
|
||||
# Copy Build Artifacts
|
||||
# ADDED: next-i18next.config.js (Required by next.config.js)
|
||||
cp -r .next public package.json pnpm-lock.yaml next.config.js next-i18next.config.js "${pkgdir}/var/lib/homepage/"
|
||||
# FIX 2: Use cp -a with '.' to force copying hidden folders like .next/
|
||||
# This ensures the server finds the production build.
|
||||
cp -a .next/standalone/. "${pkgdir}/var/lib/homepage/"
|
||||
|
||||
# Create config dir
|
||||
# Copy Static Assets
|
||||
install -dm 755 "${pkgdir}/var/lib/homepage/.next/static"
|
||||
cp -r .next/static/. "${pkgdir}/var/lib/homepage/.next/static/"
|
||||
|
||||
# Copy Public Assets
|
||||
install -dm 755 "${pkgdir}/var/lib/homepage/public"
|
||||
cp -r public/. "${pkgdir}/var/lib/homepage/public/"
|
||||
|
||||
# Copy Configs
|
||||
cp next-i18next.config.js "${pkgdir}/var/lib/homepage/"
|
||||
cp next.config.js "${pkgdir}/var/lib/homepage/"
|
||||
|
||||
# Create Config Dir
|
||||
install -dm 755 "${pkgdir}/var/lib/homepage/config"
|
||||
|
||||
# Install Production Deps
|
||||
cd "${pkgdir}/var/lib/homepage"
|
||||
pnpm install --prod --frozen-lockfile
|
||||
|
||||
# Install System Files
|
||||
# System Files
|
||||
cd "${srcdir}"
|
||||
install -Dm644 "homepage.service" "$pkgdir/usr/lib/systemd/system/homepage.service"
|
||||
install -Dm644 "homepage.sysusers" "$pkgdir/usr/lib/sysusers.d/homepage.conf"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ Type=simple
|
|||
User=homepage
|
||||
Group=homepage
|
||||
WorkingDirectory=/var/lib/homepage
|
||||
# Uses pnpm start to launch the standard build
|
||||
ExecStart=/usr/bin/pnpm start
|
||||
# OPTIMIZED: We run the standalone server directly with Node
|
||||
# This removes the need for pnpm and the massive node_modules folder
|
||||
ExecStart=/usr/bin/node server.js
|
||||
Restart=always
|
||||
Environment=NODE_ENV=production
|
||||
Environment=PORT=3000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue