File etherpad-lite-README.openSUSE of Package etherpad-lite
= For packagers =
Etherpad needs a lot of additional node modules to run. Sadly, those
node modules (with all their additional dependencies) are hard to
package on their own.
So we decided to package the needed node modules right beside the
main package - and use a vendor tarball for them.
To create vendor.tar.xz,
please follow the steps below:
0) install the pnpm package including nodejs on your system
1) download and unpack the main software:
curl -Lo etherpad-lite-%{version}.tar.gz https://github.com/ether/etherpad-lite/archive/refs/tags/v%{version}.tar.gz
tar -xf etherpad-lite-%{version}.tar.gz
2) change into the new directory:
cd etherpad-lite-%{version}
3) execute the 'installDeps.sh' script:
bin/installDeps.sh
4) build admin panel (https://github.com/ether/etherpad-lite/issues/6367#issuecomment-2103359993):
pushd admin
edit package.json # under "scripts" -> "build", add "node_modules/.bin/" before "tsc" and "vite"
pnpm build
popd
5) clean up trash:
find . -name '*musl*' -prune -execdir rm -r {} +
find src -type f \( -name '*.c' -o -name '.*' -o -name '*.md' \) -delete
6) create the new vendor archive:
tar -cJf ../vendor.tar.xz node_modules/ src/node_modules/ src/templates/admin/
TODO:
- Minify stuff as part of build process (by default it starts compressing things on the first HTTP request to a pad).